Commit 18fcac35 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

[PATCH] USB Serial: get rid of the .owner field in usb_serial_driver



Don't duplicate something that's already in struct driver.

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ea65370d
......@@ -31,7 +31,9 @@ static struct usb_driver airprime_driver = {
};
static struct usb_serial_driver airprime_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "airprime",
.id_table = id_table,
.num_interrupt_in = NUM_DONT_CARE,
......
......@@ -122,7 +122,9 @@ static struct usb_driver belkin_driver = {
/* All of the device info needed for the serial converters */
static struct usb_serial_driver belkin_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "Belkin / Peracom / GoHubs USB Serial Adapter",
.short_name = "belkin",
.id_table = id_table_combined,
......
......@@ -57,13 +57,13 @@ static int usb_serial_device_probe (struct device *dev)
driver = port->serial->type;
if (driver->port_probe) {
if (!try_module_get(driver->owner)) {
if (!try_module_get(driver->driver.owner)) {
dev_err(dev, "module get failed, exiting\n");
retval = -EIO;
goto exit;
}
retval = driver->port_probe (port);
module_put(driver->owner);
module_put(driver->driver.owner);
if (retval)
goto exit;
}
......@@ -92,13 +92,13 @@ static int usb_serial_device_remove (struct device *dev)
driver = port->serial->type;
if (driver->port_remove) {
if (!try_module_get(driver->owner)) {
if (!try_module_get(driver->driver.owner)) {
dev_err(dev, "module get failed, exiting\n");
retval = -EIO;
goto exit;
}
retval = driver->port_remove (port);
module_put(driver->owner);
module_put(driver->driver.owner);
}
exit:
minor = port->number;
......@@ -120,7 +120,6 @@ int usb_serial_bus_register(struct usb_serial_driver *driver)
driver->driver.bus = &usb_serial_bus_type;
driver->driver.probe = usb_serial_device_probe;
driver->driver.remove = usb_serial_device_remove;
driver->driver.owner = driver->owner;
retval = driver_register(&driver->driver);
......
......@@ -74,7 +74,9 @@ static struct usb_driver cp2101_driver = {
};
static struct usb_serial_driver cp2101_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "CP2101",
.id_table = id_table,
.num_interrupt_in = 0,
......
......@@ -84,7 +84,9 @@ static struct usb_driver cyberjack_driver = {
};
static struct usb_serial_driver cyberjack_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "Reiner SCT Cyberjack USB card reader",
.short_name = "cyberjack",
.id_table = id_table,
......
......@@ -177,7 +177,9 @@ static unsigned int cypress_buf_get(struct cypress_buf *cb, char *buf, unsigne
static struct usb_serial_driver cypress_earthmate_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "DeLorme Earthmate USB",
.short_name = "earthmate",
.id_table = id_table_earthmate,
......@@ -204,7 +206,9 @@ static struct usb_serial_driver cypress_earthmate_device = {
};
static struct usb_serial_driver cypress_hidcom_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "HID->COM RS232 Adapter",
.short_name = "cyphidcom",
.id_table = id_table_cyphidcomrs232,
......
......@@ -504,7 +504,9 @@ static struct usb_driver digi_driver = {
/* device info needed for the Digi serial converter */
static struct usb_serial_driver digi_acceleport_2_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "Digi 2 port USB adapter",
.short_name = "digi_2",
.id_table = id_table_2,
......@@ -531,7 +533,9 @@ static struct usb_serial_driver digi_acceleport_2_device = {
};
static struct usb_serial_driver digi_acceleport_4_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "Digi 4 port USB adapter",
.short_name = "digi_4",
.id_table = id_table_4,
......
......@@ -113,7 +113,9 @@ static struct usb_driver empeg_driver = {
};
static struct usb_serial_driver empeg_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "Empeg",
.id_table = id_table,
.num_interrupt_in = 0,
......
......@@ -563,7 +563,9 @@ static __u32 ftdi_232bm_baud_base_to_divisor (int baud, int base);
static __u32 ftdi_232bm_baud_to_divisor (int baud);
static struct usb_serial_driver ftdi_sio_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "FTDI USB Serial Device",
.short_name = "ftdi_sio",
.id_table = id_table_combined,
......
......@@ -1470,7 +1470,9 @@ static void garmin_shutdown (struct usb_serial *serial)
/* All of the device info needed */
static struct usb_serial_driver garmin_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "Garmin GPS usb/tty",
.short_name = "garmin_gps",
.id_table = id_table,
......
......@@ -37,7 +37,9 @@ static struct usb_device_id generic_device_ids[2]; /* Initially all zeroes. */
/* All of the device info needed for the Generic Serial Converter */
struct usb_serial_driver usb_serial_generic_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "Generic",
.short_name = "generic",
.id_table = generic_device_ids,
......
......@@ -45,7 +45,9 @@ static struct usb_driver hp49gp_driver = {
};
static struct usb_serial_driver hp49gp_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "HP4X",
.id_table = id_table,
.num_interrupt_in = NUM_DONT_CARE,
......
......@@ -76,7 +76,9 @@ static struct usb_device_id id_table_combined [] = {
MODULE_DEVICE_TABLE (usb, id_table_combined);
static struct usb_serial_driver edgeport_2port_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "Edgeport 2 port adapter",
.short_name = "edgeport_2",
.id_table = edgeport_2port_id_table,
......@@ -104,7 +106,9 @@ static struct usb_serial_driver edgeport_2port_device = {
};
static struct usb_serial_driver edgeport_4port_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "Edgeport 4 port adapter",
.short_name = "edgeport_4",
.id_table = edgeport_4port_id_table,
......@@ -132,7 +136,9 @@ static struct usb_serial_driver edgeport_4port_device = {
};
static struct usb_serial_driver edgeport_8port_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "Edgeport 8 port adapter",
.short_name = "edgeport_8",
.id_table = edgeport_8port_id_table,
......
......@@ -2983,7 +2983,9 @@ static unsigned int edge_buf_get(struct edge_buf *eb, char *buf,
static struct usb_serial_driver edgeport_1port_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "Edgeport TI 1 port adapter",
.short_name = "edgeport_ti_1",
.id_table = edgeport_1port_id_table,
......@@ -3011,7 +3013,9 @@ static struct usb_serial_driver edgeport_1port_device = {
};
static struct usb_serial_driver edgeport_2port_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "Edgeport TI 2 port adapter",
.short_name = "edgeport_ti_2",
.id_table = edgeport_2port_id_table,
......
......@@ -548,7 +548,9 @@ static struct usb_driver ipaq_driver = {
/* All of the device info needed for the Compaq iPAQ */
static struct usb_serial_driver ipaq_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "PocketPC PDA",
.id_table = ipaq_id_table,
.num_interrupt_in = NUM_DONT_CARE,
......
......@@ -444,7 +444,9 @@ static int ipw_disconnect(struct usb_serial_port *port)
}
static struct usb_serial_driver ipw_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "IPWireless converter",
.short_name = "ipw",
.id_table = usb_ipw_ids,
......
......@@ -134,7 +134,9 @@ static struct usb_driver ir_driver = {
static struct usb_serial_driver ir_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "IR Dongle",
.id_table = id_table,
.num_interrupt_in = 1,
......
......@@ -571,7 +571,9 @@ static struct usb_device_id keyspan_4port_ids[] = {
/* Structs for the devices, pre and post renumeration. */
static struct usb_serial_driver keyspan_pre_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "Keyspan - (without firmware)",
.short_name = "keyspan_no_firm",
.id_table = keyspan_pre_ids,
......@@ -583,7 +585,9 @@ static struct usb_serial_driver keyspan_pre_device = {
};
static struct usb_serial_driver keyspan_1port_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "Keyspan 1 port adapter",
.short_name = "keyspan_1",
.id_table = keyspan_1port_ids,
......@@ -608,7 +612,9 @@ static struct usb_serial_driver keyspan_1port_device = {
};
static struct usb_serial_driver keyspan_2port_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "Keyspan 2 port adapter",
.short_name = "keyspan_2",
.id_table = keyspan_2port_ids,
......@@ -633,7 +639,9 @@ static struct usb_serial_driver keyspan_2port_device = {
};
static struct usb_serial_driver keyspan_4port_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "Keyspan 4 port adapter",
.short_name = "keyspan_4",
.id_table = keyspan_4port_ids,
......
......@@ -784,7 +784,9 @@ static void keyspan_pda_shutdown (struct usb_serial *serial)
#ifdef KEYSPAN
static struct usb_serial_driver keyspan_pda_fake_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "Keyspan PDA - (prerenumeration)",
.short_name = "keyspan_pda_pre",
.id_table = id_table_fake,
......@@ -798,7 +800,9 @@ static struct usb_serial_driver keyspan_pda_fake_device = {
#ifdef XIRCOM
static struct usb_serial_driver xircom_pgs_fake_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "Xircom / Entregra PGS - (prerenumeration)",
.short_name = "xircom_no_firm",
.id_table = id_table_fake_xircom,
......@@ -811,7 +815,9 @@ static struct usb_serial_driver xircom_pgs_fake_device = {
#endif
static struct usb_serial_driver keyspan_pda_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "Keyspan PDA",
.short_name = "keyspan_pda",
.id_table = id_table_std,
......
......@@ -124,7 +124,9 @@ static struct usb_driver kl5kusb105d_driver = {
};
static struct usb_serial_driver kl5kusb105d_device = {
.owner = THIS_MODULE,
.driver = {
.owner = THIS_MODULE,
},
.name = "KL5KUSB105D / PalmConnect",
.short_name = "kl5kusb105d",
.id_table = id_table,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment