diff options
author | Johan Hovold <jhovold@gmail.com> | 2012-05-30 06:24:59 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-06-13 17:53:03 -0400 |
commit | a276400d14bb5b98a5db1d87bbee7b1621abe4a1 (patch) | |
tree | 9fd43fe829a1748a17165f9ef33d8a34f0ec5567 /drivers/usb/serial | |
parent | c2e935a7db6e7354e9dd138b7f6f4c53affc09d9 (diff) |
USB: option: use usb_{get,set}_serial_data
Use usb_{get,set}_serial_data to access usb-serial data.
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r-- | drivers/usb/serial/option.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 1aae9028cd0b..6cb40ec52532 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -1347,12 +1347,15 @@ static int option_probe(struct usb_serial *serial, | |||
1347 | serial->interface->cur_altsetting->desc.bInterfaceClass != USB_CLASS_CDC_DATA) | 1347 | serial->interface->cur_altsetting->desc.bInterfaceClass != USB_CLASS_CDC_DATA) |
1348 | return -ENODEV; | 1348 | return -ENODEV; |
1349 | 1349 | ||
1350 | data = serial->private = kzalloc(sizeof(struct usb_wwan_intf_private), GFP_KERNEL); | 1350 | data = kzalloc(sizeof(struct usb_wwan_intf_private), GFP_KERNEL); |
1351 | if (!data) | 1351 | if (!data) |
1352 | return -ENOMEM; | 1352 | return -ENOMEM; |
1353 | data->send_setup = option_send_setup; | 1353 | data->send_setup = option_send_setup; |
1354 | spin_lock_init(&data->susp_lock); | 1354 | spin_lock_init(&data->susp_lock); |
1355 | data->private = (void *)id->driver_info; | 1355 | data->private = (void *)id->driver_info; |
1356 | |||
1357 | usb_set_serial_data(serial, data); | ||
1358 | |||
1356 | return 0; | 1359 | return 0; |
1357 | } | 1360 | } |
1358 | 1361 | ||
@@ -1419,8 +1422,7 @@ static void option_instat_callback(struct urb *urb) | |||
1419 | static int option_send_setup(struct usb_serial_port *port) | 1422 | static int option_send_setup(struct usb_serial_port *port) |
1420 | { | 1423 | { |
1421 | struct usb_serial *serial = port->serial; | 1424 | struct usb_serial *serial = port->serial; |
1422 | struct usb_wwan_intf_private *intfdata = | 1425 | struct usb_wwan_intf_private *intfdata = usb_get_serial_data(serial); |
1423 | (struct usb_wwan_intf_private *) serial->private; | ||
1424 | struct option_port_private *portdata; | 1426 | struct option_port_private *portdata; |
1425 | int ifNum = serial->interface->cur_altsetting->desc.bInterfaceNumber; | 1427 | int ifNum = serial->interface->cur_altsetting->desc.bInterfaceNumber; |
1426 | int val = 0; | 1428 | int val = 0; |