mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 14:41:39 +00:00
[PATCH] USB Serial: move name to driver structure
This fixes up a lot of problems in sysfs with some of the usb serial drivers, they had incorrect driver names. Also saves a tiny ammount of memory. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
502b95c1cc
commit
269bda1c12
@ -33,8 +33,8 @@ static struct usb_driver airprime_driver = {
|
||||
static struct usb_serial_driver airprime_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "airprime",
|
||||
},
|
||||
.name = "airprime",
|
||||
.id_table = id_table,
|
||||
.num_interrupt_in = NUM_DONT_CARE,
|
||||
.num_bulk_in = NUM_DONT_CARE,
|
||||
|
@ -124,9 +124,9 @@ static struct usb_driver belkin_driver = {
|
||||
static struct usb_serial_driver belkin_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "belkin",
|
||||
},
|
||||
.name = "Belkin / Peracom / GoHubs USB Serial Adapter",
|
||||
.short_name = "belkin",
|
||||
.description = "Belkin / Peracom / GoHubs USB Serial Adapter",
|
||||
.id_table = id_table_combined,
|
||||
.num_interrupt_in = 1,
|
||||
.num_bulk_in = 1,
|
||||
|
@ -72,7 +72,7 @@ static int usb_serial_device_probe (struct device *dev)
|
||||
tty_register_device (usb_serial_tty_driver, minor, dev);
|
||||
dev_info(&port->serial->dev->dev,
|
||||
"%s converter now attached to ttyUSB%d\n",
|
||||
driver->name, minor);
|
||||
driver->description, minor);
|
||||
|
||||
exit:
|
||||
return retval;
|
||||
@ -104,7 +104,7 @@ exit:
|
||||
minor = port->number;
|
||||
tty_unregister_device (usb_serial_tty_driver, minor);
|
||||
dev_info(dev, "%s converter now disconnected from ttyUSB%d\n",
|
||||
driver->name, minor);
|
||||
driver->description, minor);
|
||||
|
||||
return retval;
|
||||
}
|
||||
@ -113,10 +113,6 @@ int usb_serial_bus_register(struct usb_serial_driver *driver)
|
||||
{
|
||||
int retval;
|
||||
|
||||
if (driver->short_name)
|
||||
driver->driver.name = (char *)driver->short_name;
|
||||
else
|
||||
driver->driver.name = (char *)driver->name;
|
||||
driver->driver.bus = &usb_serial_bus_type;
|
||||
driver->driver.probe = usb_serial_device_probe;
|
||||
driver->driver.remove = usb_serial_device_remove;
|
||||
|
@ -67,7 +67,7 @@ MODULE_DEVICE_TABLE (usb, id_table);
|
||||
|
||||
static struct usb_driver cp2101_driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "CP2101",
|
||||
.name = "cp2101",
|
||||
.probe = usb_serial_probe,
|
||||
.disconnect = usb_serial_disconnect,
|
||||
.id_table = id_table,
|
||||
@ -76,8 +76,8 @@ static struct usb_driver cp2101_driver = {
|
||||
static struct usb_serial_driver cp2101_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "cp2101",
|
||||
},
|
||||
.name = "CP2101",
|
||||
.id_table = id_table,
|
||||
.num_interrupt_in = 0,
|
||||
.num_bulk_in = 0,
|
||||
|
@ -86,9 +86,9 @@ static struct usb_driver cyberjack_driver = {
|
||||
static struct usb_serial_driver cyberjack_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "cyberjack",
|
||||
},
|
||||
.name = "Reiner SCT Cyberjack USB card reader",
|
||||
.short_name = "cyberjack",
|
||||
.description = "Reiner SCT Cyberjack USB card reader",
|
||||
.id_table = id_table,
|
||||
.num_interrupt_in = 1,
|
||||
.num_bulk_in = 1,
|
||||
|
@ -179,9 +179,9 @@ static unsigned int cypress_buf_get(struct cypress_buf *cb, char *buf, unsigne
|
||||
static struct usb_serial_driver cypress_earthmate_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "earthmate",
|
||||
},
|
||||
.name = "DeLorme Earthmate USB",
|
||||
.short_name = "earthmate",
|
||||
.description = "DeLorme Earthmate USB",
|
||||
.id_table = id_table_earthmate,
|
||||
.num_interrupt_in = 1,
|
||||
.num_interrupt_out = 1,
|
||||
@ -208,9 +208,9 @@ static struct usb_serial_driver cypress_earthmate_device = {
|
||||
static struct usb_serial_driver cypress_hidcom_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "cyphidcom",
|
||||
},
|
||||
.name = "HID->COM RS232 Adapter",
|
||||
.short_name = "cyphidcom",
|
||||
.description = "HID->COM RS232 Adapter",
|
||||
.id_table = id_table_cyphidcomrs232,
|
||||
.num_interrupt_in = 1,
|
||||
.num_interrupt_out = 1,
|
||||
|
@ -505,10 +505,10 @@ static struct usb_driver digi_driver = {
|
||||
|
||||
static struct usb_serial_driver digi_acceleport_2_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.owner = THIS_MODULE,
|
||||
.name = "digi_2",
|
||||
},
|
||||
.name = "Digi 2 port USB adapter",
|
||||
.short_name = "digi_2",
|
||||
.description = "Digi 2 port USB adapter",
|
||||
.id_table = id_table_2,
|
||||
.num_interrupt_in = 0,
|
||||
.num_bulk_in = 4,
|
||||
@ -534,10 +534,10 @@ static struct usb_serial_driver digi_acceleport_2_device = {
|
||||
|
||||
static struct usb_serial_driver digi_acceleport_4_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.owner = THIS_MODULE,
|
||||
.name = "digi_4",
|
||||
},
|
||||
.name = "Digi 4 port USB adapter",
|
||||
.short_name = "digi_4",
|
||||
.description = "Digi 4 port USB adapter",
|
||||
.id_table = id_table_4,
|
||||
.num_interrupt_in = 0,
|
||||
.num_bulk_in = 5,
|
||||
|
@ -115,8 +115,8 @@ static struct usb_driver empeg_driver = {
|
||||
static struct usb_serial_driver empeg_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "empeg",
|
||||
},
|
||||
.name = "Empeg",
|
||||
.id_table = id_table,
|
||||
.num_interrupt_in = 0,
|
||||
.num_bulk_in = 1,
|
||||
|
@ -565,9 +565,9 @@ static __u32 ftdi_232bm_baud_to_divisor (int baud);
|
||||
static struct usb_serial_driver ftdi_sio_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "ftdi_sio",
|
||||
},
|
||||
.name = "FTDI USB Serial Device",
|
||||
.short_name = "ftdi_sio",
|
||||
.description = "FTDI USB Serial Device",
|
||||
.id_table = id_table_combined,
|
||||
.num_interrupt_in = 0,
|
||||
.num_bulk_in = 1,
|
||||
|
@ -1472,9 +1472,9 @@ static void garmin_shutdown (struct usb_serial *serial)
|
||||
static struct usb_serial_driver garmin_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "garmin_gps",
|
||||
},
|
||||
.name = "Garmin GPS usb/tty",
|
||||
.short_name = "garmin_gps",
|
||||
.description = "Garmin GPS usb/tty",
|
||||
.id_table = id_table,
|
||||
.num_interrupt_in = 1,
|
||||
.num_bulk_in = 1,
|
||||
|
@ -39,9 +39,8 @@ static struct usb_device_id generic_device_ids[2]; /* Initially all zeroes. */
|
||||
struct usb_serial_driver usb_serial_generic_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "generic",
|
||||
},
|
||||
.name = "Generic",
|
||||
.short_name = "generic",
|
||||
.id_table = generic_device_ids,
|
||||
.num_interrupt_in = NUM_DONT_CARE,
|
||||
.num_bulk_in = NUM_DONT_CARE,
|
||||
|
@ -38,7 +38,7 @@ MODULE_DEVICE_TABLE(usb, id_table);
|
||||
|
||||
static struct usb_driver hp49gp_driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "HP4X",
|
||||
.name = "hp4X",
|
||||
.probe = usb_serial_probe,
|
||||
.disconnect = usb_serial_disconnect,
|
||||
.id_table = id_table,
|
||||
@ -47,8 +47,8 @@ static struct usb_driver hp49gp_driver = {
|
||||
static struct usb_serial_driver hp49gp_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "hp4X",
|
||||
},
|
||||
.name = "HP4X",
|
||||
.id_table = id_table,
|
||||
.num_interrupt_in = NUM_DONT_CARE,
|
||||
.num_bulk_in = NUM_DONT_CARE,
|
||||
|
@ -78,9 +78,9 @@ MODULE_DEVICE_TABLE (usb, id_table_combined);
|
||||
static struct usb_serial_driver edgeport_2port_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "edgeport_2",
|
||||
},
|
||||
.name = "Edgeport 2 port adapter",
|
||||
.short_name = "edgeport_2",
|
||||
.description = "Edgeport 2 port adapter",
|
||||
.id_table = edgeport_2port_id_table,
|
||||
.num_interrupt_in = 1,
|
||||
.num_bulk_in = 1,
|
||||
@ -108,9 +108,9 @@ static struct usb_serial_driver edgeport_2port_device = {
|
||||
static struct usb_serial_driver edgeport_4port_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "edgeport_4",
|
||||
},
|
||||
.name = "Edgeport 4 port adapter",
|
||||
.short_name = "edgeport_4",
|
||||
.description = "Edgeport 4 port adapter",
|
||||
.id_table = edgeport_4port_id_table,
|
||||
.num_interrupt_in = 1,
|
||||
.num_bulk_in = 1,
|
||||
@ -138,9 +138,9 @@ static struct usb_serial_driver edgeport_4port_device = {
|
||||
static struct usb_serial_driver edgeport_8port_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "edgeport_8",
|
||||
},
|
||||
.name = "Edgeport 8 port adapter",
|
||||
.short_name = "edgeport_8",
|
||||
.description = "Edgeport 8 port adapter",
|
||||
.id_table = edgeport_8port_id_table,
|
||||
.num_interrupt_in = 1,
|
||||
.num_bulk_in = 1,
|
||||
|
@ -2984,10 +2984,10 @@ static unsigned int edge_buf_get(struct edge_buf *eb, char *buf,
|
||||
|
||||
static struct usb_serial_driver edgeport_1port_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.owner = THIS_MODULE,
|
||||
.name = "edgeport_ti_1",
|
||||
},
|
||||
.name = "Edgeport TI 1 port adapter",
|
||||
.short_name = "edgeport_ti_1",
|
||||
.description = "Edgeport TI 1 port adapter",
|
||||
.id_table = edgeport_1port_id_table,
|
||||
.num_interrupt_in = 1,
|
||||
.num_bulk_in = 1,
|
||||
@ -3014,10 +3014,10 @@ static struct usb_serial_driver edgeport_1port_device = {
|
||||
|
||||
static struct usb_serial_driver edgeport_2port_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.owner = THIS_MODULE,
|
||||
.name = "edgeport_ti_2",
|
||||
},
|
||||
.name = "Edgeport TI 2 port adapter",
|
||||
.short_name = "edgeport_ti_2",
|
||||
.description = "Edgeport TI 2 port adapter",
|
||||
.id_table = edgeport_2port_id_table,
|
||||
.num_interrupt_in = 1,
|
||||
.num_bulk_in = 2,
|
||||
|
@ -550,8 +550,9 @@ static struct usb_driver ipaq_driver = {
|
||||
static struct usb_serial_driver ipaq_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "ipaq",
|
||||
},
|
||||
.name = "PocketPC PDA",
|
||||
.description = "PocketPC PDA",
|
||||
.id_table = ipaq_id_table,
|
||||
.num_interrupt_in = NUM_DONT_CARE,
|
||||
.num_bulk_in = 1,
|
||||
|
@ -446,9 +446,9 @@ static int ipw_disconnect(struct usb_serial_port *port)
|
||||
static struct usb_serial_driver ipw_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "ipw",
|
||||
},
|
||||
.name = "IPWireless converter",
|
||||
.short_name = "ipw",
|
||||
.description = "IPWireless converter",
|
||||
.id_table = usb_ipw_ids,
|
||||
.num_interrupt_in = NUM_DONT_CARE,
|
||||
.num_bulk_in = 1,
|
||||
|
@ -136,8 +136,9 @@ static struct usb_driver ir_driver = {
|
||||
static struct usb_serial_driver ir_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "ir-usb",
|
||||
},
|
||||
.name = "IR Dongle",
|
||||
.description = "IR Dongle",
|
||||
.id_table = id_table,
|
||||
.num_interrupt_in = 1,
|
||||
.num_bulk_in = 1,
|
||||
|
@ -573,9 +573,9 @@ static struct usb_device_id keyspan_4port_ids[] = {
|
||||
static struct usb_serial_driver keyspan_pre_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "keyspan_no_firm",
|
||||
},
|
||||
.name = "Keyspan - (without firmware)",
|
||||
.short_name = "keyspan_no_firm",
|
||||
.description = "Keyspan - (without firmware)",
|
||||
.id_table = keyspan_pre_ids,
|
||||
.num_interrupt_in = NUM_DONT_CARE,
|
||||
.num_bulk_in = NUM_DONT_CARE,
|
||||
@ -587,9 +587,9 @@ static struct usb_serial_driver keyspan_pre_device = {
|
||||
static struct usb_serial_driver keyspan_1port_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "keyspan_1",
|
||||
},
|
||||
.name = "Keyspan 1 port adapter",
|
||||
.short_name = "keyspan_1",
|
||||
.description = "Keyspan 1 port adapter",
|
||||
.id_table = keyspan_1port_ids,
|
||||
.num_interrupt_in = NUM_DONT_CARE,
|
||||
.num_bulk_in = NUM_DONT_CARE,
|
||||
@ -614,9 +614,9 @@ static struct usb_serial_driver keyspan_1port_device = {
|
||||
static struct usb_serial_driver keyspan_2port_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "keyspan_2",
|
||||
},
|
||||
.name = "Keyspan 2 port adapter",
|
||||
.short_name = "keyspan_2",
|
||||
.description = "Keyspan 2 port adapter",
|
||||
.id_table = keyspan_2port_ids,
|
||||
.num_interrupt_in = NUM_DONT_CARE,
|
||||
.num_bulk_in = NUM_DONT_CARE,
|
||||
@ -641,9 +641,9 @@ static struct usb_serial_driver keyspan_2port_device = {
|
||||
static struct usb_serial_driver keyspan_4port_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "keyspan_4",
|
||||
},
|
||||
.name = "Keyspan 4 port adapter",
|
||||
.short_name = "keyspan_4",
|
||||
.description = "Keyspan 4 port adapter",
|
||||
.id_table = keyspan_4port_ids,
|
||||
.num_interrupt_in = NUM_DONT_CARE,
|
||||
.num_bulk_in = 5,
|
||||
|
@ -786,9 +786,9 @@ static void keyspan_pda_shutdown (struct usb_serial *serial)
|
||||
static struct usb_serial_driver keyspan_pda_fake_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "keyspan_pda_pre",
|
||||
},
|
||||
.name = "Keyspan PDA - (prerenumeration)",
|
||||
.short_name = "keyspan_pda_pre",
|
||||
.description = "Keyspan PDA - (prerenumeration)",
|
||||
.id_table = id_table_fake,
|
||||
.num_interrupt_in = NUM_DONT_CARE,
|
||||
.num_bulk_in = NUM_DONT_CARE,
|
||||
@ -802,9 +802,9 @@ static struct usb_serial_driver keyspan_pda_fake_device = {
|
||||
static struct usb_serial_driver xircom_pgs_fake_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "xircom_no_firm",
|
||||
},
|
||||
.name = "Xircom / Entregra PGS - (prerenumeration)",
|
||||
.short_name = "xircom_no_firm",
|
||||
.description = "Xircom / Entregra PGS - (prerenumeration)",
|
||||
.id_table = id_table_fake_xircom,
|
||||
.num_interrupt_in = NUM_DONT_CARE,
|
||||
.num_bulk_in = NUM_DONT_CARE,
|
||||
@ -817,9 +817,9 @@ static struct usb_serial_driver xircom_pgs_fake_device = {
|
||||
static struct usb_serial_driver keyspan_pda_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "keyspan_pda",
|
||||
},
|
||||
.name = "Keyspan PDA",
|
||||
.short_name = "keyspan_pda",
|
||||
.description = "Keyspan PDA",
|
||||
.id_table = id_table_std,
|
||||
.num_interrupt_in = 1,
|
||||
.num_bulk_in = 0,
|
||||
|
@ -126,9 +126,9 @@ static struct usb_driver kl5kusb105d_driver = {
|
||||
static struct usb_serial_driver kl5kusb105d_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "kl5kusb105d",
|
||||
},
|
||||
.name = "KL5KUSB105D / PalmConnect",
|
||||
.short_name = "kl5kusb105d",
|
||||
.description = "KL5KUSB105D / PalmConnect",
|
||||
.id_table = id_table,
|
||||
.num_interrupt_in = 1,
|
||||
.num_bulk_in = 1,
|
||||
|
@ -108,8 +108,9 @@ static struct usb_driver kobil_driver = {
|
||||
static struct usb_serial_driver kobil_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "kobil",
|
||||
},
|
||||
.name = "KOBIL USB smart card terminal",
|
||||
.description = "KOBIL USB smart card terminal",
|
||||
.id_table = id_table,
|
||||
.num_interrupt_in = NUM_DONT_CARE,
|
||||
.num_bulk_in = 0,
|
||||
|
@ -135,9 +135,9 @@ static struct usb_driver mct_u232_driver = {
|
||||
static struct usb_serial_driver mct_u232_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "mct_u232",
|
||||
},
|
||||
.name = "MCT U232",
|
||||
.short_name = "mct_u232",
|
||||
.description = "MCT U232",
|
||||
.id_table = id_table_combined,
|
||||
.num_interrupt_in = 2,
|
||||
.num_bulk_in = 0,
|
||||
|
@ -91,9 +91,9 @@ static struct usb_driver omninet_driver = {
|
||||
static struct usb_serial_driver zyxel_omninet_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "omninet",
|
||||
},
|
||||
.name = "ZyXEL - omni.net lcd plus usb",
|
||||
.short_name = "omninet",
|
||||
.description = "ZyXEL - omni.net lcd plus usb",
|
||||
.id_table = id_table,
|
||||
.num_interrupt_in = 1,
|
||||
.num_bulk_in = 1,
|
||||
|
@ -108,9 +108,9 @@ static struct usb_driver option_driver = {
|
||||
static struct usb_serial_driver option_3port_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "option",
|
||||
},
|
||||
.name = "Option 3G data card",
|
||||
.short_name = "option",
|
||||
.description = "Option 3G data card",
|
||||
.id_table = option_ids,
|
||||
.num_interrupt_in = NUM_DONT_CARE,
|
||||
.num_bulk_in = NUM_DONT_CARE,
|
||||
|
@ -157,8 +157,8 @@ static unsigned int pl2303_buf_get(struct pl2303_buf *pb, char *buf,
|
||||
static struct usb_serial_driver pl2303_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "pl2303",
|
||||
},
|
||||
.name = "PL-2303",
|
||||
.id_table = id_table,
|
||||
.num_interrupt_in = NUM_DONT_CARE,
|
||||
.num_bulk_in = 1,
|
||||
|
@ -400,8 +400,8 @@ static int safe_startup (struct usb_serial *serial)
|
||||
static struct usb_serial_driver safe_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "safe_serial",
|
||||
},
|
||||
.name = "Safe",
|
||||
.id_table = id_table,
|
||||
.num_interrupt_in = NUM_DONT_CARE,
|
||||
.num_bulk_in = NUM_DONT_CARE,
|
||||
|
@ -257,9 +257,10 @@ static struct usb_driver ti_usb_driver = {
|
||||
|
||||
static struct usb_serial_driver ti_1port_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.owner = THIS_MODULE,
|
||||
.name = "ti_usb_3410_5052_1",
|
||||
},
|
||||
.name = "TI USB 3410 1 port adapter",
|
||||
.description = "TI USB 3410 1 port adapter",
|
||||
.id_table = ti_id_table_3410,
|
||||
.num_interrupt_in = 1,
|
||||
.num_bulk_in = 1,
|
||||
@ -286,9 +287,10 @@ static struct usb_serial_driver ti_1port_device = {
|
||||
|
||||
static struct usb_serial_driver ti_2port_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.owner = THIS_MODULE,
|
||||
.name = "ti_usb_3410_5052_2",
|
||||
},
|
||||
.name = "TI USB 5052 2 port adapter",
|
||||
.description = "TI USB 5052 2 port adapter",
|
||||
.id_table = ti_id_table_5052,
|
||||
.num_interrupt_in = 1,
|
||||
.num_bulk_in = 2,
|
||||
|
@ -122,7 +122,7 @@ static void destroy_serial(struct kref *kref)
|
||||
|
||||
serial = to_usb_serial(kref);
|
||||
|
||||
dbg ("%s - %s", __FUNCTION__, serial->type->name);
|
||||
dbg("%s - %s", __FUNCTION__, serial->type->description);
|
||||
|
||||
serial->type->shutdown(serial);
|
||||
|
||||
@ -415,7 +415,7 @@ static int serial_read_proc (char *page, char **start, off_t off, int count, int
|
||||
length += sprintf (page+length, "%d:", i);
|
||||
if (serial->type->driver.owner)
|
||||
length += sprintf (page+length, " module:%s", module_name(serial->type->driver.owner));
|
||||
length += sprintf (page+length, " name:\"%s\"", serial->type->name);
|
||||
length += sprintf (page+length, " name:\"%s\"", serial->type->description);
|
||||
length += sprintf (page+length, " vendor:%04x product:%04x",
|
||||
le16_to_cpu(serial->dev->descriptor.idVendor),
|
||||
le16_to_cpu(serial->dev->descriptor.idProduct));
|
||||
@ -687,7 +687,7 @@ int usb_serial_probe(struct usb_interface *interface,
|
||||
#endif
|
||||
|
||||
/* found all that we need */
|
||||
dev_info(&interface->dev, "%s converter detected\n", type->name);
|
||||
dev_info(&interface->dev, "%s converter detected\n", type->description);
|
||||
|
||||
#ifdef CONFIG_USB_SERIAL_GENERIC
|
||||
if (type == &usb_serial_generic_device) {
|
||||
@ -1088,16 +1088,19 @@ int usb_serial_register(struct usb_serial_driver *driver)
|
||||
|
||||
fixup_generic(driver);
|
||||
|
||||
if (!driver->description)
|
||||
driver->description = driver->driver.name;
|
||||
|
||||
/* Add this device to our list of devices */
|
||||
list_add(&driver->driver_list, &usb_serial_driver_list);
|
||||
|
||||
retval = usb_serial_bus_register(driver);
|
||||
if (retval) {
|
||||
err("problem %d when registering driver %s", retval, driver->name);
|
||||
err("problem %d when registering driver %s", retval, driver->description);
|
||||
list_del(&driver->driver_list);
|
||||
}
|
||||
else
|
||||
info("USB Serial support registered for %s", driver->name);
|
||||
info("USB Serial support registered for %s", driver->description);
|
||||
|
||||
return retval;
|
||||
}
|
||||
@ -1105,7 +1108,7 @@ int usb_serial_register(struct usb_serial_driver *driver)
|
||||
|
||||
void usb_serial_deregister(struct usb_serial_driver *device)
|
||||
{
|
||||
info("USB Serial deregistering driver %s", device->name);
|
||||
info("USB Serial deregistering driver %s", device->description);
|
||||
list_del(&device->driver_list);
|
||||
usb_serial_bus_deregister(device);
|
||||
}
|
||||
|
@ -149,11 +149,8 @@ static inline void usb_set_serial_data (struct usb_serial *serial, void *data)
|
||||
|
||||
/**
|
||||
* usb_serial_driver - describes a usb serial driver
|
||||
* @name: pointer to a string that describes this driver. This string used
|
||||
* @description: pointer to a string that describes this driver. This string used
|
||||
* in the syslog messages when a device is inserted or removed.
|
||||
* @short_name: a pointer to a string that describes this driver in
|
||||
* KOBJ_NAME_LEN characters or less. This is used for the sysfs interface
|
||||
* to describe the driver.
|
||||
* @id_table: pointer to a list of usb_device_id structures that define all
|
||||
* of the devices this structure can support.
|
||||
* @num_interrupt_in: the number of interrupt in endpoints this device will
|
||||
@ -187,11 +184,12 @@ static inline void usb_set_serial_data (struct usb_serial *serial, void *data)
|
||||
* called, the generic serial function will be used instead.
|
||||
*
|
||||
* The driver.owner field should be set to the module owner of this driver.
|
||||
*
|
||||
* The driver.name field should be set to the name of this driver (remember
|
||||
* it will show up in sysfs, so it needs to be short and to the point.
|
||||
* Useing the module name is a good idea.)
|
||||
*/
|
||||
struct usb_serial_driver {
|
||||
char *name;
|
||||
char *short_name;
|
||||
const char *description;
|
||||
const struct usb_device_id *id_table;
|
||||
char num_interrupt_in;
|
||||
char num_interrupt_out;
|
||||
|
@ -185,9 +185,9 @@ static struct usb_driver visor_driver = {
|
||||
static struct usb_serial_driver handspring_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "visor",
|
||||
},
|
||||
.name = "Handspring Visor / Palm OS",
|
||||
.short_name = "visor",
|
||||
.description = "Handspring Visor / Palm OS",
|
||||
.id_table = id_table,
|
||||
.num_interrupt_in = NUM_DONT_CARE,
|
||||
.num_bulk_in = 2,
|
||||
@ -215,9 +215,9 @@ static struct usb_serial_driver handspring_device = {
|
||||
static struct usb_serial_driver clie_5_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "clie_5",
|
||||
},
|
||||
.name = "Sony Clie 5.0",
|
||||
.short_name = "clie_5",
|
||||
.description = "Sony Clie 5.0",
|
||||
.id_table = clie_id_5_table,
|
||||
.num_interrupt_in = NUM_DONT_CARE,
|
||||
.num_bulk_in = 2,
|
||||
@ -245,9 +245,9 @@ static struct usb_serial_driver clie_5_device = {
|
||||
static struct usb_serial_driver clie_3_5_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "clie_3.5",
|
||||
},
|
||||
.name = "Sony Clie 3.5",
|
||||
.short_name = "clie_3.5",
|
||||
.description = "Sony Clie 3.5",
|
||||
.id_table = clie_id_3_5_table,
|
||||
.num_interrupt_in = 0,
|
||||
.num_bulk_in = 1,
|
||||
@ -659,7 +659,7 @@ static int palm_os_3_probe (struct usb_serial *serial, const struct usb_device_i
|
||||
break;
|
||||
}
|
||||
dev_info(dev, "%s: port %d, is for %s use\n",
|
||||
serial->type->name,
|
||||
serial->type->description,
|
||||
connection_info->connections[i].port, string);
|
||||
}
|
||||
}
|
||||
@ -668,11 +668,11 @@ static int palm_os_3_probe (struct usb_serial *serial, const struct usb_device_i
|
||||
*/
|
||||
if (num_ports == 0 || num_ports > 2) {
|
||||
dev_warn (dev, "%s: No valid connect info available\n",
|
||||
serial->type->name);
|
||||
serial->type->description);
|
||||
num_ports = 2;
|
||||
}
|
||||
|
||||
dev_info(dev, "%s: Number of ports: %d\n", serial->type->name,
|
||||
dev_info(dev, "%s: Number of ports: %d\n", serial->type->description,
|
||||
num_ports);
|
||||
|
||||
/*
|
||||
|
@ -159,9 +159,9 @@ static void whiteheat_write_callback (struct urb *urb, struct pt_regs *regs);
|
||||
static struct usb_serial_driver whiteheat_fake_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "whiteheatnofirm",
|
||||
},
|
||||
.name = "Connect Tech - WhiteHEAT - (prerenumeration)",
|
||||
.short_name = "whiteheatnofirm",
|
||||
.description = "Connect Tech - WhiteHEAT - (prerenumeration)",
|
||||
.id_table = id_table_prerenumeration,
|
||||
.num_interrupt_in = NUM_DONT_CARE,
|
||||
.num_bulk_in = NUM_DONT_CARE,
|
||||
@ -174,9 +174,9 @@ static struct usb_serial_driver whiteheat_fake_device = {
|
||||
static struct usb_serial_driver whiteheat_device = {
|
||||
.driver = {
|
||||
.owner = THIS_MODULE,
|
||||
.name = "whiteheat",
|
||||
},
|
||||
.name = "Connect Tech - WhiteHEAT",
|
||||
.short_name = "whiteheat",
|
||||
.description = "Connect Tech - WhiteHEAT",
|
||||
.id_table = id_table_std,
|
||||
.num_interrupt_in = NUM_DONT_CARE,
|
||||
.num_bulk_in = NUM_DONT_CARE,
|
||||
@ -386,10 +386,10 @@ static int whiteheat_attach (struct usb_serial *serial)
|
||||
usb_clear_halt(serial->dev, pipe);
|
||||
ret = usb_bulk_msg (serial->dev, pipe, command, 2, &alen, COMMAND_TIMEOUT_MS);
|
||||
if (ret) {
|
||||
err("%s: Couldn't send command [%d]", serial->type->name, ret);
|
||||
err("%s: Couldn't send command [%d]", serial->type->description, ret);
|
||||
goto no_firmware;
|
||||
} else if (alen != sizeof(command)) {
|
||||
err("%s: Send command incomplete [%d]", serial->type->name, alen);
|
||||
err("%s: Send command incomplete [%d]", serial->type->description, alen);
|
||||
goto no_firmware;
|
||||
}
|
||||
|
||||
@ -398,19 +398,19 @@ static int whiteheat_attach (struct usb_serial *serial)
|
||||
usb_clear_halt(serial->dev, pipe);
|
||||
ret = usb_bulk_msg (serial->dev, pipe, result, sizeof(*hw_info) + 1, &alen, COMMAND_TIMEOUT_MS);
|
||||
if (ret) {
|
||||
err("%s: Couldn't get results [%d]", serial->type->name, ret);
|
||||
err("%s: Couldn't get results [%d]", serial->type->description, ret);
|
||||
goto no_firmware;
|
||||
} else if (alen != sizeof(result)) {
|
||||
err("%s: Get results incomplete [%d]", serial->type->name, alen);
|
||||
err("%s: Get results incomplete [%d]", serial->type->description, alen);
|
||||
goto no_firmware;
|
||||
} else if (result[0] != command[0]) {
|
||||
err("%s: Command failed [%d]", serial->type->name, result[0]);
|
||||
err("%s: Command failed [%d]", serial->type->description, result[0]);
|
||||
goto no_firmware;
|
||||
}
|
||||
|
||||
hw_info = (struct whiteheat_hw_info *)&result[1];
|
||||
|
||||
info("%s: Driver %s: Firmware v%d.%02d", serial->type->name,
|
||||
info("%s: Driver %s: Firmware v%d.%02d", serial->type->description,
|
||||
DRIVER_VERSION, hw_info->sw_major_rev, hw_info->sw_minor_rev);
|
||||
|
||||
for (i = 0; i < serial->num_ports; i++) {
|
||||
@ -418,7 +418,7 @@ static int whiteheat_attach (struct usb_serial *serial)
|
||||
|
||||
info = (struct whiteheat_private *)kmalloc(sizeof(struct whiteheat_private), GFP_KERNEL);
|
||||
if (info == NULL) {
|
||||
err("%s: Out of memory for port structures\n", serial->type->name);
|
||||
err("%s: Out of memory for port structures\n", serial->type->description);
|
||||
goto no_private;
|
||||
}
|
||||
|
||||
@ -488,7 +488,7 @@ static int whiteheat_attach (struct usb_serial *serial)
|
||||
|
||||
command_info = (struct whiteheat_command_private *)kmalloc(sizeof(struct whiteheat_command_private), GFP_KERNEL);
|
||||
if (command_info == NULL) {
|
||||
err("%s: Out of memory for port structures\n", serial->type->name);
|
||||
err("%s: Out of memory for port structures\n", serial->type->description);
|
||||
goto no_command_private;
|
||||
}
|
||||
|
||||
@ -505,9 +505,9 @@ static int whiteheat_attach (struct usb_serial *serial)
|
||||
|
||||
no_firmware:
|
||||
/* Firmware likely not running */
|
||||
err("%s: Unable to retrieve firmware version, try replugging\n", serial->type->name);
|
||||
err("%s: If the firmware is not running (status led not blinking)\n", serial->type->name);
|
||||
err("%s: please contact support@connecttech.com\n", serial->type->name);
|
||||
err("%s: Unable to retrieve firmware version, try replugging\n", serial->type->description);
|
||||
err("%s: If the firmware is not running (status led not blinking)\n", serial->type->description);
|
||||
err("%s: please contact support@connecttech.com\n", serial->type->description);
|
||||
return -ENODEV;
|
||||
|
||||
no_command_private:
|
||||
|
Loading…
Reference in New Issue
Block a user