diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2006-06-12 19:09:23 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-06-27 12:23:59 -0400 |
commit | d75fc8bbccf7c019994bcfd6255d5b56335ed21d (patch) | |
tree | 51eee480485d640e2b7b1efd9e98eadb683fadcd /include/linux/ioport.h | |
parent | cf7c712c11fb881842534efe98a07f36f1c86c65 (diff) |
[PATCH] 64bit resource: change resource core to use resource_size_t
Based on a patch series originally from Vivek Goyal <vgoyal@in.ibm.com>
Cc: Vivek Goyal <vgoyal@in.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/ioport.h')
-rw-r--r-- | include/linux/ioport.h | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/include/linux/ioport.h b/include/linux/ioport.h index 535bd9585897..d4895236b7e9 100644 --- a/include/linux/ioport.h +++ b/include/linux/ioport.h | |||
@@ -98,31 +98,34 @@ extern struct resource * ____request_resource(struct resource *root, struct reso | |||
98 | extern int release_resource(struct resource *new); | 98 | extern int release_resource(struct resource *new); |
99 | extern __deprecated_for_modules int insert_resource(struct resource *parent, struct resource *new); | 99 | extern __deprecated_for_modules int insert_resource(struct resource *parent, struct resource *new); |
100 | extern int allocate_resource(struct resource *root, struct resource *new, | 100 | extern int allocate_resource(struct resource *root, struct resource *new, |
101 | unsigned long size, | 101 | resource_size_t size, resource_size_t min, |
102 | unsigned long min, unsigned long max, | 102 | resource_size_t max, resource_size_t align, |
103 | unsigned long align, | ||
104 | void (*alignf)(void *, struct resource *, | 103 | void (*alignf)(void *, struct resource *, |
105 | unsigned long, unsigned long), | 104 | resource_size_t, resource_size_t), |
106 | void *alignf_data); | 105 | void *alignf_data); |
107 | int adjust_resource(struct resource *res, unsigned long start, | 106 | int adjust_resource(struct resource *res, resource_size_t start, |
108 | unsigned long size); | 107 | resource_size_t size); |
109 | 108 | ||
110 | /* Convenience shorthand with allocation */ | 109 | /* Convenience shorthand with allocation */ |
111 | #define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name)) | 110 | #define request_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name)) |
112 | #define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name)) | 111 | #define request_mem_region(start,n,name) __request_region(&iomem_resource, (start), (n), (name)) |
113 | #define rename_region(region, newname) do { (region)->name = (newname); } while (0) | 112 | #define rename_region(region, newname) do { (region)->name = (newname); } while (0) |
114 | 113 | ||
115 | extern struct resource * __request_region(struct resource *, unsigned long start, unsigned long n, const char *name); | 114 | extern struct resource * __request_region(struct resource *, |
115 | resource_size_t start, | ||
116 | resource_size_t n, const char *name); | ||
116 | 117 | ||
117 | /* Compatibility cruft */ | 118 | /* Compatibility cruft */ |
118 | #define release_region(start,n) __release_region(&ioport_resource, (start), (n)) | 119 | #define release_region(start,n) __release_region(&ioport_resource, (start), (n)) |
119 | #define check_mem_region(start,n) __check_region(&iomem_resource, (start), (n)) | 120 | #define check_mem_region(start,n) __check_region(&iomem_resource, (start), (n)) |
120 | #define release_mem_region(start,n) __release_region(&iomem_resource, (start), (n)) | 121 | #define release_mem_region(start,n) __release_region(&iomem_resource, (start), (n)) |
121 | 122 | ||
122 | extern int __check_region(struct resource *, unsigned long, unsigned long); | 123 | extern int __check_region(struct resource *, resource_size_t, resource_size_t); |
123 | extern void __release_region(struct resource *, unsigned long, unsigned long); | 124 | extern void __release_region(struct resource *, resource_size_t, |
125 | resource_size_t); | ||
124 | 126 | ||
125 | static inline int __deprecated check_region(unsigned long s, unsigned long n) | 127 | static inline int __deprecated check_region(resource_size_t s, |
128 | resource_size_t n) | ||
126 | { | 129 | { |
127 | return __check_region(&ioport_resource, s, n); | 130 | return __check_region(&ioport_resource, s, n); |
128 | } | 131 | } |