From 32078f915d1acab356080b144aa89fe3487f3979 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 7 May 2012 14:02:13 -0700 Subject: USB: serial: remove usb_serial_disconnect call in all drivers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is now set by the usb-serial core, no need for the driver to individually set it. Thanks to Alan Stern for the idea to get rid of it. Cc: William Greathouse Cc: Matthias Bruestle and Harald Welte Cc: Lonnie Mendez Cc: Peter Berger Cc: Al Borchers Cc: Gary Brubaker Cc: Oliver Neukum Cc: Matthias Urlichs Cc: Support Department Cc: Rusty Russell Cc: Alan Stern Cc: Mauro Carvalho Chehab Cc: Kautuk Consul Cc: Bill Pemberton Cc: Paul Gortmaker Cc: Bart Hartgers Cc: Johan Hovold Cc: Preston Fick Cc: Uwe Bonnes Cc: Simon Arlott Cc: Andrew Worsley Cc: "Michał Wróbel" Cc: Andrew Morton Cc: Eric Dumazet Cc: "Eric W. Biederman" Cc: Felipe Balbi Cc: Aleksey Babahin Cc: Dan Carpenter Cc: Jiri Kosina Cc: Donald Lee Cc: Julia Lawall Cc: Michal Sroczynski Cc: Wang YanQing Cc: Dan Williams Cc: Thomas Tuttle Cc: Rigbert Hamisch Cc: "Rafael J. Wysocki" Cc: Kuninori Morimoto Cc: Jesper Juhl Cc: Adhir Ramjiawan Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/usb-serial.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'drivers/usb/serial/usb-serial.c') diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index e8c4ac964e39..9791312052e9 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c @@ -43,17 +43,6 @@ #define DRIVER_AUTHOR "Greg Kroah-Hartman, greg@kroah.com, http://www.kroah.com/linux/" #define DRIVER_DESC "USB Serial Driver core" -/* 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, -}; - /* There is no MODULE_DEVICE_TABLE for usbserial.c. Instead the MODULE_DEVICE_TABLE declarations in each serial driver cause the "hotplug" program to pull in whatever module is necessary @@ -1099,7 +1088,7 @@ probe_error: return -EIO; } -void usb_serial_disconnect(struct usb_interface *interface) +static void usb_serial_disconnect(struct usb_interface *interface) { int i; struct usb_serial *serial = usb_get_intfdata(interface); @@ -1134,7 +1123,6 @@ void usb_serial_disconnect(struct usb_interface *interface) usb_serial_put(serial); dev_info(dev, "device disconnected\n"); } -EXPORT_SYMBOL_GPL(usb_serial_disconnect); int usb_serial_suspend(struct usb_interface *intf, pm_message_t message) { @@ -1201,6 +1189,17 @@ 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 i; @@ -1400,6 +1399,7 @@ int usb_serial_register_drivers(struct usb_driver *udriver, udriver->suspend = usb_serial_suspend; udriver->resume = usb_serial_resume; udriver->probe = usb_serial_probe; + udriver->disconnect = usb_serial_disconnect; rc = usb_register(udriver); if (rc) return rc; -- cgit v1.2.3