提交 32078f91 编写于 作者: G Greg Kroah-Hartman

USB: serial: remove usb_serial_disconnect call in all drivers

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 <wgreathouse@smva.com>
Cc: Matthias Bruestle and Harald Welte <support@reiner-sct.com>
Cc: Lonnie Mendez <dignome@gmail.com>
Cc: Peter Berger <pberger@brimson.com>
Cc: Al Borchers <alborchers@steinerpoint.com>
Cc: Gary Brubaker <xavyer@ix.netcom.com>
Cc: Oliver Neukum <oliver@neukum.name>
Cc: Matthias Urlichs <smurf@smurf.noris.de>
Cc: Support Department <support@connecttech.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Kautuk Consul <consul.kautuk@gmail.com>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Bart Hartgers <bart.hartgers@gmail.com>
Cc: Johan Hovold <jhovold@gmail.com>
Cc: Preston Fick <preston.fick@silabs.com>
Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Cc: Simon Arlott <simon@fire.lp0.eu>
Cc: Andrew Worsley <amworsley@gmail.com>
Cc: "Michał Wróbel" <michal.wrobel@flytronic.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Aleksey Babahin <tamerlan311@gmail.com>
Cc: Dan Carpenter <error27@gmail.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Donald Lee <donald@asix.com.tw>
Cc: Julia Lawall <julia@diku.dk>
Cc: Michal Sroczynski <msroczyn@gmail.com>
Cc: Wang YanQing <Udknight@gmail.com>
Cc: Dan Williams <dcbw@redhat.com>
Cc: Thomas Tuttle <ttuttle@chromium.org>
Cc: Rigbert Hamisch <rigbert@gmx.de>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Jesper Juhl <jj@chaosbits.net>
Cc: Adhir Ramjiawan <adhirramjiawan0@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 5026bb07
...@@ -132,7 +132,6 @@ MODULE_DEVICE_TABLE(usb, quausb2_id_table); ...@@ -132,7 +132,6 @@ MODULE_DEVICE_TABLE(usb, quausb2_id_table);
/* custom structures we need go here */ /* custom structures we need go here */
static struct usb_driver quausb2_usb_driver = { static struct usb_driver quausb2_usb_driver = {
.name = "quatech-usb2-serial", .name = "quatech-usb2-serial",
.disconnect = usb_serial_disconnect,
.id_table = quausb2_id_table, .id_table = quausb2_id_table,
}; };
......
...@@ -197,7 +197,6 @@ struct quatech_port { ...@@ -197,7 +197,6 @@ struct quatech_port {
static struct usb_driver serqt_usb_driver = { static struct usb_driver serqt_usb_driver = {
.name = "quatech-usb-serial", .name = "quatech-usb-serial",
.disconnect = usb_serial_disconnect,
.id_table = serqt_id_table, .id_table = serqt_id_table,
}; };
......
...@@ -172,7 +172,6 @@ static void aircable_process_read_urb(struct urb *urb) ...@@ -172,7 +172,6 @@ static void aircable_process_read_urb(struct urb *urb)
static struct usb_driver aircable_driver = { static struct usb_driver aircable_driver = {
.name = "aircable", .name = "aircable",
.disconnect = usb_serial_disconnect,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -716,7 +716,6 @@ static void ark3116_process_read_urb(struct urb *urb) ...@@ -716,7 +716,6 @@ static void ark3116_process_read_urb(struct urb *urb)
static struct usb_driver ark3116_driver = { static struct usb_driver ark3116_driver = {
.name = "ark3116", .name = "ark3116",
.disconnect = usb_serial_disconnect,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -75,7 +75,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined); ...@@ -75,7 +75,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined);
static struct usb_driver belkin_driver = { static struct usb_driver belkin_driver = {
.name = "belkin", .name = "belkin",
.disconnect = usb_serial_disconnect,
.id_table = id_table_combined, .id_table = id_table_combined,
}; };
......
...@@ -597,7 +597,6 @@ static int ch341_reset_resume(struct usb_interface *intf) ...@@ -597,7 +597,6 @@ static int ch341_reset_resume(struct usb_interface *intf)
static struct usb_driver ch341_driver = { static struct usb_driver ch341_driver = {
.name = "ch341", .name = "ch341",
.disconnect = usb_serial_disconnect,
.reset_resume = ch341_reset_resume, .reset_resume = ch341_reset_resume,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -158,7 +158,6 @@ struct cp210x_port_private { ...@@ -158,7 +158,6 @@ struct cp210x_port_private {
static struct usb_driver cp210x_driver = { static struct usb_driver cp210x_driver = {
.name = "cp210x", .name = "cp210x",
.disconnect = usb_serial_disconnect,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -79,7 +79,6 @@ MODULE_DEVICE_TABLE(usb, id_table); ...@@ -79,7 +79,6 @@ MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver cyberjack_driver = { static struct usb_driver cyberjack_driver = {
.name = "cyberjack", .name = "cyberjack",
.disconnect = usb_serial_disconnect,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -91,7 +91,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined); ...@@ -91,7 +91,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined);
static struct usb_driver cypress_driver = { static struct usb_driver cypress_driver = {
.name = "cypress", .name = "cypress",
.disconnect = usb_serial_disconnect,
.id_table = id_table_combined, .id_table = id_table_combined,
}; };
......
...@@ -273,7 +273,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined); ...@@ -273,7 +273,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined);
static struct usb_driver digi_driver = { static struct usb_driver digi_driver = {
.name = "digi_acceleport", .name = "digi_acceleport",
.disconnect = usb_serial_disconnect,
.id_table = id_table_combined, .id_table = id_table_combined,
}; };
......
...@@ -53,7 +53,6 @@ MODULE_DEVICE_TABLE(usb, id_table); ...@@ -53,7 +53,6 @@ MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver empeg_driver = { static struct usb_driver empeg_driver = {
.name = "empeg", .name = "empeg",
.disconnect = usb_serial_disconnect,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -352,7 +352,6 @@ static void f81232_release(struct usb_serial *serial) ...@@ -352,7 +352,6 @@ static void f81232_release(struct usb_serial *serial)
static struct usb_driver f81232_driver = { static struct usb_driver f81232_driver = {
.name = "f81232", .name = "f81232",
.disconnect = usb_serial_disconnect,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -863,7 +863,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined); ...@@ -863,7 +863,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined);
static struct usb_driver ftdi_driver = { static struct usb_driver ftdi_driver = {
.name = "ftdi_sio", .name = "ftdi_sio",
.disconnect = usb_serial_disconnect,
.id_table = id_table_combined, .id_table = id_table_combined,
}; };
......
...@@ -26,7 +26,6 @@ MODULE_DEVICE_TABLE(usb, id_table); ...@@ -26,7 +26,6 @@ MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver funsoft_driver = { static struct usb_driver funsoft_driver = {
.name = "funsoft", .name = "funsoft",
.disconnect = usb_serial_disconnect,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -221,7 +221,6 @@ MODULE_DEVICE_TABLE(usb, id_table); ...@@ -221,7 +221,6 @@ MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver garmin_driver = { static struct usb_driver garmin_driver = {
.name = "garmin_gps", .name = "garmin_gps",
.disconnect = usb_serial_disconnect,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -52,7 +52,6 @@ static const struct usb_device_id generic_serial_ids[] = { ...@@ -52,7 +52,6 @@ static const struct usb_device_id generic_serial_ids[] = {
static struct usb_driver generic_driver = { static struct usb_driver generic_driver = {
.name = "usbserial_generic", .name = "usbserial_generic",
.probe = generic_probe, .probe = generic_probe,
.disconnect = usb_serial_disconnect,
.id_table = generic_serial_ids, .id_table = generic_serial_ids,
}; };
......
...@@ -38,7 +38,6 @@ MODULE_DEVICE_TABLE(usb, id_table); ...@@ -38,7 +38,6 @@ MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver hp49gp_driver = { static struct usb_driver hp49gp_driver = {
.name = "hp4X", .name = "hp4X",
.disconnect = usb_serial_disconnect,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -97,7 +97,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined); ...@@ -97,7 +97,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined);
static struct usb_driver io_driver = { static struct usb_driver io_driver = {
.name = "io_edgeport", .name = "io_edgeport",
.disconnect = usb_serial_disconnect,
.id_table = id_table_combined, .id_table = id_table_combined,
}; };
......
...@@ -199,7 +199,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined); ...@@ -199,7 +199,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined);
static struct usb_driver io_driver = { static struct usb_driver io_driver = {
.name = "io_ti", .name = "io_ti",
.disconnect = usb_serial_disconnect,
.id_table = id_table_combined, .id_table = id_table_combined,
}; };
......
...@@ -504,7 +504,6 @@ MODULE_DEVICE_TABLE(usb, ipaq_id_table); ...@@ -504,7 +504,6 @@ MODULE_DEVICE_TABLE(usb, ipaq_id_table);
static struct usb_driver ipaq_driver = { static struct usb_driver ipaq_driver = {
.name = "ipaq", .name = "ipaq",
.disconnect = usb_serial_disconnect,
.id_table = ipaq_id_table, .id_table = ipaq_id_table,
}; };
......
...@@ -141,7 +141,6 @@ MODULE_DEVICE_TABLE(usb, usb_ipw_ids); ...@@ -141,7 +141,6 @@ MODULE_DEVICE_TABLE(usb, usb_ipw_ids);
static struct usb_driver usb_ipw_driver = { static struct usb_driver usb_ipw_driver = {
.name = "ipwtty", .name = "ipwtty",
.disconnect = usb_serial_disconnect,
.id_table = usb_ipw_ids, .id_table = usb_ipw_ids,
}; };
......
...@@ -79,7 +79,6 @@ MODULE_DEVICE_TABLE(usb, ir_id_table); ...@@ -79,7 +79,6 @@ MODULE_DEVICE_TABLE(usb, ir_id_table);
static struct usb_driver ir_driver = { static struct usb_driver ir_driver = {
.name = "ir-usb", .name = "ir-usb",
.disconnect = usb_serial_disconnect,
.id_table = ir_id_table, .id_table = ir_id_table,
}; };
......
...@@ -53,7 +53,6 @@ MODULE_DEVICE_TABLE(usb, id_table); ...@@ -53,7 +53,6 @@ MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver iuu_driver = { static struct usb_driver iuu_driver = {
.name = "iuu_phoenix", .name = "iuu_phoenix",
.disconnect = usb_serial_disconnect,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -489,7 +489,6 @@ MODULE_DEVICE_TABLE(usb, keyspan_ids_combined); ...@@ -489,7 +489,6 @@ MODULE_DEVICE_TABLE(usb, keyspan_ids_combined);
static struct usb_driver keyspan_driver = { static struct usb_driver keyspan_driver = {
.name = "keyspan", .name = "keyspan",
.disconnect = usb_serial_disconnect,
.id_table = keyspan_ids_combined, .id_table = keyspan_ids_combined,
}; };
......
...@@ -88,7 +88,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined); ...@@ -88,7 +88,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined);
static struct usb_driver keyspan_pda_driver = { static struct usb_driver keyspan_pda_driver = {
.name = "keyspan_pda", .name = "keyspan_pda",
.disconnect = usb_serial_disconnect,
.id_table = id_table_combined, .id_table = id_table_combined,
}; };
......
...@@ -88,7 +88,6 @@ MODULE_DEVICE_TABLE(usb, id_table); ...@@ -88,7 +88,6 @@ MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver kl5kusb105d_driver = { static struct usb_driver kl5kusb105d_driver = {
.name = "kl5kusb105d", .name = "kl5kusb105d",
.disconnect = usb_serial_disconnect,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -87,7 +87,6 @@ MODULE_DEVICE_TABLE(usb, id_table); ...@@ -87,7 +87,6 @@ MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver kobil_driver = { static struct usb_driver kobil_driver = {
.name = "kobil", .name = "kobil",
.disconnect = usb_serial_disconnect,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -85,7 +85,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined); ...@@ -85,7 +85,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined);
static struct usb_driver mct_u232_driver = { static struct usb_driver mct_u232_driver = {
.name = "mct_u232", .name = "mct_u232",
.disconnect = usb_serial_disconnect,
.id_table = id_table_combined, .id_table = id_table_combined,
}; };
......
...@@ -421,7 +421,6 @@ static void metrousb_unthrottle(struct tty_struct *tty) ...@@ -421,7 +421,6 @@ static void metrousb_unthrottle(struct tty_struct *tty)
static struct usb_driver metrousb_driver = { static struct usb_driver metrousb_driver = {
.name = "metro-usb", .name = "metro-usb",
.disconnect = usb_serial_disconnect,
.id_table = id_table .id_table = id_table
}; };
......
...@@ -2160,7 +2160,6 @@ static void mos7720_release(struct usb_serial *serial) ...@@ -2160,7 +2160,6 @@ static void mos7720_release(struct usb_serial *serial)
static struct usb_driver usb_driver = { static struct usb_driver usb_driver = {
.name = "moschip7720", .name = "moschip7720",
.disconnect = usb_serial_disconnect,
.id_table = moschip_port_id_table, .id_table = moschip_port_id_table,
}; };
......
...@@ -2785,7 +2785,6 @@ static void mos7840_release(struct usb_serial *serial) ...@@ -2785,7 +2785,6 @@ static void mos7840_release(struct usb_serial *serial)
static struct usb_driver io_driver = { static struct usb_driver io_driver = {
.name = "mos7840", .name = "mos7840",
.disconnect = usb_serial_disconnect,
.id_table = moschip_id_table_combined, .id_table = moschip_id_table_combined,
}; };
......
...@@ -33,7 +33,6 @@ MODULE_DEVICE_TABLE(usb, id_table); ...@@ -33,7 +33,6 @@ MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver moto_driver = { static struct usb_driver moto_driver = {
.name = "moto-modem", .name = "moto-modem",
.disconnect = usb_serial_disconnect,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -32,7 +32,6 @@ MODULE_DEVICE_TABLE(usb, id_table); ...@@ -32,7 +32,6 @@ MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver navman_driver = { static struct usb_driver navman_driver = {
.name = "navman", .name = "navman",
.disconnect = usb_serial_disconnect,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -59,7 +59,6 @@ MODULE_DEVICE_TABLE(usb, id_table); ...@@ -59,7 +59,6 @@ MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver omninet_driver = { static struct usb_driver omninet_driver = {
.name = "omninet", .name = "omninet",
.disconnect = usb_serial_disconnect,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -585,7 +585,6 @@ static int opticon_resume(struct usb_interface *intf) ...@@ -585,7 +585,6 @@ static int opticon_resume(struct usb_interface *intf)
static struct usb_driver opticon_driver = { static struct usb_driver opticon_driver = {
.name = "opticon", .name = "opticon",
.disconnect = usb_serial_disconnect,
.suspend = opticon_suspend, .suspend = opticon_suspend,
.resume = opticon_resume, .resume = opticon_resume,
.id_table = id_table, .id_table = id_table,
......
...@@ -1222,7 +1222,6 @@ MODULE_DEVICE_TABLE(usb, option_ids); ...@@ -1222,7 +1222,6 @@ MODULE_DEVICE_TABLE(usb, option_ids);
static struct usb_driver option_driver = { static struct usb_driver option_driver = {
.name = "option", .name = "option",
.disconnect = usb_serial_disconnect,
.id_table = option_ids, .id_table = option_ids,
}; };
......
...@@ -68,7 +68,6 @@ MODULE_DEVICE_TABLE(usb, id_table); ...@@ -68,7 +68,6 @@ MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver oti6858_driver = { static struct usb_driver oti6858_driver = {
.name = "oti6858", .name = "oti6858",
.disconnect = usb_serial_disconnect,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -97,7 +97,6 @@ MODULE_DEVICE_TABLE(usb, id_table); ...@@ -97,7 +97,6 @@ MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver pl2303_driver = { static struct usb_driver pl2303_driver = {
.name = "pl2303", .name = "pl2303",
.disconnect = usb_serial_disconnect,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -79,7 +79,6 @@ MODULE_DEVICE_TABLE(usb, id_table); ...@@ -79,7 +79,6 @@ MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver qcaux_driver = { static struct usb_driver qcaux_driver = {
.name = "qcaux", .name = "qcaux",
.disconnect = usb_serial_disconnect,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -114,7 +114,6 @@ MODULE_DEVICE_TABLE(usb, id_table); ...@@ -114,7 +114,6 @@ MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver qcdriver = { static struct usb_driver qcdriver = {
.name = "qcserial", .name = "qcserial",
.disconnect = usb_serial_disconnect,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -153,7 +153,6 @@ MODULE_DEVICE_TABLE(usb, id_table); ...@@ -153,7 +153,6 @@ MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver safe_driver = { static struct usb_driver safe_driver = {
.name = "safe_serial", .name = "safe_serial",
.disconnect = usb_serial_disconnect,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -31,7 +31,6 @@ MODULE_DEVICE_TABLE(usb, id_table); ...@@ -31,7 +31,6 @@ MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver siemens_usb_mpi_driver = { static struct usb_driver siemens_usb_mpi_driver = {
.name = "siemens_mpi", .name = "siemens_mpi",
.disconnect = usb_serial_disconnect,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -1053,7 +1053,6 @@ static int sierra_reset_resume(struct usb_interface *intf) ...@@ -1053,7 +1053,6 @@ static int sierra_reset_resume(struct usb_interface *intf)
static struct usb_driver sierra_driver = { static struct usb_driver sierra_driver = {
.name = "sierra", .name = "sierra",
.disconnect = usb_serial_disconnect,
.reset_resume = sierra_reset_resume, .reset_resume = sierra_reset_resume,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -153,7 +153,6 @@ enum spcp8x5_type { ...@@ -153,7 +153,6 @@ enum spcp8x5_type {
static struct usb_driver spcp8x5_driver = { static struct usb_driver spcp8x5_driver = {
.name = "spcp8x5", .name = "spcp8x5",
.disconnect = usb_serial_disconnect,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -65,7 +65,6 @@ MODULE_DEVICE_TABLE(usb, id_table); ...@@ -65,7 +65,6 @@ MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver ssu100_driver = { static struct usb_driver ssu100_driver = {
.name = "ssu100", .name = "ssu100",
.disconnect = usb_serial_disconnect,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -271,7 +271,6 @@ static void symbol_release(struct usb_serial *serial) ...@@ -271,7 +271,6 @@ static void symbol_release(struct usb_serial *serial)
static struct usb_driver symbol_driver = { static struct usb_driver symbol_driver = {
.name = "symbol", .name = "symbol",
.disconnect = usb_serial_disconnect,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -213,7 +213,6 @@ static struct usb_device_id ti_id_table_combined[18+2*TI_EXTRA_VID_PID_COUNT+1] ...@@ -213,7 +213,6 @@ static struct usb_device_id ti_id_table_combined[18+2*TI_EXTRA_VID_PID_COUNT+1]
static struct usb_driver ti_usb_driver = { static struct usb_driver ti_usb_driver = {
.name = "ti_usb_3410_5052", .name = "ti_usb_3410_5052",
.disconnect = usb_serial_disconnect,
.id_table = ti_id_table_combined, .id_table = ti_id_table_combined,
}; };
......
...@@ -43,17 +43,6 @@ ...@@ -43,17 +43,6 @@
#define DRIVER_AUTHOR "Greg Kroah-Hartman, greg@kroah.com, http://www.kroah.com/linux/" #define DRIVER_AUTHOR "Greg Kroah-Hartman, greg@kroah.com, http://www.kroah.com/linux/"
#define DRIVER_DESC "USB Serial Driver core" #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 /* There is no MODULE_DEVICE_TABLE for usbserial.c. Instead
the MODULE_DEVICE_TABLE declarations in each serial driver the MODULE_DEVICE_TABLE declarations in each serial driver
cause the "hotplug" program to pull in whatever module is necessary cause the "hotplug" program to pull in whatever module is necessary
...@@ -1099,7 +1088,7 @@ int usb_serial_probe(struct usb_interface *interface, ...@@ -1099,7 +1088,7 @@ int usb_serial_probe(struct usb_interface *interface,
return -EIO; return -EIO;
} }
void usb_serial_disconnect(struct usb_interface *interface) static void usb_serial_disconnect(struct usb_interface *interface)
{ {
int i; int i;
struct usb_serial *serial = usb_get_intfdata(interface); struct usb_serial *serial = usb_get_intfdata(interface);
...@@ -1134,7 +1123,6 @@ void usb_serial_disconnect(struct usb_interface *interface) ...@@ -1134,7 +1123,6 @@ void usb_serial_disconnect(struct usb_interface *interface)
usb_serial_put(serial); usb_serial_put(serial);
dev_info(dev, "device disconnected\n"); dev_info(dev, "device disconnected\n");
} }
EXPORT_SYMBOL_GPL(usb_serial_disconnect);
int usb_serial_suspend(struct usb_interface *intf, pm_message_t message) int usb_serial_suspend(struct usb_interface *intf, pm_message_t message)
{ {
...@@ -1201,6 +1189,17 @@ static const struct tty_operations serial_ops = { ...@@ -1201,6 +1189,17 @@ static const struct tty_operations serial_ops = {
struct tty_driver *usb_serial_tty_driver; 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) static int __init usb_serial_init(void)
{ {
int i; int i;
...@@ -1400,6 +1399,7 @@ int usb_serial_register_drivers(struct usb_driver *udriver, ...@@ -1400,6 +1399,7 @@ int usb_serial_register_drivers(struct usb_driver *udriver,
udriver->suspend = usb_serial_suspend; udriver->suspend = usb_serial_suspend;
udriver->resume = usb_serial_resume; udriver->resume = usb_serial_resume;
udriver->probe = usb_serial_probe; udriver->probe = usb_serial_probe;
udriver->disconnect = usb_serial_disconnect;
rc = usb_register(udriver); rc = usb_register(udriver);
if (rc) if (rc)
return rc; return rc;
......
...@@ -37,7 +37,6 @@ MODULE_DEVICE_TABLE(usb, id_table); ...@@ -37,7 +37,6 @@ MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver debug_driver = { static struct usb_driver debug_driver = {
.name = "debug", .name = "debug",
.disconnect = usb_serial_disconnect,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -165,7 +165,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined); ...@@ -165,7 +165,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined);
static struct usb_driver visor_driver = { static struct usb_driver visor_driver = {
.name = "visor", .name = "visor",
.disconnect = usb_serial_disconnect,
.id_table = id_table_combined, .id_table = id_table_combined,
}; };
......
...@@ -27,7 +27,6 @@ MODULE_DEVICE_TABLE(usb, id_table); ...@@ -27,7 +27,6 @@ MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver vivopay_serial_driver = { static struct usb_driver vivopay_serial_driver = {
.name = "vivopay-serial", .name = "vivopay-serial",
.disconnect = usb_serial_disconnect,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -79,7 +79,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined); ...@@ -79,7 +79,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined);
static struct usb_driver whiteheat_driver = { static struct usb_driver whiteheat_driver = {
.name = "whiteheat", .name = "whiteheat",
.disconnect = usb_serial_disconnect,
.id_table = id_table_combined, .id_table = id_table_combined,
}; };
......
...@@ -24,7 +24,6 @@ MODULE_DEVICE_TABLE(usb, id_table); ...@@ -24,7 +24,6 @@ MODULE_DEVICE_TABLE(usb, id_table);
static struct usb_driver zio_driver = { static struct usb_driver zio_driver = {
.name = "zio", .name = "zio",
.disconnect = usb_serial_disconnect,
.id_table = id_table, .id_table = id_table,
}; };
......
...@@ -300,7 +300,6 @@ extern void usb_serial_port_softint(struct usb_serial_port *port); ...@@ -300,7 +300,6 @@ extern void usb_serial_port_softint(struct usb_serial_port *port);
extern int usb_serial_probe(struct usb_interface *iface, extern int usb_serial_probe(struct usb_interface *iface,
const struct usb_device_id *id); const struct usb_device_id *id);
extern void usb_serial_disconnect(struct usb_interface *iface);
extern int usb_serial_suspend(struct usb_interface *intf, pm_message_t message); extern int usb_serial_suspend(struct usb_interface *intf, pm_message_t message);
extern int usb_serial_resume(struct usb_interface *intf); extern int usb_serial_resume(struct usb_interface *intf);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册