aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/rio
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/rio')
-rw-r--r--drivers/char/rio/rio_linux.c2
-rw-r--r--drivers/char/rio/rio_linux.h14
2 files changed, 14 insertions, 2 deletions
diff --git a/drivers/char/rio/rio_linux.c b/drivers/char/rio/rio_linux.c
index 8f96b20090e8..aa43436d5d1b 100644
--- a/drivers/char/rio/rio_linux.c
+++ b/drivers/char/rio/rio_linux.c
@@ -335,7 +335,7 @@ int RIODelay_ni(struct Port *PortP, int njiffies)
335 335
336void rio_copy_to_card(void *from, void __iomem *to, int len) 336void rio_copy_to_card(void *from, void __iomem *to, int len)
337{ 337{
338 rio_memcpy_toio(NULL, to, from, len); 338 rio_copy_toio(to, from, len);
339} 339}
340 340
341int rio_minor(struct tty_struct *tty) 341int rio_minor(struct tty_struct *tty)
diff --git a/drivers/char/rio/rio_linux.h b/drivers/char/rio/rio_linux.h
index 99c7447b6113..55b9c97e8477 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
138 138
139 while (n--) { 139 while (n--) {
140 writeb(*src++, dst++); 140 writeb(*src++, dst++);
141 (void) readb(dummy); /* WTF? */ 141 (void) readb(dummy);
142 } 142 }
143 143
144 return dest; 144 return dest;
145} 145}
146 146
147static inline void __iomem *rio_copy_toio(void __iomem *dest, void *source, int n)
148{
149 char __iomem *dst = dest;
150 char *src = source;
151
152 while (n--)
153 writeb(*src++, dst++);
154
155 return dest;
156}
157
147 158
148static inline void *rio_memcpy_fromio(void *dest, void __iomem *source, int n) 159static inline void *rio_memcpy_fromio(void *dest, void __iomem *source, int n)
149{ 160{
@@ -158,6 +169,7 @@ static inline void *rio_memcpy_fromio(void *dest, void __iomem *source, int n)
158 169
159#else 170#else
160#define rio_memcpy_toio(dummy,dest,source,n) memcpy_toio(dest, source, n) 171#define rio_memcpy_toio(dummy,dest,source,n) memcpy_toio(dest, source, n)
172#define rio_copy_toio memcpy_toio
161#define rio_memcpy_fromio memcpy_fromio 173#define rio_memcpy_fromio memcpy_fromio
162#endif 174#endif
163 175