aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/rio/rio_linux.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/rio/rio_linux.h')
-rw-r--r--drivers/char/rio/rio_linux.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/char/rio/rio_linux.h b/drivers/char/rio/rio_linux.h
index 99c7447b611..55b9c97e847 100644
--- a/drivers/char/rio/rio_linux.h
+++ b/drivers/char/rio/rio_linux.h
@@ -138,12 +138,23 @@ static inline void __iomem *rio_memcpy_toio(void __iomem *dummy, void __iomem *d
while (n--) {
writeb(*src++, dst++);
- (void) readb(dummy); /* WTF? */
+ (void) readb(dummy);
}
return dest;
}
+static inline void __iomem *rio_copy_toio(void __iomem *dest, void *source, int n)
+{
+ char __iomem *dst = dest;
+ char *src = source;
+
+ while (n--)
+ writeb(*src++, dst++);
+
+ return dest;
+}
+
static inline void *rio_memcpy_fromio(void *dest, void __iomem *source, int n)
{
@@ -158,6 +169,7 @@ static inline void *rio_memcpy_fromio(void *dest, void __iomem *source, int n)
#else
#define rio_memcpy_toio(dummy,dest,source,n) memcpy_toio(dest, source, n)
+#define rio_copy_toio memcpy_toio
#define rio_memcpy_fromio memcpy_fromio
#endif