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,
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,
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;
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;
}
{
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;
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
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,
serial = to_usb_serial(kref);
- dbg ("%s - %s", __FUNCTION__, serial->type->name);
+ dbg("%s - %s", __FUNCTION__, serial->type->description);
serial->type->shutdown(serial);
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));
#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) {
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;
}
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);
}
/**
* 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
* 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;
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,
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,
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,
break;
}
dev_info(dev, "%s: port %d, is for %s use\n",
- serial->type->name,
+ serial->type->description,
connection_info->connections[i].port, string);
}
}
*/
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);
/*
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,
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,
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;
}
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++) {
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;
}
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;
}
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: