diff options
Diffstat (limited to 'drivers/usb/serial/usb-serial.c')
-rw-r--r-- | drivers/usb/serial/usb-serial.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index e77fbdfc782d..cf083da15eb4 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -823,7 +823,7 @@ static void port_release(struct device *dev) | |||
823 | 823 | ||
824 | static struct usb_serial * create_serial (struct usb_device *dev, | 824 | static struct usb_serial * create_serial (struct usb_device *dev, |
825 | struct usb_interface *interface, | 825 | struct usb_interface *interface, |
826 | struct usb_serial_device_type *type) | 826 | struct usb_serial_driver *driver) |
827 | { | 827 | { |
828 | struct usb_serial *serial; | 828 | struct usb_serial *serial; |
829 | 829 | ||
@@ -834,22 +834,22 @@ static struct usb_serial * create_serial (struct usb_device *dev, | |||
834 | } | 834 | } |
835 | memset (serial, 0, sizeof(*serial)); | 835 | memset (serial, 0, sizeof(*serial)); |
836 | serial->dev = usb_get_dev(dev); | 836 | serial->dev = usb_get_dev(dev); |
837 | serial->type = type; | 837 | serial->type = driver; |
838 | serial->interface = interface; | 838 | serial->interface = interface; |
839 | kref_init(&serial->kref); | 839 | kref_init(&serial->kref); |
840 | 840 | ||
841 | return serial; | 841 | return serial; |
842 | } | 842 | } |
843 | 843 | ||
844 | static struct usb_serial_device_type *search_serial_device(struct usb_interface *iface) | 844 | static struct usb_serial_driver *search_serial_device(struct usb_interface *iface) |
845 | { | 845 | { |
846 | struct list_head *p; | 846 | struct list_head *p; |
847 | const struct usb_device_id *id; | 847 | const struct usb_device_id *id; |
848 | struct usb_serial_device_type *t; | 848 | struct usb_serial_driver *t; |
849 | 849 | ||
850 | /* List trough know devices and see if the usb id matches */ | 850 | /* List trough know devices and see if the usb id matches */ |
851 | list_for_each(p, &usb_serial_driver_list) { | 851 | list_for_each(p, &usb_serial_driver_list) { |
852 | t = list_entry(p, struct usb_serial_device_type, driver_list); | 852 | t = list_entry(p, struct usb_serial_driver, driver_list); |
853 | id = usb_match_id(iface, t->id_table); | 853 | id = usb_match_id(iface, t->id_table); |
854 | if (id != NULL) { | 854 | if (id != NULL) { |
855 | dbg("descriptor matches"); | 855 | dbg("descriptor matches"); |
@@ -872,7 +872,7 @@ int usb_serial_probe(struct usb_interface *interface, | |||
872 | struct usb_endpoint_descriptor *interrupt_out_endpoint[MAX_NUM_PORTS]; | 872 | struct usb_endpoint_descriptor *interrupt_out_endpoint[MAX_NUM_PORTS]; |
873 | struct usb_endpoint_descriptor *bulk_in_endpoint[MAX_NUM_PORTS]; | 873 | struct usb_endpoint_descriptor *bulk_in_endpoint[MAX_NUM_PORTS]; |
874 | struct usb_endpoint_descriptor *bulk_out_endpoint[MAX_NUM_PORTS]; | 874 | struct usb_endpoint_descriptor *bulk_out_endpoint[MAX_NUM_PORTS]; |
875 | struct usb_serial_device_type *type = NULL; | 875 | struct usb_serial_driver *type = NULL; |
876 | int retval; | 876 | int retval; |
877 | int minor; | 877 | int minor; |
878 | int buffer_size; | 878 | int buffer_size; |
@@ -1375,7 +1375,7 @@ module_exit(usb_serial_exit); | |||
1375 | } \ | 1375 | } \ |
1376 | } while (0) | 1376 | } while (0) |
1377 | 1377 | ||
1378 | static void fixup_generic(struct usb_serial_device_type *device) | 1378 | static void fixup_generic(struct usb_serial_driver *device) |
1379 | { | 1379 | { |
1380 | set_to_generic_if_null(device, open); | 1380 | set_to_generic_if_null(device, open); |
1381 | set_to_generic_if_null(device, write); | 1381 | set_to_generic_if_null(device, write); |
@@ -1387,28 +1387,28 @@ static void fixup_generic(struct usb_serial_device_type *device) | |||
1387 | set_to_generic_if_null(device, shutdown); | 1387 | set_to_generic_if_null(device, shutdown); |
1388 | } | 1388 | } |
1389 | 1389 | ||
1390 | int usb_serial_register(struct usb_serial_device_type *new_device) | 1390 | int usb_serial_register(struct usb_serial_driver *driver) |
1391 | { | 1391 | { |
1392 | int retval; | 1392 | int retval; |
1393 | 1393 | ||
1394 | fixup_generic(new_device); | 1394 | fixup_generic(driver); |
1395 | 1395 | ||
1396 | /* Add this device to our list of devices */ | 1396 | /* Add this device to our list of devices */ |
1397 | list_add(&new_device->driver_list, &usb_serial_driver_list); | 1397 | list_add(&driver->driver_list, &usb_serial_driver_list); |
1398 | 1398 | ||
1399 | retval = usb_serial_bus_register(new_device); | 1399 | retval = usb_serial_bus_register(driver); |
1400 | if (retval) { | 1400 | if (retval) { |
1401 | err("problem %d when registering driver %s", retval, new_device->name); | 1401 | err("problem %d when registering driver %s", retval, driver->name); |
1402 | list_del(&new_device->driver_list); | 1402 | list_del(&driver->driver_list); |
1403 | } | 1403 | } |
1404 | else | 1404 | else |
1405 | info("USB Serial support registered for %s", new_device->name); | 1405 | info("USB Serial support registered for %s", driver->name); |
1406 | 1406 | ||
1407 | return retval; | 1407 | return retval; |
1408 | } | 1408 | } |
1409 | 1409 | ||
1410 | 1410 | ||
1411 | void usb_serial_deregister(struct usb_serial_device_type *device) | 1411 | void usb_serial_deregister(struct usb_serial_driver *device) |
1412 | { | 1412 | { |
1413 | info("USB Serial deregistering driver %s", device->name); | 1413 | info("USB Serial deregistering driver %s", device->name); |
1414 | list_del(&device->driver_list); | 1414 | list_del(&device->driver_list); |