diff options
Diffstat (limited to 'drivers/media/video/cx18/cx18-io.c')
-rw-r--r-- | drivers/media/video/cx18/cx18-io.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/drivers/media/video/cx18/cx18-io.c b/drivers/media/video/cx18/cx18-io.c index 3c6485fceea0..c67694f63d0e 100644 --- a/drivers/media/video/cx18/cx18-io.c +++ b/drivers/media/video/cx18/cx18-io.c | |||
@@ -166,41 +166,6 @@ u8 cx18_readb_retry(struct cx18 *cx, const void __iomem *addr) | |||
166 | return val; | 166 | return val; |
167 | } | 167 | } |
168 | 168 | ||
169 | void cx18_memcpy_fromio(struct cx18 *cx, void *to, | ||
170 | const void __iomem *from, unsigned int len) | ||
171 | { | ||
172 | const u8 __iomem *src = from; | ||
173 | u8 *dst = to; | ||
174 | |||
175 | /* Align reads on the CX23418's addresses */ | ||
176 | if ((len > 0) && ((unsigned long) src & 1)) { | ||
177 | *dst = cx18_readb(cx, src); | ||
178 | len--; | ||
179 | dst++; | ||
180 | src++; | ||
181 | } | ||
182 | if ((len > 1) && ((unsigned long) src & 2)) { | ||
183 | *((u16 *)dst) = cx18_raw_readw(cx, src); | ||
184 | len -= 2; | ||
185 | dst += 2; | ||
186 | src += 2; | ||
187 | } | ||
188 | while (len > 3) { | ||
189 | *((u32 *)dst) = cx18_raw_readl(cx, src); | ||
190 | len -= 4; | ||
191 | dst += 4; | ||
192 | src += 4; | ||
193 | } | ||
194 | if (len > 1) { | ||
195 | *((u16 *)dst) = cx18_raw_readw(cx, src); | ||
196 | len -= 2; | ||
197 | dst += 2; | ||
198 | src += 2; | ||
199 | } | ||
200 | if (len > 0) | ||
201 | *dst = cx18_readb(cx, src); | ||
202 | } | ||
203 | |||
204 | void cx18_memset_io(struct cx18 *cx, void __iomem *addr, int val, size_t count) | 169 | void cx18_memset_io(struct cx18 *cx, void __iomem *addr, int val, size_t count) |
205 | { | 170 | { |
206 | u8 __iomem *dst = addr; | 171 | u8 __iomem *dst = addr; |