aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2010-09-04 16:56:44 -0400
committerIngo Molnar <mingo@elte.hu>2010-09-05 08:26:15 -0400
commit29bc17ecb856ffb2b47c7009a71971c6f9334205 (patch)
tree5532247cd9d2769375786f1c1d11211e4138542d /include
parentcc1a8e523333bc3d990102140f4d12908fa83caf (diff)
io-mapping: Fix the address space annotations
Fixes a bunch of sparse warnings in io-mapping.h because of the inconsistent __iomem usage. Signed-off-by: Francisco Jerez <currojerez@riseup.net> LKML-Reference: <1283633804-11749-2-git-send-email-currojerez@riseup.net> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include')
-rw-r--r--include/linux/io-mapping.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/include/linux/io-mapping.h b/include/linux/io-mapping.h
index 0a6b3d5c490c..7fb592793738 100644
--- a/include/linux/io-mapping.h
+++ b/include/linux/io-mapping.h
@@ -79,7 +79,7 @@ io_mapping_free(struct io_mapping *mapping)
79} 79}
80 80
81/* Atomic map/unmap */ 81/* Atomic map/unmap */
82static inline void * 82static inline void __iomem *
83io_mapping_map_atomic_wc(struct io_mapping *mapping, 83io_mapping_map_atomic_wc(struct io_mapping *mapping,
84 unsigned long offset, 84 unsigned long offset,
85 int slot) 85 int slot)
@@ -94,12 +94,12 @@ io_mapping_map_atomic_wc(struct io_mapping *mapping,
94} 94}
95 95
96static inline void 96static inline void
97io_mapping_unmap_atomic(void *vaddr, int slot) 97io_mapping_unmap_atomic(void __iomem *vaddr, int slot)
98{ 98{
99 iounmap_atomic(vaddr, slot); 99 iounmap_atomic(vaddr, slot);
100} 100}
101 101
102static inline void * 102static inline void __iomem *
103io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) 103io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset)
104{ 104{
105 resource_size_t phys_addr; 105 resource_size_t phys_addr;
@@ -111,7 +111,7 @@ io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset)
111} 111}
112 112
113static inline void 113static inline void
114io_mapping_unmap(void *vaddr) 114io_mapping_unmap(void __iomem *vaddr)
115{ 115{
116 iounmap(vaddr); 116 iounmap(vaddr);
117} 117}
@@ -125,38 +125,38 @@ struct io_mapping;
125static inline struct io_mapping * 125static inline struct io_mapping *
126io_mapping_create_wc(resource_size_t base, unsigned long size) 126io_mapping_create_wc(resource_size_t base, unsigned long size)
127{ 127{
128 return (struct io_mapping *) ioremap_wc(base, size); 128 return (struct io_mapping __force *) ioremap_wc(base, size);
129} 129}
130 130
131static inline void 131static inline void
132io_mapping_free(struct io_mapping *mapping) 132io_mapping_free(struct io_mapping *mapping)
133{ 133{
134 iounmap(mapping); 134 iounmap((void __force __iomem *) mapping);
135} 135}
136 136
137/* Atomic map/unmap */ 137/* Atomic map/unmap */
138static inline void * 138static inline void __iomem *
139io_mapping_map_atomic_wc(struct io_mapping *mapping, 139io_mapping_map_atomic_wc(struct io_mapping *mapping,
140 unsigned long offset, 140 unsigned long offset,
141 int slot) 141 int slot)
142{ 142{
143 return ((char *) mapping) + offset; 143 return ((char __force __iomem *) mapping) + offset;
144} 144}
145 145
146static inline void 146static inline void
147io_mapping_unmap_atomic(void *vaddr, int slot) 147io_mapping_unmap_atomic(void __iomem *vaddr, int slot)
148{ 148{
149} 149}
150 150
151/* Non-atomic map/unmap */ 151/* Non-atomic map/unmap */
152static inline void * 152static inline void __iomem *
153io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset) 153io_mapping_map_wc(struct io_mapping *mapping, unsigned long offset)
154{ 154{
155 return ((char *) mapping) + offset; 155 return ((char __force __iomem *) mapping) + offset;
156} 156}
157 157
158static inline void 158static inline void
159io_mapping_unmap(void *vaddr) 159io_mapping_unmap(void __iomem *vaddr)
160{ 160{
161} 161}
162 162