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.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c
index 4d1cd7aeccd3..154c7d290597 100644
--- a/drivers/usb/serial/whiteheat.c
+++ b/drivers/usb/serial/whiteheat.c
@@ -227,6 +227,7 @@ struct whiteheat_private {
227 struct list_head rx_urbs_submitted; 227 struct list_head rx_urbs_submitted;
228 struct list_head rx_urb_q; 228 struct list_head rx_urb_q;
229 struct work_struct rx_work; 229 struct work_struct rx_work;
230 struct usb_serial_port *port;
230 struct list_head tx_urbs_free; 231 struct list_head tx_urbs_free;
231 struct list_head tx_urbs_submitted; 232 struct list_head tx_urbs_submitted;
232}; 233};
@@ -241,7 +242,7 @@ static void command_port_read_callback(struct urb *urb);
241static int start_port_read(struct usb_serial_port *port); 242static int start_port_read(struct usb_serial_port *port);
242static struct whiteheat_urb_wrap *urb_to_wrap(struct urb *urb, struct list_head *head); 243static struct whiteheat_urb_wrap *urb_to_wrap(struct urb *urb, struct list_head *head);
243static struct list_head *list_first(struct list_head *head); 244static struct list_head *list_first(struct list_head *head);
244static void rx_data_softint(void *private); 245static void rx_data_softint(struct work_struct *work);
245 246
246static int firm_send_command(struct usb_serial_port *port, __u8 command, __u8 *data, __u8 datasize); 247static int firm_send_command(struct usb_serial_port *port, __u8 command, __u8 *data, __u8 datasize);
247static int firm_open(struct usb_serial_port *port); 248static int firm_open(struct usb_serial_port *port);
@@ -424,7 +425,8 @@ static int whiteheat_attach (struct usb_serial *serial)
424 spin_lock_init(&info->lock); 425 spin_lock_init(&info->lock);
425 info->flags = 0; 426 info->flags = 0;
426 info->mcr = 0; 427 info->mcr = 0;
427 INIT_WORK(&info->rx_work, rx_data_softint, port); 428 INIT_WORK(&info->rx_work, rx_data_softint);
429 info->port = port;
428 430
429 INIT_LIST_HEAD(&info->rx_urbs_free); 431 INIT_LIST_HEAD(&info->rx_urbs_free);
430 INIT_LIST_HEAD(&info->rx_urbs_submitted); 432 INIT_LIST_HEAD(&info->rx_urbs_submitted);
@@ -949,7 +951,7 @@ static void whiteheat_unthrottle (struct usb_serial_port *port)
949 spin_unlock_irqrestore(&info->lock, flags); 951 spin_unlock_irqrestore(&info->lock, flags);
950 952
951 if (actually_throttled) 953 if (actually_throttled)
952 rx_data_softint(port); 954 rx_data_softint(&info->rx_work);
953 955
954 return; 956 return;
955} 957}
@@ -1400,10 +1402,11 @@ static struct list_head *list_first(struct list_head *head)
1400} 1402}
1401 1403
1402 1404
1403static void rx_data_softint(void *private) 1405static void rx_data_softint(struct work_struct *work)
1404{ 1406{
1405 struct usb_serial_port *port = (struct usb_serial_port *)private; 1407 struct whiteheat_private *info =
1406 struct whiteheat_private *info = usb_get_serial_port_data(port); 1408 container_of(work, struct whiteheat_private, rx_work);
1409 struct usb_serial_port *port = info->port;
1407 struct tty_struct *tty = port->tty; 1410 struct tty_struct *tty = port->tty;
1408 struct whiteheat_urb_wrap *wrap; 1411 struct whiteheat_urb_wrap *wrap;
1409 struct urb *urb; 1412 struct urb *urb;