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

Commit 2944fd27 authored by Johan Hovold's avatar Johan Hovold
Browse files

USB: serial: drop unused core USB driver



Drop the usb-serial-core USB driver that was registered at module init
but then never used.

This was a remnant dating back to 2004 (!) when this struct usb_driver
was used for the generic driver; see commit bbc53b7d7322 ("USB: fix bug
where removing usb-serial modules or usb serial devices could oops") in
the tglx bitkeeper-history archive.

Note that every usb-serial driver (including the generic one) registers
its own USB (interface) driver along with its usb-serial bus drivers.

Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
parent ee13a25f
Loading
Loading
Loading
Loading
+0 −22
Original line number Diff line number Diff line
@@ -1201,17 +1201,6 @@ static const struct tty_operations serial_ops = {

struct tty_driver *usb_serial_tty_driver;

/* Driver structure we register with the USB core */
static struct usb_driver usb_serial_driver = {
	.name =		"usbserial",
	.probe =	usb_serial_probe,
	.disconnect =	usb_serial_disconnect,
	.suspend =	usb_serial_suspend,
	.resume =	usb_serial_resume,
	.no_dynamic_id =	1,
	.supports_autosuspend =	1,
};

static int __init usb_serial_init(void)
{
	int result;
@@ -1247,13 +1236,6 @@ static int __init usb_serial_init(void)
		goto exit_reg_driver;
	}

	/* register the USB driver */
	result = usb_register(&usb_serial_driver);
	if (result < 0) {
		pr_err("%s - usb_register failed\n", __func__);
		goto exit_tty;
	}

	/* register the generic driver, if we should */
	result = usb_serial_generic_register();
	if (result < 0) {
@@ -1264,9 +1246,6 @@ static int __init usb_serial_init(void)
	return result;

exit_generic:
	usb_deregister(&usb_serial_driver);

exit_tty:
	tty_unregister_driver(usb_serial_tty_driver);

exit_reg_driver:
@@ -1285,7 +1264,6 @@ static void __exit usb_serial_exit(void)

	usb_serial_generic_deregister();

	usb_deregister(&usb_serial_driver);
	tty_unregister_driver(usb_serial_tty_driver);
	put_tty_driver(usb_serial_tty_driver);
	bus_unregister(&usb_serial_bus_type);