diff options
Diffstat (limited to 'drivers/char/esp.c')
-rw-r--r-- | drivers/char/esp.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/char/esp.c b/drivers/char/esp.c index afcd83d9984b..d1bfbaa2aa02 100644 --- a/drivers/char/esp.c +++ b/drivers/char/esp.c | |||
@@ -615,8 +615,7 @@ static inline void check_modem_status(struct esp_struct *info) | |||
615 | /* | 615 | /* |
616 | * This is the serial driver's interrupt routine | 616 | * This is the serial driver's interrupt routine |
617 | */ | 617 | */ |
618 | static irqreturn_t rs_interrupt_single(int irq, void *dev_id, | 618 | static irqreturn_t rs_interrupt_single(int irq, void *dev_id) |
619 | struct pt_regs *regs) | ||
620 | { | 619 | { |
621 | struct esp_struct * info; | 620 | struct esp_struct * info; |
622 | unsigned err_status; | 621 | unsigned err_status; |
@@ -724,9 +723,10 @@ static irqreturn_t rs_interrupt_single(int irq, void *dev_id, | |||
724 | * ------------------------------------------------------------------- | 723 | * ------------------------------------------------------------------- |
725 | */ | 724 | */ |
726 | 725 | ||
727 | static void do_softint(void *private_) | 726 | static void do_softint(struct work_struct *work) |
728 | { | 727 | { |
729 | struct esp_struct *info = (struct esp_struct *) private_; | 728 | struct esp_struct *info = |
729 | container_of(work, struct esp_struct, tqueue); | ||
730 | struct tty_struct *tty; | 730 | struct tty_struct *tty; |
731 | 731 | ||
732 | tty = info->tty; | 732 | tty = info->tty; |
@@ -747,9 +747,10 @@ static void do_softint(void *private_) | |||
747 | * do_serial_hangup() -> tty->hangup() -> esp_hangup() | 747 | * do_serial_hangup() -> tty->hangup() -> esp_hangup() |
748 | * | 748 | * |
749 | */ | 749 | */ |
750 | static void do_serial_hangup(void *private_) | 750 | static void do_serial_hangup(struct work_struct *work) |
751 | { | 751 | { |
752 | struct esp_struct *info = (struct esp_struct *) private_; | 752 | struct esp_struct *info = |
753 | container_of(work, struct esp_struct, tqueue_hangup); | ||
753 | struct tty_struct *tty; | 754 | struct tty_struct *tty; |
754 | 755 | ||
755 | tty = info->tty; | 756 | tty = info->tty; |
@@ -1914,7 +1915,7 @@ static int rs_ioctl(struct tty_struct *tty, struct file * file, | |||
1914 | return 0; | 1915 | return 0; |
1915 | } | 1916 | } |
1916 | 1917 | ||
1917 | static void rs_set_termios(struct tty_struct *tty, struct termios *old_termios) | 1918 | static void rs_set_termios(struct tty_struct *tty, struct ktermios *old_termios) |
1918 | { | 1919 | { |
1919 | struct esp_struct *info = (struct esp_struct *)tty->driver_data; | 1920 | struct esp_struct *info = (struct esp_struct *)tty->driver_data; |
1920 | unsigned long flags; | 1921 | unsigned long flags; |
@@ -2376,7 +2377,7 @@ static inline int autoconfig(struct esp_struct * info) | |||
2376 | return (port_detected); | 2377 | return (port_detected); |
2377 | } | 2378 | } |
2378 | 2379 | ||
2379 | static struct tty_operations esp_ops = { | 2380 | static const struct tty_operations esp_ops = { |
2380 | .open = esp_open, | 2381 | .open = esp_open, |
2381 | .close = rs_close, | 2382 | .close = rs_close, |
2382 | .write = rs_write, | 2383 | .write = rs_write, |
@@ -2502,8 +2503,8 @@ static int __init espserial_init(void) | |||
2502 | info->magic = ESP_MAGIC; | 2503 | info->magic = ESP_MAGIC; |
2503 | info->close_delay = 5*HZ/10; | 2504 | info->close_delay = 5*HZ/10; |
2504 | info->closing_wait = 30*HZ; | 2505 | info->closing_wait = 30*HZ; |
2505 | INIT_WORK(&info->tqueue, do_softint, info); | 2506 | INIT_WORK(&info->tqueue, do_softint); |
2506 | INIT_WORK(&info->tqueue_hangup, do_serial_hangup, info); | 2507 | INIT_WORK(&info->tqueue_hangup, do_serial_hangup); |
2507 | info->config.rx_timeout = rx_timeout; | 2508 | info->config.rx_timeout = rx_timeout; |
2508 | info->config.flow_on = flow_on; | 2509 | info->config.flow_on = flow_on; |
2509 | info->config.flow_off = flow_off; | 2510 | info->config.flow_off = flow_off; |