summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/drm/include/linux/ioport.h
blob: d36b7597c9b34824d8f8943e1a22f037a9ba3ff7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* Public domain. */

#ifndef _LINUX_IOPORT_H
#define _LINUX_IOPORT_H

#include <sys/types.h>

struct resource {
	u_long	start;
	u_long	end;
};

static inline resource_size_t
resource_size(const struct resource *r)
{
	return r->end - r->start + 1;
}

#define DEFINE_RES_MEM(_start, _size)		\
	{					\
		.start = (_start),		\
		.end = (_start) + (_size) - 1,	\
	}

#endif