1 /* Public domain. */ 2 3 #ifndef _LINUX_IOPORT_H 4 #define _LINUX_IOPORT_H 5 6 #include <linux/types.h> 7 8 #define IORESOURCE_MEM 0x0001 9 10 struct resource { 11 u_long start; 12 u_long end; 13 }; 14 15 static inline resource_size_t resource_size(const struct resource * r)16resource_size(const struct resource *r) 17 { 18 return r->end - r->start + 1; 19 } 20 21 #define DEFINE_RES_MEM(_start, _size) \ 22 (struct resource) { \ 23 .start = (_start), \ 24 .end = (_start) + (_size) - 1, \ 25 } 26 27 #endif 28