提交 503acc8a 编写于 作者: D David S. Miller

rtc-bq4802: Fix sparse warnings.

As reported by Harvey Harrison.
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4944f7e5
...@@ -17,6 +17,7 @@ MODULE_LICENSE("GPL"); ...@@ -17,6 +17,7 @@ MODULE_LICENSE("GPL");
struct bq4802 { struct bq4802 {
void __iomem *regs; void __iomem *regs;
unsigned long ioport;
struct rtc_device *rtc; struct rtc_device *rtc;
spinlock_t lock; spinlock_t lock;
struct resource *r; struct resource *r;
...@@ -26,12 +27,12 @@ struct bq4802 { ...@@ -26,12 +27,12 @@ struct bq4802 {
static u8 bq4802_read_io(struct bq4802 *p, int off) static u8 bq4802_read_io(struct bq4802 *p, int off)
{ {
return inb(p->regs + off); return inb(p->ioport + off);
} }
static void bq4802_write_io(struct bq4802 *p, int off, u8 val) static void bq4802_write_io(struct bq4802 *p, int off, u8 val)
{ {
return outb(val, p->regs + off); outb(val, p->ioport + off);
} }
static u8 bq4802_read_mem(struct bq4802 *p, int off) static u8 bq4802_read_mem(struct bq4802 *p, int off)
...@@ -41,7 +42,7 @@ static u8 bq4802_read_mem(struct bq4802 *p, int off) ...@@ -41,7 +42,7 @@ static u8 bq4802_read_mem(struct bq4802 *p, int off)
static void bq4802_write_mem(struct bq4802 *p, int off, u8 val) static void bq4802_write_mem(struct bq4802 *p, int off, u8 val)
{ {
return writeb(val, p->regs + off); writeb(val, p->regs + off);
} }
static int bq4802_read_time(struct device *dev, struct rtc_time *tm) static 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,7 +157,7 @@ static int __devinit bq4802_probe(struct platform_device *pdev)
goto out_free; goto out_free;
} }
if (p->r->flags & IORESOURCE_IO) { if (p->r->flags & IORESOURCE_IO) {
p->regs = (void __iomem *) p->r->start; p->ioport = p->r->start;
p->read = bq4802_read_io; p->read = bq4802_read_io;
p->write = bq4802_write_io; p->write = bq4802_write_io;
} else if (p->r->flags & IORESOURCE_MEM) { } else if (p->r->flags & IORESOURCE_MEM) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册