diff options
Diffstat (limited to 'include/linux/ioport.h')
-rw-r--r-- | include/linux/ioport.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index cf8696d4a138..6859a3b14088 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -91,6 +91,9 @@ struct resource_list { | |||
91 | #define IORESOURCE_ROM_COPY (1<<2) /* ROM is alloc'd copy, resource field overlaid */ | 91 | #define IORESOURCE_ROM_COPY (1<<2) /* ROM is alloc'd copy, resource field overlaid */ |
92 | #define IORESOURCE_ROM_BIOS_COPY (1<<3) /* ROM is BIOS copy, resource field overlaid */ | 92 | #define IORESOURCE_ROM_BIOS_COPY (1<<3) /* ROM is BIOS copy, resource field overlaid */ |
93 | 93 | ||
94 | /* PCI control bits. Shares IORESOURCE_BITS with above PCI ROM. */ | ||
95 | #define IORESOURCE_PCI_FIXED (1<<4) /* Do not move resource */ | ||
96 | |||
94 | /* PC/ISA/whatever - the normal PC address spaces: IO and memory */ | 97 | /* PC/ISA/whatever - the normal PC address spaces: IO and memory */ |
95 | extern struct resource ioport_resource; | 98 | extern struct resource ioport_resource; |
96 | extern struct resource iomem_resource; | 99 | extern struct resource iomem_resource; |
@@ -134,4 +137,24 @@ static inline int __deprecated check_region(resource_size_t s, | |||
134 | { | 137 | { |
135 | return __check_region(&ioport_resource, s, n); | 138 | return __check_region(&ioport_resource, s, n); |
136 | } | 139 | } |
140 | |||
141 | /* Wrappers for managed devices */ | ||
142 | struct device; | ||
143 | #define devm_request_region(dev,start,n,name) \ | ||
144 | __devm_request_region(dev, &ioport_resource, (start), (n), (name)) | ||
145 | #define devm_request_mem_region(dev,start,n,name) \ | ||
146 | __devm_request_region(dev, &iomem_resource, (start), (n), (name)) | ||
147 | |||
148 | extern struct resource * __devm_request_region(struct device *dev, | ||
149 | struct resource *parent, resource_size_t start, | ||
150 | resource_size_t n, const char *name); | ||
151 | |||
152 | #define devm_release_region(start,n) \ | ||
153 | __devm_release_region(dev, &ioport_resource, (start), (n)) | ||
154 | #define devm_release_mem_region(start,n) \ | ||
155 | __devm_release_region(dev, &iomem_resource, (start), (n)) | ||
156 | |||
157 | extern void __devm_release_region(struct device *dev, struct resource *parent, | ||
158 | resource_size_t start, resource_size_t n); | ||
159 | |||
137 | #endif /* _LINUX_IOPORT_H */ | 160 | #endif /* _LINUX_IOPORT_H */ |