xref: /openbsd-src/sys/dev/pci/drm/include/linux/ioport.h (revision 3374c67d44f9b75b98444cbf63020f777792342e)
1 /* Public domain. */
2 
3 #ifndef _LINUX_IOPORT_H
4 #define _LINUX_IOPORT_H
5 
6 #include <linux/types.h>
7 
8 struct resource {
9 	u_long	start;
10 	u_long	end;
11 };
12 
13 static inline resource_size_t
14 resource_size(const struct resource *r)
15 {
16 	return r->end - r->start + 1;
17 }
18 
19 #define DEFINE_RES_MEM(_start, _size)		\
20 	{					\
21 		.start = (_start),		\
22 		.end = (_start) + (_size) - 1,	\
23 	}
24 
25 #endif
26