aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/aircable.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2006-11-22 09:57:56 -0500
committerDavid Howells <dhowells@redhat.com>2006-11-22 09:57:56 -0500
commitc4028958b6ecad064b1a6303a6a5906d4fe48d73 (patch)
tree1c4c89652c62a75da09f9b9442012007e4ac6250 /drivers/usb/serial/aircable.c
parent65f27f38446e1976cc98fd3004b110fedcddd189 (diff)
WorkStruct: make allyesconfig
Fix up for make allyesconfig. Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'drivers/usb/serial/aircable.c')
-rw-r--r--drivers/usb/serial/aircable.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/usb/serial/aircable.c b/drivers/usb/serial/aircable.c
index 812275509137..2a4ac9bd6a3a 100644
--- a/drivers/usb/serial/aircable.c
+++ b/drivers/usb/serial/aircable.c
@@ -92,6 +92,7 @@ struct aircable_private {
92 struct circ_buf *rx_buf; /* read buffer */ 92 struct circ_buf *rx_buf; /* read buffer */
93 int rx_flags; /* for throttilng */ 93 int rx_flags; /* for throttilng */
94 struct work_struct rx_work; /* work cue for the receiving line */ 94 struct work_struct rx_work; /* work cue for the receiving line */
95 struct usb_serial_port *port; /* USB port with which associated */
95}; 96};
96 97
97/* Private methods */ 98/* Private methods */
@@ -251,10 +252,11 @@ static void aircable_send(struct usb_serial_port *port)
251 schedule_work(&port->work); 252 schedule_work(&port->work);
252} 253}
253 254
254static void aircable_read(void *params) 255static void aircable_read(struct work_struct *work)
255{ 256{
256 struct usb_serial_port *port = params; 257 struct aircable_private *priv =
257 struct aircable_private *priv = usb_get_serial_port_data(port); 258 container_of(work, struct aircable_private, rx_work);
259 struct usb_serial_port *port = priv->port;
258 struct tty_struct *tty; 260 struct tty_struct *tty;
259 unsigned char *data; 261 unsigned char *data;
260 int count; 262 int count;
@@ -348,7 +350,8 @@ static int aircable_attach (struct usb_serial *serial)
348 } 350 }
349 351
350 priv->rx_flags &= ~(THROTTLED | ACTUALLY_THROTTLED); 352 priv->rx_flags &= ~(THROTTLED | ACTUALLY_THROTTLED);
351 INIT_WORK(&priv->rx_work, aircable_read, port); 353 priv->port = port;
354 INIT_WORK(&priv->rx_work, aircable_read);
352 355
353 usb_set_serial_port_data(serial->port[0], priv); 356 usb_set_serial_port_data(serial->port[0], priv);
354 357
@@ -515,7 +518,7 @@ static void aircable_read_bulk_callback(struct urb *urb)
515 package_length - shift); 518 package_length - shift);
516 } 519 }
517 } 520 }
518 aircable_read(port); 521 aircable_read(&priv->rx_work);
519 } 522 }
520 523
521 /* Schedule the next read _if_ we are still open */ 524 /* Schedule the next read _if_ we are still open */