diff options
Diffstat (limited to 'drivers/input/serio/ambakmi.c')
-rw-r--r-- | drivers/input/serio/ambakmi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/input/serio/ambakmi.c b/drivers/input/serio/ambakmi.c index b10ffae7c39b..e29cdc13a199 100644 --- a/drivers/input/serio/ambakmi.c +++ b/drivers/input/serio/ambakmi.c | |||
@@ -57,7 +57,7 @@ static int amba_kmi_write(struct serio *io, unsigned char val) | |||
57 | struct amba_kmi_port *kmi = io->port_data; | 57 | struct amba_kmi_port *kmi = io->port_data; |
58 | unsigned int timeleft = 10000; /* timeout in 100ms */ | 58 | unsigned int timeleft = 10000; /* timeout in 100ms */ |
59 | 59 | ||
60 | while ((readb(KMISTAT) & KMISTAT_TXEMPTY) == 0 && timeleft--) | 60 | while ((readb(KMISTAT) & KMISTAT_TXEMPTY) == 0 && --timeleft) |
61 | udelay(10); | 61 | udelay(10); |
62 | 62 | ||
63 | if (timeleft) | 63 | if (timeleft) |
@@ -129,8 +129,8 @@ static int amba_kmi_probe(struct amba_device *dev, void *id) | |||
129 | io->write = amba_kmi_write; | 129 | io->write = amba_kmi_write; |
130 | io->open = amba_kmi_open; | 130 | io->open = amba_kmi_open; |
131 | io->close = amba_kmi_close; | 131 | io->close = amba_kmi_close; |
132 | strlcpy(io->name, dev->dev.bus_id, sizeof(io->name)); | 132 | strlcpy(io->name, dev_name(&dev->dev), sizeof(io->name)); |
133 | strlcpy(io->phys, dev->dev.bus_id, sizeof(io->phys)); | 133 | strlcpy(io->phys, dev_name(&dev->dev), sizeof(io->phys)); |
134 | io->port_data = kmi; | 134 | io->port_data = kmi; |
135 | io->dev.parent = &dev->dev; | 135 | io->dev.parent = &dev->dev; |
136 | 136 | ||