aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-bq4802.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-09-09 22:50:04 -0400
committerDavid S. Miller <davem@davemloft.net>2008-09-09 22:50:04 -0400
commit503acc8a33b1f41a547517c9a592af5e5968f85c (patch)
treea34b90aa9ad35b834556892270e46da8739f9f91 /drivers/rtc/rtc-bq4802.c
parent4944f7e5c917949451ba7f32aab5d297d8b03c7f (diff)
rtc-bq4802: Fix sparse warnings.
As reported by Harvey Harrison. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/rtc/rtc-bq4802.c')
-rw-r--r--drivers/rtc/rtc-bq4802.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-bq4802.c b/drivers/rtc/rtc-bq4802.c
index 541580cb6df4..189a018bdf34 100644
--- a/drivers/rtc/rtc-bq4802.c
+++ b/drivers/rtc/rtc-bq4802.c
@@ -17,6 +17,7 @@ MODULE_LICENSE("GPL");
17 17
18struct bq4802 { 18struct bq4802 {
19 void __iomem *regs; 19 void __iomem *regs;
20 unsigned long ioport;
20 struct rtc_device *rtc; 21 struct rtc_device *rtc;
21 spinlock_t lock; 22 spinlock_t lock;
22 struct resource *r; 23 struct resource *r;
@@ -26,12 +27,12 @@ struct bq4802 {
26 27
27static u8 bq4802_read_io(struct bq4802 *p, int off) 28static u8 bq4802_read_io(struct bq4802 *p, int off)
28{ 29{
29 return inb(p->regs + off); 30 return inb(p->ioport + off);
30} 31}
31 32
32static void bq4802_write_io(struct bq4802 *p, int off, u8 val) 33static void bq4802_write_io(struct bq4802 *p, int off, u8 val)
33{ 34{
34 return outb(val, p->regs + off); 35 outb(val, p->ioport + off);
35} 36}
36 37
37static u8 bq4802_read_mem(struct bq4802 *p, int off) 38static u8 bq4802_read_mem(struct bq4802 *p, int off)
@@ -41,7 +42,7 @@ static u8 bq4802_read_mem(struct bq4802 *p, int off)
41 42
42static void bq4802_write_mem(struct bq4802 *p, int off, u8 val) 43static void bq4802_write_mem(struct bq4802 *p, int off, u8 val)
43{ 44{
44 return writeb(val, p->regs + off); 45 writeb(val, p->regs + off);
45} 46}
46 47
47static int bq4802_read_time(struct device *dev, struct rtc_time *tm) 48static int bq4802_read_time(struct device *dev, struct rtc_time *tm)
@@ -156,7 +157,7 @@ static int __devinit bq4802_probe(struct platform_device *pdev)
156 goto out_free; 157 goto out_free;
157 } 158 }
158 if (p->r->flags & IORESOURCE_IO) { 159 if (p->r->flags & IORESOURCE_IO) {
159 p->regs = (void __iomem *) p->r->start; 160 p->ioport = p->r->start;
160 p->read = bq4802_read_io; 161 p->read = bq4802_read_io;
161 p->write = bq4802_write_io; 162 p->write = bq4802_write_io;
162 } else if (p->r->flags & IORESOURCE_MEM) { 163 } else if (p->r->flags & IORESOURCE_MEM) {