static void ct82c710_interrupt(int cpl, void *dev_id, struct pt_regs * regs)
{
- if (ct82c710_port.dev)
- ct82c710_port.dev->interrupt(&ct82c710_port, inb(ct82c710_data), 0);
+ serio_interrupt(&ct82c710_port, inb(ct82c710_data), 0);
}
/*
#endif
if (i8042_aux_values.exists && (str & I8042_STR_AUXDATA)) {
- if (i8042_aux_port.dev)
- i8042_aux_port.dev->interrupt(&i8042_aux_port, data, 0);
+ serio_interrupt(&i8042_aux_port, data, 0);
} else {
- if (i8042_kbd_values.exists && i8042_kbd_port.dev) {
+ if (i8042_kbd_values.exists) {
if (!i8042_direct) {
if (data > 0x7f) {
if (test_and_clear_bit(data & 0x7f, i8042_unxlate_seen)) {
- i8042_kbd_port.dev->interrupt(&i8042_kbd_port, 0xf0, 0);
+ serio_interrupt(&i8042_kbd_port, 0xf0, 0);
data = i8042_unxlate_table[data & 0x7f];
}
} else {
data = i8042_unxlate_table[data];
}
}
- i8042_kbd_port.dev->interrupt(&i8042_kbd_port, data, 0);
+ serio_interrupt(&i8042_kbd_port, data, 0);
}
}
}
parkbd_buffer |= (parkbd_readlines() >> 1) << parkbd_counter++;
- if (parkbd_counter == parkbd_mode + 10) {
- if (parkbd_port.dev)
- parkbd_port.dev->interrupt(&parkbd_port, (parkbd_buffer >> (2 - parkbd_mode)) & 0xff, 0);
- }
+ if (parkbd_counter == parkbd_mode + 10)
+ serio_interrupt(&parkbd_port, (parkbd_buffer >> (2 - parkbd_mode)) & 0xff, 0);
}
parkbd_last = jiffies;
kbd_pt_regs = regs;
while (inb(IOMD_KCTRL) & (1 << 5))
- if (rpckbd_port.dev)
- rpckbd_port.dev->interrupt(&rpckbd_port, inb(IOMD_KARTRX), 0);
+ serio_interrupt(&rpckbd_port, inb(IOMD_KARTRX), 0);
}
struct serport *serport = (struct serport*) tty->disc_data;
int i;
for (i = 0; i < count; i++)
- if (serport->serio.dev)
- serport->serio.dev->interrupt(&serport->serio, cp[i], 0);
+ serio_interrupt(&serport->serio, cp[i], 0);
}
/*
static __inline__ void serio_dev_write_wakeup(struct serio *serio)
{
- if (serio->dev && serio->dev->write_wakeup) {
+ if (serio->dev && serio->dev->write_wakeup)
serio->dev->write_wakeup(serio);
- }
+}
+
+static __inline__ void serio_interrupt(struct serio *serio, unsigned char data, unsigned int flags)
+{
+ if (serio->dev && serio->dev->interrupt)
+ serio->dev->interrupt(serio, data, flags);
}
#define SERIO_TIMEOUT 1