struct bq4802 {
void __iomem *regs;
+ unsigned long ioport;
struct rtc_device *rtc;
spinlock_t lock;
struct resource *r;
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)
{
- return outb(val, p->regs + off);
+ outb(val, p->ioport + off);
}
static u8 bq4802_read_mem(struct bq4802 *p, int off)
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)
goto out_free;
}
if (p->r->flags & IORESOURCE_IO) {
- p->regs = (void __iomem *) p->r->start;
+ p->ioport = p->r->start;
p->read = bq4802_read_io;
p->write = bq4802_write_io;
} else if (p->r->flags & IORESOURCE_MEM) {