Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 269bda1c authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

[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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 502b95c1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -33,8 +33,8 @@ static struct usb_driver airprime_driver = {
static struct usb_serial_driver airprime_device = {
	.driver = {
		.owner =	THIS_MODULE,
	},
		.name =		"airprime",
	},
	.id_table =		id_table,
	.num_interrupt_in =	NUM_DONT_CARE,
	.num_bulk_in =		NUM_DONT_CARE,
+2 −2
Original line number Diff line number Diff line
@@ -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,
+2 −6
Original line number Diff line number Diff line
@@ -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 @@ static int usb_serial_device_remove (struct device *dev)
	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;
+2 −2
Original line number Diff line number Diff line
@@ -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,
+2 −2
Original line number Diff line number Diff line
@@ -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,
Loading