#define CHA 0x00 /* channel A offset */
#define CHB 0x40 /* channel B offset */
+
+/*
+ * FIXME: PPC has PVR defined in asm/reg.h. For now we just undef it.
+ */
+#undef PVR
#define RXFIFO 0
#define TXFIFO 0
static BOOLEAN wait_command_complete(MGSLPC_INFO *info, unsigned char channel)
{
int i = 0;
- unsigned char status;
/* wait for command completion */
- while ((status = read_reg(info, (unsigned char)(channel+STAR)) & BIT2)) {
+ while (read_reg(info, (unsigned char)(channel+STAR)) & BIT2) {
udelay(1);
if (i++ == 1000)
return FALSE;
if (info->tx_buf) {
free_page((unsigned long) info->tx_buf);
- info->tx_buf = 0;
+ info->tx_buf = NULL;
}
spin_lock_irqsave(&info->lock,flags);
shutdown(info);
tty->closing = 0;
- info->tty = 0;
+ info->tty = NULL;
if (info->blocked_open) {
if (info->close_delay) {
info->count = 0;
info->flags &= ~ASYNC_NORMAL_ACTIVE;
- info->tty = 0;
+ info->tty = NULL;
wake_up_interruptible(&info->open_wait);
}
cleanup:
if (retval) {
if (tty->count == 1)
- info->tty = 0; /* tty layer will release tty struct */
+ info->tty = NULL;/* tty layer will release tty struct */
if(info->count)
info->count--;
}