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 const char *name; 14 }; 15 16 static inline resource_size_t resource_size(const struct resource * r)17resource_size(const struct resource *r) 18 { 19 return r->end - r->start + 1; 20 } 21 22 #define DEFINE_RES_MEM(_start, _size) \ 23 (struct resource) { \ 24 .start = (_start), \ 25 .end = (_start) + (_size) - 1, \ 26 .name = NULL, \ 27 } 28 29 #endif 30