Commit 68e24113 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: serial: rework usb_serial_register/deregister_drivers()

This reworks the usb_serial_register_drivers() and
usb_serial_deregister_drivers() to not need a pointer to a struct
usb_driver anymore.  The usb_driver structure is now created dynamically
and registered and unregistered as needed.

This saves lines of code in each usb-serial driver.  All in-kernel users
of these functions were also fixed up at this time.  The pl2303 driver
was tested that everything worked properly.

Thanks for the idea to do this from Alan Stern.

Cc: Adhir Ramjiawan <adhirramjiawan0@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Al Borchers <alborchers@steinerpoint.com>
Cc: Aleksey Babahin <tamerlan311@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andrew Worsley <amworsley@gmail.com>
Cc: Bart Hartgers <bart.hartgers@gmail.com>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Dan Carpenter <error27@gmail.com>
Cc: Dan Williams <dcbw@redhat.com>
Cc: Donald Lee <donald@asix.com.tw>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Gary Brubaker <xavyer@ix.netcom.com>
Cc: Jesper Juhl <jj@chaosbits.net>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Johan Hovold <jhovold@gmail.com>
Cc: Julia Lawall <julia@diku.dk>
Cc: Kautuk Consul <consul.kautuk@gmail.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Lonnie Mendez <dignome@gmail.com>
Cc: Matthias Bruestle and Harald Welte <support@reiner-sct.com>
Cc: Matthias Urlichs <smurf@smurf.noris.de>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Michal Sroczynski <msroczyn@gmail.com>
Cc: "Michał Wróbel" <michal.wrobel@flytronic.pl>
Cc: Oliver Neukum <oliver@neukum.name>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Peter Berger <pberger@brimson.com>
Cc: Preston Fick <preston.fick@silabs.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Rigbert Hamisch <rigbert@gmx.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Simon Arlott <simon@fire.lp0.eu>
Cc: Support Department <support@connecttech.com>
Cc: Thomas Tuttle <ttuttle@chromium.org>
Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Cc: Wang YanQing <Udknight@gmail.com>
Cc: William Greathouse <wgreathouse@smva.com>
Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d56ba320
......@@ -116,7 +116,7 @@ static bool debug;
#define FOURTHCHAR ((unsigned char *)(urb->transfer_buffer))[i + 3]
#define FIFTHCHAR ((unsigned char *)(urb->transfer_buffer))[i + 4]
static const struct usb_device_id quausb2_id_table[] = {
static const struct usb_device_id id_table[] = {
{USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_SSU2_100)},
{USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_DSU2_100)},
{USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_DSU2_400)},
......@@ -126,14 +126,7 @@ static const struct usb_device_id quausb2_id_table[] = {
{USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_ESU2_400)},
{} /* Terminating entry */
};
MODULE_DEVICE_TABLE(usb, quausb2_id_table);
/* custom structures we need go here */
static struct usb_driver quausb2_usb_driver = {
.name = "quatech-usb2-serial",
.id_table = quausb2_id_table,
};
MODULE_DEVICE_TABLE(usb, id_table);
/**
* quatech2_port: Structure in which to keep all the messy stuff that this
......@@ -1922,7 +1915,7 @@ static struct usb_serial_driver quatech2_device = {
.name = "quatech_usb2",
},
.description = DRIVER_DESC,
.id_table = quausb2_id_table,
.id_table = id_table,
.num_ports = 8,
.open = qt2_open,
.close = qt2_close,
......@@ -1947,7 +1940,7 @@ static struct usb_serial_driver * const serial_drivers[] = {
&quatech2_device, NULL
};
module_usb_serial_driver(quausb2_usb_driver, serial_drivers);
module_usb_serial_driver(serial_drivers, id_table);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
......
......@@ -125,7 +125,7 @@ static bool debug;
#define MODEM_CTRL 0x40
#define RS232_MODE 0x00
static const struct usb_device_id serqt_id_table[] = {
static const struct usb_device_id id_table[] = {
{USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_SSU200)},
{USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_DSU100)},
{USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_DSU200)},
......@@ -152,8 +152,7 @@ static const struct usb_device_id serqt_id_table[] = {
{USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_ESU100_2)},
{} /* Terminating entry */
};
MODULE_DEVICE_TABLE(usb, serqt_id_table);
MODULE_DEVICE_TABLE(usb, id_table);
struct qt_get_device_data {
__u8 porta;
......@@ -195,11 +194,6 @@ struct quatech_port {
char closePending;
};
static struct usb_driver serqt_usb_driver = {
.name = "quatech-usb-serial",
.id_table = serqt_id_table,
};
static int port_paranoia_check(struct usb_serial_port *port,
const char *function)
{
......@@ -1544,7 +1538,7 @@ static struct usb_serial_driver quatech_device = {
.name = "serqt",
},
.description = DRIVER_DESC,
.id_table = serqt_id_table,
.id_table = id_table,
.num_ports = 8,
.open = qt_open,
.close = qt_close,
......@@ -1567,7 +1561,7 @@ static struct usb_serial_driver * const serial_drivers[] = {
&quatech_device, NULL
};
module_usb_serial_driver(serqt_usb_driver, serial_drivers);
module_usb_serial_driver(serial_drivers, id_table);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
......
......@@ -170,11 +170,6 @@ static void aircable_process_read_urb(struct urb *urb)
tty_kref_put(tty);
}
static struct usb_driver aircable_driver = {
.name = "aircable",
.id_table = id_table,
};
static struct usb_serial_driver aircable_device = {
.driver = {
.owner = THIS_MODULE,
......@@ -194,7 +189,7 @@ static struct usb_serial_driver * const serial_drivers[] = {
&aircable_device, NULL
};
module_usb_serial_driver(aircable_driver, serial_drivers);
module_usb_serial_driver(serial_drivers, id_table);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
......
......@@ -714,11 +714,6 @@ static void ark3116_process_read_urb(struct urb *urb)
tty_kref_put(tty);
}
static struct usb_driver ark3116_driver = {
.name = "ark3116",
.id_table = id_table,
};
static struct usb_serial_driver ark3116_device = {
.driver = {
.owner = THIS_MODULE,
......@@ -745,7 +740,7 @@ static struct usb_serial_driver * const serial_drivers[] = {
&ark3116_device, NULL
};
module_usb_serial_driver(ark3116_driver, serial_drivers);
module_usb_serial_driver(serial_drivers, id_table);
MODULE_LICENSE("GPL");
......
......@@ -62,7 +62,7 @@ static int belkin_sa_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear);
static const struct usb_device_id id_table_combined[] = {
static const struct usb_device_id id_table[] = {
{ USB_DEVICE(BELKIN_SA_VID, BELKIN_SA_PID) },
{ USB_DEVICE(BELKIN_OLD_VID, BELKIN_OLD_PID) },
{ USB_DEVICE(PERACOM_VID, PERACOM_PID) },
......@@ -71,12 +71,7 @@ static const struct usb_device_id id_table_combined[] = {
{ USB_DEVICE(BELKIN_DOCKSTATION_VID, BELKIN_DOCKSTATION_PID) },
{ } /* Terminating entry */
};
MODULE_DEVICE_TABLE(usb, id_table_combined);
static struct usb_driver belkin_driver = {
.name = "belkin",
.id_table = id_table_combined,
};
MODULE_DEVICE_TABLE(usb, id_table);
/* All of the device info needed for the serial converters */
static struct usb_serial_driver belkin_device = {
......@@ -85,7 +80,7 @@ static struct usb_serial_driver belkin_device = {
.name = "belkin",
},
.description = "Belkin / Peracom / GoHubs USB Serial Adapter",
.id_table = id_table_combined,
.id_table = id_table,
.num_ports = 1,
.open = belkin_sa_open,
.close = belkin_sa_close,
......@@ -513,7 +508,7 @@ exit:
return retval;
}
module_usb_serial_driver(belkin_driver, serial_drivers);
module_usb_serial_driver(serial_drivers, id_table);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
......
......@@ -589,11 +589,6 @@ static int ch341_resume(struct usb_serial *serial)
return 0;
}
static struct usb_driver ch341_driver = {
.name = "ch341",
.id_table = id_table,
};
static struct usb_serial_driver ch341_device = {
.driver = {
.owner = THIS_MODULE,
......@@ -619,7 +614,7 @@ static struct usb_serial_driver * const serial_drivers[] = {
&ch341_device, NULL
};
module_usb_serial_driver(ch341_driver, serial_drivers);
module_usb_serial_driver(serial_drivers, id_table);
MODULE_LICENSE("GPL");
......
......@@ -156,11 +156,6 @@ struct cp210x_port_private {
__u8 bInterfaceNumber;
};
static struct usb_driver cp210x_driver = {
.name = "cp210x",
.id_table = id_table,
};
static struct usb_serial_driver cp210x_device = {
.driver = {
.owner = THIS_MODULE,
......@@ -880,7 +875,7 @@ static void cp210x_release(struct usb_serial *serial)
}
}
module_usb_serial_driver(cp210x_driver, serial_drivers);
module_usb_serial_driver(serial_drivers, id_table);
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_VERSION(DRIVER_VERSION);
......
......@@ -77,11 +77,6 @@ static const struct usb_device_id id_table[] = {
MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver cyberjack_driver = {
.name = "cyberjack",
.id_table = id_table,
};
static struct usb_serial_driver cyberjack_device = {
.driver = {
.owner = THIS_MODULE,
......@@ -455,7 +450,7 @@ exit:
usb_serial_port_softint(port);
}
module_usb_serial_driver(cyberjack_driver, serial_drivers);
module_usb_serial_driver(serial_drivers, id_table);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
......
......@@ -89,11 +89,6 @@ static const struct usb_device_id id_table_combined[] = {
MODULE_DEVICE_TABLE(usb, id_table_combined);
static struct usb_driver cypress_driver = {
.name = "cypress",
.id_table = id_table_combined,
};
enum packet_format {
packet_format_1, /* b0:status, b1:payload count */
packet_format_2 /* b0[7:3]:status, b0[2:0]:payload count */
......@@ -1308,7 +1303,7 @@ static void cypress_write_int_callback(struct urb *urb)
cypress_send(port);
}
module_usb_serial_driver(cypress_driver, serial_drivers);
module_usb_serial_driver(serial_drivers, id_table_combined);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
......
......@@ -271,12 +271,6 @@ static const struct usb_device_id id_table_4[] = {
MODULE_DEVICE_TABLE(usb, id_table_combined);
static struct usb_driver digi_driver = {
.name = "digi_acceleport",
.id_table = id_table_combined,
};
/* device info needed for the Digi serial converter */
static struct usb_serial_driver digi_acceleport_2_device = {
......@@ -1553,7 +1547,7 @@ static int digi_read_oob_callback(struct urb *urb)
}
module_usb_serial_driver(digi_driver, serial_drivers);
module_usb_serial_driver(serial_drivers, id_table_combined);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
......
......@@ -51,11 +51,6 @@ static const struct usb_device_id id_table[] = {
MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver empeg_driver = {
.name = "empeg",
.id_table = id_table,
};
static struct usb_serial_driver empeg_device = {
.driver = {
.owner = THIS_MODULE,
......@@ -134,7 +129,7 @@ static void empeg_init_termios(struct tty_struct *tty)
tty_encode_baud_rate(tty, 115200, 115200);
}
module_usb_serial_driver(empeg_driver, serial_drivers);
module_usb_serial_driver(serial_drivers, id_table);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
......
......@@ -350,18 +350,12 @@ static void f81232_release(struct usb_serial *serial)
}
}
static struct usb_driver f81232_driver = {
.name = "f81232",
.id_table = id_table,
};
static struct usb_serial_driver f81232_device = {
.driver = {
.owner = THIS_MODULE,
.name = "f81232",
},
.id_table = id_table,
.usb_driver = &f81232_driver,
.num_ports = 1,
.bulk_in_size = 256,
.bulk_out_size = 256,
......@@ -385,7 +379,7 @@ static struct usb_serial_driver * const serial_drivers[] = {
NULL,
};
module_usb_serial_driver(f81232_driver, serial_drivers);
module_usb_serial_driver(serial_drivers, id_table);
MODULE_DESCRIPTION("Fintek F81232 USB to serial adaptor driver");
MODULE_AUTHOR("Greg Kroah-Hartman <gregkh@linuxfoundation.org");
......
......@@ -862,11 +862,6 @@ static struct usb_device_id id_table_combined [] = {
MODULE_DEVICE_TABLE(usb, id_table_combined);
static struct usb_driver ftdi_driver = {
.name = "ftdi_sio",
.id_table = id_table_combined,
};
static const char *ftdi_chip_name[] = {
[SIO] = "SIO", /* the serial part of FT8U100AX */
[FT8U232AM] = "FT8U232AM",
......@@ -2413,7 +2408,7 @@ static int __init ftdi_init(void)
id_table_combined[i].idVendor = vendor;
id_table_combined[i].idProduct = product;
}
retval = usb_serial_register_drivers(&ftdi_driver, serial_drivers);
retval = usb_serial_register_drivers(serial_drivers, KBUILD_MODNAME, id_table_combined);
if (retval == 0)
printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
DRIVER_DESC "\n");
......@@ -2422,7 +2417,7 @@ static int __init ftdi_init(void)
static void __exit ftdi_exit(void)
{
usb_serial_deregister_drivers(&ftdi_driver, serial_drivers);
usb_serial_deregister_drivers(serial_drivers);
}
......
......@@ -24,11 +24,6 @@ static const struct usb_device_id id_table[] = {
};
MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver funsoft_driver = {
.name = "funsoft",
.id_table = id_table,
};
static struct usb_serial_driver funsoft_device = {
.driver = {
.owner = THIS_MODULE,
......@@ -42,7 +37,7 @@ static struct usb_serial_driver * const serial_drivers[] = {
&funsoft_device, NULL
};
module_usb_serial_driver(funsoft_driver, serial_drivers);
module_usb_serial_driver(serial_drivers, id_table);
MODULE_LICENSE("GPL");
......
......@@ -216,14 +216,8 @@ static const struct usb_device_id id_table[] = {
{ USB_DEVICE(GARMIN_VENDOR_ID, 3) },
{ } /* Terminating entry */
};
MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver garmin_driver = {
.name = "garmin_gps",
.id_table = id_table,
};
static inline int getLayerId(const __u8 *usbPacket)
{
......@@ -1495,7 +1489,7 @@ static struct usb_serial_driver * const serial_drivers[] = {
&garmin_device, NULL
};
module_usb_serial_driver(garmin_driver, serial_drivers);
module_usb_serial_driver(serial_drivers, id_table);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
......
......@@ -46,11 +46,6 @@ static const struct usb_device_id generic_serial_ids[] = {
{}
};
static struct usb_driver generic_driver = {
.name = "usbserial_generic",
.id_table = generic_serial_ids,
};
/* All of the device info needed for the Generic Serial Converter */
struct usb_serial_driver usb_serial_generic_device = {
.driver = {
......@@ -84,7 +79,7 @@ int usb_serial_generic_register(int _debug)
USB_DEVICE_ID_MATCH_VENDOR | USB_DEVICE_ID_MATCH_PRODUCT;
/* register our generic driver with ourselves */
retval = usb_serial_register_drivers(&generic_driver, serial_drivers);
retval = usb_serial_register_drivers(serial_drivers, "usbserial_generic", generic_serial_ids);
#endif
return retval;
}
......@@ -93,7 +88,7 @@ void usb_serial_generic_deregister(void)
{
#ifdef CONFIG_USB_SERIAL_GENERIC
/* remove our generic driver */
usb_serial_deregister_drivers(&generic_driver, serial_drivers);
usb_serial_deregister_drivers(serial_drivers);
#endif
}
......
......@@ -36,11 +36,6 @@ static const struct usb_device_id id_table[] = {
MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver hp49gp_driver = {
.name = "hp4X",
.id_table = id_table,
};
static struct usb_serial_driver hp49gp_device = {
.driver = {
.owner = THIS_MODULE,
......@@ -54,7 +49,7 @@ static struct usb_serial_driver * const serial_drivers[] = {
&hp49gp_device, NULL
};
module_usb_serial_driver(hp49gp_driver, serial_drivers);
module_usb_serial_driver(serial_drivers, id_table);
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_VERSION(DRIVER_VERSION);
......
......@@ -3181,7 +3181,7 @@ static void edge_release(struct usb_serial *serial)
kfree(edge_serial);
}
module_usb_serial_driver(io_driver, serial_drivers);
module_usb_serial_driver(serial_drivers, id_table_combined);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
......
......@@ -95,11 +95,6 @@ static const struct usb_device_id id_table_combined[] = {
MODULE_DEVICE_TABLE(usb, id_table_combined);
static struct usb_driver io_driver = {
.name = "io_edgeport",
.id_table = id_table_combined,
};
static struct usb_serial_driver edgeport_2port_device = {
.driver = {
.owner = THIS_MODULE,
......
......@@ -197,12 +197,6 @@ static const struct usb_device_id id_table_combined[] = {
MODULE_DEVICE_TABLE(usb, id_table_combined);
static struct usb_driver io_driver = {
.name = "io_ti",
.id_table = id_table_combined,
};
static unsigned char OperationalMajorVersion;
static unsigned char OperationalMinorVersion;
static unsigned short OperationalBuildNumber;
......@@ -2788,7 +2782,7 @@ static struct usb_serial_driver * const serial_drivers[] = {
&edgeport_1port_device, &edgeport_2port_device, NULL
};
module_usb_serial_driver(io_driver, serial_drivers);
module_usb_serial_driver(serial_drivers, id_table_combined);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
......
......@@ -502,11 +502,6 @@ static struct usb_device_id ipaq_id_table [] = {
MODULE_DEVICE_TABLE(usb, ipaq_id_table);
static struct usb_driver ipaq_driver = {
.name = "ipaq",
.id_table = ipaq_id_table,
};
/* All of the device info needed for the Compaq iPAQ */
static struct usb_serial_driver ipaq_device = {
......@@ -614,7 +609,7 @@ static int ipaq_startup(struct usb_serial *serial)
return usb_reset_configuration(serial->dev);
}
module_usb_serial_driver(ipaq_driver, serial_drivers);
module_usb_serial_driver(serial_drivers, ipaq_id_table);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
......
......@@ -132,17 +132,11 @@ enum {
#define IPW_WANTS_TO_SEND 0x30
static const struct usb_device_id usb_ipw_ids[] = {
static const struct usb_device_id id_table[] = {
{ USB_DEVICE(IPW_VID, IPW_PID) },
{ },
};
MODULE_DEVICE_TABLE(usb, usb_ipw_ids);
static struct usb_driver usb_ipw_driver = {
.name = "ipwtty",
.id_table = usb_ipw_ids,
};
MODULE_DEVICE_TABLE(usb, id_table);
static bool debug;
......@@ -313,7 +307,7 @@ static struct usb_serial_driver ipw_device = {
.name = "ipw",
},
.description = "IPWireless converter",
.id_table = usb_ipw_ids,
.id_table = id_table,
.num_ports = 1,
.disconnect = usb_wwan_disconnect,
.open = ipw_open,
......@@ -329,7 +323,7 @@ static struct usb_serial_driver * const serial_drivers[] = {
&ipw_device, NULL
};
module_usb_serial_driver(usb_ipw_driver, serial_drivers);
module_usb_serial_driver(serial_drivers, id_table);
/* Module information */
MODULE_AUTHOR(DRIVER_AUTHOR);
......
......@@ -77,11 +77,6 @@ static const struct usb_device_id ir_id_table[] = {
MODULE_DEVICE_TABLE(usb, ir_id_table);
static struct usb_driver ir_driver = {
.name = "ir-usb",
.id_table = ir_id_table,
};
static struct usb_serial_driver ir_device = {
.driver = {
.owner = THIS_MODULE,
......@@ -436,7 +431,7 @@ static int __init ir_init(void)
ir_device.bulk_out_size = buffer_size;
}
retval = usb_serial_register_drivers(&ir_driver, serial_drivers);
retval = usb_serial_register_drivers(serial_drivers, KBUILD_MODNAME, ir_id_table);
if (retval == 0)
printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
DRIVER_DESC "\n");
......@@ -445,7 +440,7 @@ static int __init ir_init(void)
static void __exit ir_exit(void)
{
usb_serial_deregister_drivers(&ir_driver, serial_drivers);
usb_serial_deregister_drivers(serial_drivers);
}
......
......@@ -51,11 +51,6 @@ static const struct usb_device_id id_table[] = {
};
MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver iuu_driver = {
.name = "iuu_phoenix",
.id_table = id_table,
};
/* turbo parameter */
static int boost = 100;
static int clockmode = 1;
......@@ -1254,7 +1249,7 @@ static struct usb_serial_driver * const serial_drivers[] = {
&iuu_device, NULL
};
module_usb_serial_driver(iuu_driver, serial_drivers);
module_usb_serial_driver(serial_drivers, id_table);
MODULE_AUTHOR("Alain Degreffe eczema@ecze.com");
......
......@@ -130,7 +130,7 @@ struct keyspan_port_private {
#include "keyspan_usa67msg.h"
module_usb_serial_driver(keyspan_driver, serial_drivers);
module_usb_serial_driver(serial_drivers, keyspan_ids_combined);
static void keyspan_break_ctl(struct tty_struct *tty, int break_state)
{
......
......@@ -487,11 +487,6 @@ static const struct usb_device_id keyspan_ids_combined[] = {
MODULE_DEVICE_TABLE(usb, keyspan_ids_combined);
static struct usb_driver keyspan_driver = {
.name = "keyspan",
.id_table = keyspan_ids_combined,
};
/* usb_device_id table for the pre-firmware download keyspan devices */
static const struct usb_device_id keyspan_pre_ids[] = {
{ USB_DEVICE(KEYSPAN_VENDOR_ID, keyspan_usa18x_pre_product_id) },
......
......@@ -86,11 +86,6 @@ static const struct usb_device_id id_table_combined[] = {
MODULE_DEVICE_TABLE(usb, id_table_combined);
static struct usb_driver keyspan_pda_driver = {
.name = "keyspan_pda",
.id_table = id_table_combined,
};
static const struct usb_device_id id_table_std[] = {
{ USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_ID) },
{ } /* Terminating entry */
......@@ -828,7 +823,7 @@ static struct usb_serial_driver * const serial_drivers[] = {
NULL
};
module_usb_serial_driver(keyspan_pda_driver, serial_drivers);
module_usb_serial_driver(serial_drivers, id_table_combined);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
......
......@@ -86,11 +86,6 @@ static const struct usb_device_id id_table[] = {
MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver kl5kusb105d_driver = {
.name = "kl5kusb105d",
.id_table = id_table,
};
static struct usb_serial_driver kl5kusb105d_device = {
.driver = {
.owner = THIS_MODULE,
......@@ -681,7 +676,7 @@ static int klsi_105_tiocmset(struct tty_struct *tty,
return retval;
}
module_usb_serial_driver(kl5kusb105d_driver, serial_drivers);
module_usb_serial_driver(serial_drivers, id_table);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
......
......@@ -81,16 +81,8 @@ static const struct usb_device_id id_table[] = {
{ USB_DEVICE(KOBIL_VENDOR_ID, KOBIL_KAAN_SIM_PRODUCT_ID) },
{ } /* Terminating entry */
};
MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver kobil_driver = {
.name = "kobil",
.id_table = id_table,
};
static struct usb_serial_driver kobil_device = {
.driver = {
.owner = THIS_MODULE,
......@@ -674,7 +666,7 @@ static int kobil_ioctl(struct tty_struct *tty,
}
}
module_usb_serial_driver(kobil_driver, serial_drivers);
module_usb_serial_driver(serial_drivers, id_table);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
......
......@@ -73,20 +73,14 @@ static void mct_u232_unthrottle(struct tty_struct *tty);
/*
* All of the device info needed for the MCT USB-RS232 converter.
*/
static const struct usb_device_id id_table_combined[] = {
static const struct usb_device_id id_table[] = {
{ USB_DEVICE(MCT_U232_VID, MCT_U232_PID) },
{ USB_DEVICE(MCT_U232_VID, MCT_U232_SITECOM_PID) },
{ USB_DEVICE(MCT_U232_VID, MCT_U232_DU_H3SP_PID) },
{ USB_DEVICE(MCT_U232_BELKIN_F5U109_VID, MCT_U232_BELKIN_F5U109_PID) },
{ } /* Terminating entry */
};
MODULE_DEVICE_TABLE(usb, id_table_combined);
static struct usb_driver mct_u232_driver = {
.name = "mct_u232",
.id_table = id_table_combined,
};
MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_serial_driver mct_u232_device = {