/* Bits in autopoll register */
#define APE 1 /* autopoll enable */
-static volatile struct adb_regs *adb;
+static volatile struct adb_regs __iomem *adb;
static struct adb_request *current_req, *last_req;
-static spinlock_t macio_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(macio_lock);
static int macio_probe(void);
static int macio_init(void);
printk("\n"); }
#endif
- adb = (volatile struct adb_regs *)
- ioremap(adbs->addrs->address, sizeof(struct adb_regs));
+ adb = ioremap(adbs->addrs->address, sizeof(struct adb_regs));
out_8(&adb->ctrl.r, 0);
out_8(&adb->intr.r, 0);
req->data[i] = req->data[i+1];
--req->nbytes;
- req->next = 0;
+ req->next = NULL;
req->sent = 0;
req->complete = 0;
req->reply_len = 0;
struct pt_regs *regs)
{
int i, n, err;
- struct adb_request *req;
+ struct adb_request *req = NULL;
unsigned char ibuf[16];
int ibuf_len = 0;
int complete = 0;
local_irq_save(flags);
if (in_8(&adb->intr.r) != 0)
- macio_adb_interrupt(0, 0, 0);
+ macio_adb_interrupt(0, NULL, NULL);
local_irq_restore(flags);
}