diff options
Diffstat (limited to 'include/linux/ioport.h')
-rw-r--r-- | include/linux/ioport.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 15228d79c5bc..6859a3b14088 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -137,4 +137,24 @@ static inline int __deprecated check_region(resource_size_t s, | |||
137 | { | 137 | { |
138 | return __check_region(&ioport_resource, s, n); | 138 | return __check_region(&ioport_resource, s, n); |
139 | } | 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 | |||
140 | #endif /* _LINUX_IOPORT_H */ | 160 | #endif /* _LINUX_IOPORT_H */ |