aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/whiteheat.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/whiteheat.c')
-rw-r--r--drivers/usb/serial/whiteheat.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
index 347caad47a12..7eb34cd6b579 100644
--- a/drivers/usb/serial/whiteheat.c
+++ b/drivers/usb/serial/whiteheat.c
@@ -462,7 +462,7 @@ static int whiteheat_ioctl(struct tty_struct *tty,
462 memset(&serstruct, 0, sizeof(serstruct)); 462 memset(&serstruct, 0, sizeof(serstruct));
463 serstruct.type = PORT_16654; 463 serstruct.type = PORT_16654;
464 serstruct.line = port->serial->minor; 464 serstruct.line = port->serial->minor;
465 serstruct.port = port->number; 465 serstruct.port = port->port_number;
466 serstruct.flags = ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ; 466 serstruct.flags = ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ;
467 serstruct.xmit_fifo_size = kfifo_size(&port->write_fifo); 467 serstruct.xmit_fifo_size = kfifo_size(&port->write_fifo);
468 serstruct.custom_divisor = 0; 468 serstruct.custom_divisor = 0;
@@ -626,7 +626,7 @@ static int firm_open(struct usb_serial_port *port)
626{ 626{
627 struct whiteheat_simple open_command; 627 struct whiteheat_simple open_command;
628 628
629 open_command.port = port->number - port->serial->minor + 1; 629 open_command.port = port->port_number + 1;
630 return firm_send_command(port, WHITEHEAT_OPEN, 630 return firm_send_command(port, WHITEHEAT_OPEN,
631 (__u8 *)&open_command, sizeof(open_command)); 631 (__u8 *)&open_command, sizeof(open_command));
632} 632}
@@ -636,7 +636,7 @@ static int firm_close(struct usb_serial_port *port)
636{ 636{
637 struct whiteheat_simple close_command; 637 struct whiteheat_simple close_command;
638 638
639 close_command.port = port->number - port->serial->minor + 1; 639 close_command.port = port->port_number + 1;
640 return firm_send_command(port, WHITEHEAT_CLOSE, 640 return firm_send_command(port, WHITEHEAT_CLOSE,
641 (__u8 *)&close_command, sizeof(close_command)); 641 (__u8 *)&close_command, sizeof(close_command));
642} 642}
@@ -649,7 +649,7 @@ static void firm_setup_port(struct tty_struct *tty)
649 struct whiteheat_port_settings port_settings; 649 struct whiteheat_port_settings port_settings;
650 unsigned int cflag = tty->termios.c_cflag; 650 unsigned int cflag = tty->termios.c_cflag;
651 651
652 port_settings.port = port->number - port->serial->minor + 1; 652 port_settings.port = port->port_number + 1;
653 653
654 /* get the byte size */ 654 /* get the byte size */
655 switch (cflag & CSIZE) { 655 switch (cflag & CSIZE) {
@@ -726,7 +726,7 @@ static int firm_set_rts(struct usb_serial_port *port, __u8 onoff)
726{ 726{
727 struct whiteheat_set_rdb rts_command; 727 struct whiteheat_set_rdb rts_command;
728 728
729 rts_command.port = port->number - port->serial->minor + 1; 729 rts_command.port = port->port_number + 1;
730 rts_command.state = onoff; 730 rts_command.state = onoff;
731 return firm_send_command(port, WHITEHEAT_SET_RTS, 731 return firm_send_command(port, WHITEHEAT_SET_RTS,
732 (__u8 *)&rts_command, sizeof(rts_command)); 732 (__u8 *)&rts_command, sizeof(rts_command));
@@ -737,7 +737,7 @@ static int firm_set_dtr(struct usb_serial_port *port, __u8 onoff)
737{ 737{
738 struct whiteheat_set_rdb dtr_command; 738 struct whiteheat_set_rdb dtr_command;
739 739
740 dtr_command.port = port->number - port->serial->minor + 1; 740 dtr_command.port = port->port_number + 1;
741 dtr_command.state = onoff; 741 dtr_command.state = onoff;
742 return firm_send_command(port, WHITEHEAT_SET_DTR, 742 return firm_send_command(port, WHITEHEAT_SET_DTR,
743 (__u8 *)&dtr_command, sizeof(dtr_command)); 743 (__u8 *)&dtr_command, sizeof(dtr_command));
@@ -748,7 +748,7 @@ static int firm_set_break(struct usb_serial_port *port, __u8 onoff)
748{ 748{
749 struct whiteheat_set_rdb break_command; 749 struct whiteheat_set_rdb break_command;
750 750
751 break_command.port = port->number - port->serial->minor + 1; 751 break_command.port = port->port_number + 1;
752 break_command.state = onoff; 752 break_command.state = onoff;
753 return firm_send_command(port, WHITEHEAT_SET_BREAK, 753 return firm_send_command(port, WHITEHEAT_SET_BREAK,
754 (__u8 *)&break_command, sizeof(break_command)); 754 (__u8 *)&break_command, sizeof(break_command));
@@ -759,7 +759,7 @@ static int firm_purge(struct usb_serial_port *port, __u8 rxtx)
759{ 759{
760 struct whiteheat_purge purge_command; 760 struct whiteheat_purge purge_command;
761 761
762 purge_command.port = port->number - port->serial->minor + 1; 762 purge_command.port = port->port_number + 1;
763 purge_command.what = rxtx; 763 purge_command.what = rxtx;
764 return firm_send_command(port, WHITEHEAT_PURGE, 764 return firm_send_command(port, WHITEHEAT_PURGE,
765 (__u8 *)&purge_command, sizeof(purge_command)); 765 (__u8 *)&purge_command, sizeof(purge_command));
@@ -770,7 +770,7 @@ static int firm_get_dtr_rts(struct usb_serial_port *port)
770{ 770{
771 struct whiteheat_simple get_dr_command; 771 struct whiteheat_simple get_dr_command;
772 772
773 get_dr_command.port = port->number - port->serial->minor + 1; 773 get_dr_command.port = port->port_number + 1;
774 return firm_send_command(port, WHITEHEAT_GET_DTR_RTS, 774 return firm_send_command(port, WHITEHEAT_GET_DTR_RTS,
775 (__u8 *)&get_dr_command, sizeof(get_dr_command)); 775 (__u8 *)&get_dr_command, sizeof(get_dr_command));
776} 776}
@@ -780,7 +780,7 @@ static int firm_report_tx_done(struct usb_serial_port *port)
780{ 780{
781 struct whiteheat_simple close_command; 781 struct whiteheat_simple close_command;
782 782
783 close_command.port = port->number - port->serial->minor + 1; 783 close_command.port = port->port_number + 1;
784 return firm_send_command(port, WHITEHEAT_REPORT_TX_DONE, 784 return firm_send_command(port, WHITEHEAT_REPORT_TX_DONE,
785 (__u8 *)&close_command, sizeof(close_command)); 785 (__u8 *)&close_command, sizeof(close_command));
786} 786}