diff options
author | David Howells <dhowells@redhat.com> | 2006-11-22 09:57:56 -0500 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2006-11-22 09:57:56 -0500 |
commit | c4028958b6ecad064b1a6303a6a5906d4fe48d73 (patch) | |
tree | 1c4c89652c62a75da09f9b9442012007e4ac6250 /drivers/usb/serial/ftdi_sio.c | |
parent | 65f27f38446e1976cc98fd3004b110fedcddd189 (diff) |
WorkStruct: make allyesconfig
Fix up for make allyesconfig.
Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'drivers/usb/serial/ftdi_sio.c')
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index c186b4e73c72..88ed5c1d236c 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -559,7 +559,8 @@ struct ftdi_private { | |||
559 | char prev_status, diff_status; /* Used for TIOCMIWAIT */ | 559 | char prev_status, diff_status; /* Used for TIOCMIWAIT */ |
560 | __u8 rx_flags; /* receive state flags (throttling) */ | 560 | __u8 rx_flags; /* receive state flags (throttling) */ |
561 | spinlock_t rx_lock; /* spinlock for receive state */ | 561 | spinlock_t rx_lock; /* spinlock for receive state */ |
562 | struct work_struct rx_work; | 562 | struct delayed_work rx_work; |
563 | struct usb_serial_port *port; | ||
563 | int rx_processed; | 564 | int rx_processed; |
564 | unsigned long rx_bytes; | 565 | unsigned long rx_bytes; |
565 | 566 | ||
@@ -593,7 +594,7 @@ static int ftdi_write_room (struct usb_serial_port *port); | |||
593 | static int ftdi_chars_in_buffer (struct usb_serial_port *port); | 594 | static int ftdi_chars_in_buffer (struct usb_serial_port *port); |
594 | static void ftdi_write_bulk_callback (struct urb *urb); | 595 | static void ftdi_write_bulk_callback (struct urb *urb); |
595 | static void ftdi_read_bulk_callback (struct urb *urb); | 596 | static void ftdi_read_bulk_callback (struct urb *urb); |
596 | static void ftdi_process_read (void *param); | 597 | static void ftdi_process_read (struct work_struct *work); |
597 | static void ftdi_set_termios (struct usb_serial_port *port, struct termios * old); | 598 | static void ftdi_set_termios (struct usb_serial_port *port, struct termios * old); |
598 | static int ftdi_tiocmget (struct usb_serial_port *port, struct file *file); | 599 | static int ftdi_tiocmget (struct usb_serial_port *port, struct file *file); |
599 | static int ftdi_tiocmset (struct usb_serial_port *port, struct file * file, unsigned int set, unsigned int clear); | 600 | static int ftdi_tiocmset (struct usb_serial_port *port, struct file * file, unsigned int set, unsigned int clear); |
@@ -1201,7 +1202,8 @@ static int ftdi_sio_attach (struct usb_serial *serial) | |||
1201 | port->read_urb->transfer_buffer_length = BUFSZ; | 1202 | port->read_urb->transfer_buffer_length = BUFSZ; |
1202 | } | 1203 | } |
1203 | 1204 | ||
1204 | INIT_WORK(&priv->rx_work, ftdi_process_read, port); | 1205 | INIT_DELAYED_WORK(&priv->rx_work, ftdi_process_read); |
1206 | priv->port = port; | ||
1205 | 1207 | ||
1206 | /* Free port's existing write urb and transfer buffer. */ | 1208 | /* Free port's existing write urb and transfer buffer. */ |
1207 | if (port->write_urb) { | 1209 | if (port->write_urb) { |
@@ -1641,17 +1643,18 @@ static void ftdi_read_bulk_callback (struct urb *urb) | |||
1641 | priv->rx_bytes += countread; | 1643 | priv->rx_bytes += countread; |
1642 | spin_unlock_irqrestore(&priv->rx_lock, flags); | 1644 | spin_unlock_irqrestore(&priv->rx_lock, flags); |
1643 | 1645 | ||
1644 | ftdi_process_read(port); | 1646 | ftdi_process_read(&priv->rx_work.work); |
1645 | 1647 | ||
1646 | } /* ftdi_read_bulk_callback */ | 1648 | } /* ftdi_read_bulk_callback */ |
1647 | 1649 | ||
1648 | 1650 | ||
1649 | static void ftdi_process_read (void *param) | 1651 | static void ftdi_process_read (struct work_struct *work) |
1650 | { /* ftdi_process_read */ | 1652 | { /* ftdi_process_read */ |
1651 | struct usb_serial_port *port = (struct usb_serial_port*)param; | 1653 | struct ftdi_private *priv = |
1654 | container_of(work, struct ftdi_private, rx_work.work); | ||
1655 | struct usb_serial_port *port = priv->port; | ||
1652 | struct urb *urb; | 1656 | struct urb *urb; |
1653 | struct tty_struct *tty; | 1657 | struct tty_struct *tty; |
1654 | struct ftdi_private *priv; | ||
1655 | char error_flag; | 1658 | char error_flag; |
1656 | unsigned char *data; | 1659 | unsigned char *data; |
1657 | 1660 | ||
@@ -2180,7 +2183,7 @@ static void ftdi_unthrottle (struct usb_serial_port *port) | |||
2180 | spin_unlock_irqrestore(&priv->rx_lock, flags); | 2183 | spin_unlock_irqrestore(&priv->rx_lock, flags); |
2181 | 2184 | ||
2182 | if (actually_throttled) | 2185 | if (actually_throttled) |
2183 | schedule_work(&priv->rx_work); | 2186 | schedule_delayed_work(&priv->rx_work, 0); |
2184 | } | 2187 | } |
2185 | 2188 | ||
2186 | static int __init ftdi_init (void) | 2189 | static int __init ftdi_init (void) |