diff options
Diffstat (limited to 'drivers/usb/serial/usb-serial.c')
| -rw-r--r-- | drivers/usb/serial/usb-serial.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 0267b26dde18..e77fbdfc782d 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
| @@ -531,7 +531,7 @@ bailout_kref_put: | |||
| 531 | 531 | ||
| 532 | static void serial_close(struct tty_struct *tty, struct file * filp) | 532 | static void serial_close(struct tty_struct *tty, struct file * filp) |
| 533 | { | 533 | { |
| 534 | struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data; | 534 | struct usb_serial_port *port = tty->driver_data; |
| 535 | 535 | ||
| 536 | if (!port) | 536 | if (!port) |
| 537 | return; | 537 | return; |
| @@ -561,7 +561,7 @@ static void serial_close(struct tty_struct *tty, struct file * filp) | |||
| 561 | 561 | ||
| 562 | static int serial_write (struct tty_struct * tty, const unsigned char *buf, int count) | 562 | static int serial_write (struct tty_struct * tty, const unsigned char *buf, int count) |
| 563 | { | 563 | { |
| 564 | struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data; | 564 | struct usb_serial_port *port = tty->driver_data; |
| 565 | int retval = -EINVAL; | 565 | int retval = -EINVAL; |
| 566 | 566 | ||
| 567 | dbg("%s - port %d, %d byte(s)", __FUNCTION__, port->number, count); | 567 | dbg("%s - port %d, %d byte(s)", __FUNCTION__, port->number, count); |
| @@ -580,7 +580,7 @@ exit: | |||
| 580 | 580 | ||
| 581 | static int serial_write_room (struct tty_struct *tty) | 581 | static int serial_write_room (struct tty_struct *tty) |
| 582 | { | 582 | { |
| 583 | struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data; | 583 | struct usb_serial_port *port = tty->driver_data; |
| 584 | int retval = -EINVAL; | 584 | int retval = -EINVAL; |
| 585 | 585 | ||
| 586 | dbg("%s - port %d", __FUNCTION__, port->number); | 586 | dbg("%s - port %d", __FUNCTION__, port->number); |
| @@ -599,7 +599,7 @@ exit: | |||
| 599 | 599 | ||
| 600 | static int serial_chars_in_buffer (struct tty_struct *tty) | 600 | static int serial_chars_in_buffer (struct tty_struct *tty) |
| 601 | { | 601 | { |
| 602 | struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data; | 602 | struct usb_serial_port *port = tty->driver_data; |
| 603 | int retval = -EINVAL; | 603 | int retval = -EINVAL; |
| 604 | 604 | ||
| 605 | dbg("%s = port %d", __FUNCTION__, port->number); | 605 | dbg("%s = port %d", __FUNCTION__, port->number); |
| @@ -618,7 +618,7 @@ exit: | |||
| 618 | 618 | ||
| 619 | static void serial_throttle (struct tty_struct * tty) | 619 | static void serial_throttle (struct tty_struct * tty) |
| 620 | { | 620 | { |
| 621 | struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data; | 621 | struct usb_serial_port *port = tty->driver_data; |
| 622 | 622 | ||
| 623 | dbg("%s - port %d", __FUNCTION__, port->number); | 623 | dbg("%s - port %d", __FUNCTION__, port->number); |
| 624 | 624 | ||
| @@ -634,7 +634,7 @@ static void serial_throttle (struct tty_struct * tty) | |||
| 634 | 634 | ||
| 635 | static void serial_unthrottle (struct tty_struct * tty) | 635 | static void serial_unthrottle (struct tty_struct * tty) |
| 636 | { | 636 | { |
| 637 | struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data; | 637 | struct usb_serial_port *port = tty->driver_data; |
| 638 | 638 | ||
| 639 | dbg("%s - port %d", __FUNCTION__, port->number); | 639 | dbg("%s - port %d", __FUNCTION__, port->number); |
| 640 | 640 | ||
| @@ -650,7 +650,7 @@ static void serial_unthrottle (struct tty_struct * tty) | |||
| 650 | 650 | ||
| 651 | static int serial_ioctl (struct tty_struct *tty, struct file * file, unsigned int cmd, unsigned long arg) | 651 | static int serial_ioctl (struct tty_struct *tty, struct file * file, unsigned int cmd, unsigned long arg) |
| 652 | { | 652 | { |
| 653 | struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data; | 653 | struct usb_serial_port *port = tty->driver_data; |
| 654 | int retval = -ENODEV; | 654 | int retval = -ENODEV; |
| 655 | 655 | ||
| 656 | dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd); | 656 | dbg("%s - port %d, cmd 0x%.4x", __FUNCTION__, port->number, cmd); |
| @@ -672,7 +672,7 @@ exit: | |||
| 672 | 672 | ||
| 673 | static void serial_set_termios (struct tty_struct *tty, struct termios * old) | 673 | static void serial_set_termios (struct tty_struct *tty, struct termios * old) |
| 674 | { | 674 | { |
| 675 | struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data; | 675 | struct usb_serial_port *port = tty->driver_data; |
| 676 | 676 | ||
| 677 | dbg("%s - port %d", __FUNCTION__, port->number); | 677 | dbg("%s - port %d", __FUNCTION__, port->number); |
| 678 | 678 | ||
| @@ -688,7 +688,7 @@ static void serial_set_termios (struct tty_struct *tty, struct termios * old) | |||
| 688 | 688 | ||
| 689 | static void serial_break (struct tty_struct *tty, int break_state) | 689 | static void serial_break (struct tty_struct *tty, int break_state) |
| 690 | { | 690 | { |
| 691 | struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data; | 691 | struct usb_serial_port *port = tty->driver_data; |
| 692 | 692 | ||
| 693 | dbg("%s - port %d", __FUNCTION__, port->number); | 693 | dbg("%s - port %d", __FUNCTION__, port->number); |
| 694 | 694 | ||
| @@ -749,7 +749,7 @@ done: | |||
| 749 | 749 | ||
| 750 | static int serial_tiocmget (struct tty_struct *tty, struct file *file) | 750 | static int serial_tiocmget (struct tty_struct *tty, struct file *file) |
| 751 | { | 751 | { |
| 752 | struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data; | 752 | struct usb_serial_port *port = tty->driver_data; |
| 753 | 753 | ||
| 754 | dbg("%s - port %d", __FUNCTION__, port->number); | 754 | dbg("%s - port %d", __FUNCTION__, port->number); |
| 755 | 755 | ||
| @@ -768,7 +768,7 @@ exit: | |||
| 768 | static int serial_tiocmset (struct tty_struct *tty, struct file *file, | 768 | static int serial_tiocmset (struct tty_struct *tty, struct file *file, |
| 769 | unsigned int set, unsigned int clear) | 769 | unsigned int set, unsigned int clear) |
| 770 | { | 770 | { |
| 771 | struct usb_serial_port *port = (struct usb_serial_port *) tty->driver_data; | 771 | struct usb_serial_port *port = tty->driver_data; |
| 772 | 772 | ||
| 773 | dbg("%s - port %d", __FUNCTION__, port->number); | 773 | dbg("%s - port %d", __FUNCTION__, port->number); |
| 774 | 774 | ||
| @@ -786,7 +786,7 @@ exit: | |||
| 786 | 786 | ||
| 787 | void usb_serial_port_softint(void *private) | 787 | void usb_serial_port_softint(void *private) |
| 788 | { | 788 | { |
| 789 | struct usb_serial_port *port = (struct usb_serial_port *)private; | 789 | struct usb_serial_port *port = private; |
| 790 | struct tty_struct *tty; | 790 | struct tty_struct *tty; |
| 791 | 791 | ||
| 792 | dbg("%s - port %d", __FUNCTION__, port->number); | 792 | dbg("%s - port %d", __FUNCTION__, port->number); |
