diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-05 19:32:01 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-05 19:32:01 -0400 |
| commit | 44aefd2706bb6f5b65ba2c38cd89e7609e2b43d3 (patch) | |
| tree | 93824f573767da634fbc82c388b6d33cc454212b /drivers/serial/sunsu.c | |
| parent | c1a26e7d40fb814716950122353a1a556844286b (diff) | |
| parent | 7d12e780e003f93433d49ce78cfedf4b4c52adc5 (diff) | |
Merge git://git.infradead.org/~dhowells/irq-2.6
* git://git.infradead.org/~dhowells/irq-2.6:
IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
IRQ: Typedef the IRQ handler function type
IRQ: Typedef the IRQ flow handler function type
Diffstat (limited to 'drivers/serial/sunsu.c')
| -rw-r--r-- | drivers/serial/sunsu.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index 9b3b9aaa6b90..c577faea60e8 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c | |||
| @@ -310,7 +310,7 @@ static void sunsu_enable_ms(struct uart_port *port) | |||
| 310 | } | 310 | } |
| 311 | 311 | ||
| 312 | static struct tty_struct * | 312 | static struct tty_struct * |
| 313 | receive_chars(struct uart_sunsu_port *up, unsigned char *status, struct pt_regs *regs) | 313 | receive_chars(struct uart_sunsu_port *up, unsigned char *status) |
| 314 | { | 314 | { |
| 315 | struct tty_struct *tty = up->port.info->tty; | 315 | struct tty_struct *tty = up->port.info->tty; |
| 316 | unsigned char ch, flag; | 316 | unsigned char ch, flag; |
| @@ -367,7 +367,7 @@ receive_chars(struct uart_sunsu_port *up, unsigned char *status, struct pt_regs | |||
| 367 | else if (*status & UART_LSR_FE) | 367 | else if (*status & UART_LSR_FE) |
| 368 | flag = TTY_FRAME; | 368 | flag = TTY_FRAME; |
| 369 | } | 369 | } |
| 370 | if (uart_handle_sysrq_char(&up->port, ch, regs)) | 370 | if (uart_handle_sysrq_char(&up->port, ch)) |
| 371 | goto ignore_char; | 371 | goto ignore_char; |
| 372 | if ((*status & up->port.ignore_status_mask) == 0) | 372 | if ((*status & up->port.ignore_status_mask) == 0) |
| 373 | tty_insert_flip_char(tty, ch, flag); | 373 | tty_insert_flip_char(tty, ch, flag); |
| @@ -445,7 +445,7 @@ static void check_modem_status(struct uart_sunsu_port *up) | |||
| 445 | wake_up_interruptible(&up->port.info->delta_msr_wait); | 445 | wake_up_interruptible(&up->port.info->delta_msr_wait); |
| 446 | } | 446 | } |
| 447 | 447 | ||
| 448 | static irqreturn_t sunsu_serial_interrupt(int irq, void *dev_id, struct pt_regs *regs) | 448 | static irqreturn_t sunsu_serial_interrupt(int irq, void *dev_id) |
| 449 | { | 449 | { |
| 450 | struct uart_sunsu_port *up = dev_id; | 450 | struct uart_sunsu_port *up = dev_id; |
| 451 | unsigned long flags; | 451 | unsigned long flags; |
| @@ -459,7 +459,7 @@ static irqreturn_t sunsu_serial_interrupt(int irq, void *dev_id, struct pt_regs | |||
| 459 | status = serial_inp(up, UART_LSR); | 459 | status = serial_inp(up, UART_LSR); |
| 460 | tty = NULL; | 460 | tty = NULL; |
| 461 | if (status & UART_LSR_DR) | 461 | if (status & UART_LSR_DR) |
| 462 | tty = receive_chars(up, &status, regs); | 462 | tty = receive_chars(up, &status); |
| 463 | check_modem_status(up); | 463 | check_modem_status(up); |
| 464 | if (status & UART_LSR_THRE) | 464 | if (status & UART_LSR_THRE) |
| 465 | transmit_chars(up); | 465 | transmit_chars(up); |
| @@ -497,7 +497,7 @@ static void sunsu_change_mouse_baud(struct uart_sunsu_port *up) | |||
| 497 | sunsu_change_speed(&up->port, up->cflag, 0, quot); | 497 | sunsu_change_speed(&up->port, up->cflag, 0, quot); |
| 498 | } | 498 | } |
| 499 | 499 | ||
| 500 | static void receive_kbd_ms_chars(struct uart_sunsu_port *up, struct pt_regs *regs, int is_break) | 500 | static void receive_kbd_ms_chars(struct uart_sunsu_port *up, int is_break) |
| 501 | { | 501 | { |
| 502 | do { | 502 | do { |
| 503 | unsigned char ch = serial_inp(up, UART_RX); | 503 | unsigned char ch = serial_inp(up, UART_RX); |
| @@ -505,7 +505,7 @@ static void receive_kbd_ms_chars(struct uart_sunsu_port *up, struct pt_regs *reg | |||
| 505 | /* Stop-A is handled by drivers/char/keyboard.c now. */ | 505 | /* Stop-A is handled by drivers/char/keyboard.c now. */ |
| 506 | if (up->su_type == SU_PORT_KBD) { | 506 | if (up->su_type == SU_PORT_KBD) { |
| 507 | #ifdef CONFIG_SERIO | 507 | #ifdef CONFIG_SERIO |
| 508 | serio_interrupt(&up->serio, ch, 0, regs); | 508 | serio_interrupt(&up->serio, ch, 0); |
| 509 | #endif | 509 | #endif |
| 510 | } else if (up->su_type == SU_PORT_MS) { | 510 | } else if (up->su_type == SU_PORT_MS) { |
| 511 | int ret = suncore_mouse_baud_detection(ch, is_break); | 511 | int ret = suncore_mouse_baud_detection(ch, is_break); |
| @@ -519,7 +519,7 @@ static void receive_kbd_ms_chars(struct uart_sunsu_port *up, struct pt_regs *reg | |||
| 519 | 519 | ||
| 520 | case 0: | 520 | case 0: |
| 521 | #ifdef CONFIG_SERIO | 521 | #ifdef CONFIG_SERIO |
| 522 | serio_interrupt(&up->serio, ch, 0, regs); | 522 | serio_interrupt(&up->serio, ch, 0); |
| 523 | #endif | 523 | #endif |
| 524 | break; | 524 | break; |
| 525 | }; | 525 | }; |
| @@ -527,7 +527,7 @@ static void receive_kbd_ms_chars(struct uart_sunsu_port *up, struct pt_regs *reg | |||
| 527 | } while (serial_in(up, UART_LSR) & UART_LSR_DR); | 527 | } while (serial_in(up, UART_LSR) & UART_LSR_DR); |
| 528 | } | 528 | } |
| 529 | 529 | ||
| 530 | static irqreturn_t sunsu_kbd_ms_interrupt(int irq, void *dev_id, struct pt_regs *regs) | 530 | static irqreturn_t sunsu_kbd_ms_interrupt(int irq, void *dev_id) |
| 531 | { | 531 | { |
| 532 | struct uart_sunsu_port *up = dev_id; | 532 | struct uart_sunsu_port *up = dev_id; |
| 533 | 533 | ||
| @@ -535,8 +535,7 @@ static irqreturn_t sunsu_kbd_ms_interrupt(int irq, void *dev_id, struct pt_regs | |||
| 535 | unsigned char status = serial_inp(up, UART_LSR); | 535 | unsigned char status = serial_inp(up, UART_LSR); |
| 536 | 536 | ||
| 537 | if ((status & UART_LSR_DR) || (status & UART_LSR_BI)) | 537 | if ((status & UART_LSR_DR) || (status & UART_LSR_BI)) |
| 538 | receive_kbd_ms_chars(up, regs, | 538 | receive_kbd_ms_chars(up, (status & UART_LSR_BI) != 0); |
| 539 | (status & UART_LSR_BI) != 0); | ||
| 540 | } | 539 | } |
| 541 | 540 | ||
| 542 | return IRQ_HANDLED; | 541 | return IRQ_HANDLED; |
