aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2006-08-29 23:07:04 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-27 14:58:58 -0400
commit9aa8dae7b1fa7af099a403fc3766e068a0ea6d68 (patch)
tree83976cac5a3ee6277a8d0fdcdd76d1e29576fbc1
parent0257fa9ffe4f0287a9d90476bb733cfc2272396e (diff)
cypress_m8: use usb_fill_int_urb where appropriate
Rather than directly filling in URB fields, it's safer to use usb_fill_int_urb(). This improves robustness of the driver; URB changes in the future will not go uninitialized here. That point not withstanding, this driver should at least be self-consistent. Either use usb_fill_int_urb() everywhere or don't bother with it all. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/usb/serial/cypress_m8.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c
index 40cfbe1d3517..741dcec36d41 100644
--- a/drivers/usb/serial/cypress_m8.c
+++ b/drivers/usb/serial/cypress_m8.c
@@ -820,9 +820,10 @@ send:
820 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, port->interrupt_out_size, 820 usb_serial_debug_data(debug, &port->dev, __FUNCTION__, port->interrupt_out_size,
821 port->interrupt_out_urb->transfer_buffer); 821 port->interrupt_out_urb->transfer_buffer);
822 822
823 port->interrupt_out_urb->transfer_buffer_length = actual_size; 823 usb_fill_int_urb(port->interrupt_out_urb, port->serial->dev,
824 port->interrupt_out_urb->dev = port->serial->dev; 824 usb_sndintpipe(port->serial->dev, port->interrupt_out_endpointAddress),
825 port->interrupt_out_urb->interval = priv->write_urb_interval; 825 port->interrupt_out_buffer, port->interrupt_out_size,
826 cypress_write_int_callback, port, priv->write_urb_interval);
826 result = usb_submit_urb (port->interrupt_out_urb, GFP_ATOMIC); 827 result = usb_submit_urb (port->interrupt_out_urb, GFP_ATOMIC);
827 if (result) { 828 if (result) {
828 dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, 829 dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__,