Commit 3a67ca19 authored by Helge Deller's avatar Helge Deller

parisc/gscps2: Fix sparse warnings

Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent 2d76978d
...@@ -91,7 +91,7 @@ struct gscps2port { ...@@ -91,7 +91,7 @@ struct gscps2port {
struct parisc_device *padev; struct parisc_device *padev;
struct serio *port; struct serio *port;
spinlock_t lock; spinlock_t lock;
char *addr; char __iomem *addr;
u8 act, append; /* position in buffer[] */ u8 act, append; /* position in buffer[] */
struct { struct {
u8 data; u8 data;
...@@ -114,7 +114,7 @@ struct gscps2port { ...@@ -114,7 +114,7 @@ struct gscps2port {
* wait_TBE() - wait for Transmit Buffer Empty * wait_TBE() - wait for Transmit Buffer Empty
*/ */
static int wait_TBE(char *addr) static int wait_TBE(char __iomem *addr)
{ {
int timeout = 25000; /* device is expected to react within 250 msec */ int timeout = 25000; /* device is expected to react within 250 msec */
while (gscps2_readb_status(addr) & GSC_STAT_TBNE) { while (gscps2_readb_status(addr) & GSC_STAT_TBNE) {
...@@ -146,14 +146,14 @@ static void gscps2_flush(struct gscps2port *ps2port) ...@@ -146,14 +146,14 @@ static void gscps2_flush(struct gscps2port *ps2port)
static inline int gscps2_writeb_output(struct gscps2port *ps2port, u8 data) static inline int gscps2_writeb_output(struct gscps2port *ps2port, u8 data)
{ {
unsigned long flags; unsigned long flags;
char *addr = ps2port->addr; char __iomem *addr = ps2port->addr;
if (!wait_TBE(addr)) { if (!wait_TBE(addr)) {
printk(KERN_DEBUG PFX "timeout - could not write byte %#x\n", data); printk(KERN_DEBUG PFX "timeout - could not write byte %#x\n", data);
return 0; return 0;
} }
while (gscps2_readb_status(ps2port->addr) & GSC_STAT_RBNE) while (gscps2_readb_status(addr) & GSC_STAT_RBNE)
/* wait */; /* wait */;
spin_lock_irqsave(&ps2port->lock, flags); spin_lock_irqsave(&ps2port->lock, flags);
...@@ -200,13 +200,12 @@ static void gscps2_enable(struct gscps2port *ps2port, int enable) ...@@ -200,13 +200,12 @@ static void gscps2_enable(struct gscps2port *ps2port, int enable)
static void gscps2_reset(struct gscps2port *ps2port) static void gscps2_reset(struct gscps2port *ps2port)
{ {
char *addr = ps2port->addr;
unsigned long flags; unsigned long flags;
/* reset the interface */ /* reset the interface */
spin_lock_irqsave(&ps2port->lock, flags); spin_lock_irqsave(&ps2port->lock, flags);
gscps2_flush(ps2port); gscps2_flush(ps2port);
writeb(0xff, addr+GSC_RESET); writeb(0xff, ps2port->addr + GSC_RESET);
gscps2_flush(ps2port); gscps2_flush(ps2port);
spin_unlock_irqrestore(&ps2port->lock, flags); spin_unlock_irqrestore(&ps2port->lock, flags);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment