From 32078f915d1acab356080b144aa89fe3487f3979 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 7 May 2012 14:02:13 -0700 Subject: [PATCH] USB: serial: remove usb_serial_disconnect call in all drivers MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 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/staging/quatech_usb2/quatech_usb2.c | 1 - drivers/staging/serqt_usb2/serqt_usb2.c | 1 - drivers/usb/serial/aircable.c | 1 - drivers/usb/serial/ark3116.c | 1 - drivers/usb/serial/belkin_sa.c | 1 - drivers/usb/serial/ch341.c | 1 - drivers/usb/serial/cp210x.c | 1 - drivers/usb/serial/cyberjack.c | 1 - drivers/usb/serial/cypress_m8.c | 1 - drivers/usb/serial/digi_acceleport.c | 1 - drivers/usb/serial/empeg.c | 1 - drivers/usb/serial/f81232.c | 1 - drivers/usb/serial/ftdi_sio.c | 1 - drivers/usb/serial/funsoft.c | 1 - drivers/usb/serial/garmin_gps.c | 1 - drivers/usb/serial/generic.c | 1 - drivers/usb/serial/hp4x.c | 1 - drivers/usb/serial/io_tables.h | 1 - drivers/usb/serial/io_ti.c | 1 - drivers/usb/serial/ipaq.c | 1 - drivers/usb/serial/ipw.c | 1 - drivers/usb/serial/ir-usb.c | 1 - drivers/usb/serial/iuu_phoenix.c | 1 - drivers/usb/serial/keyspan.h | 1 - drivers/usb/serial/keyspan_pda.c | 1 - drivers/usb/serial/kl5kusb105.c | 1 - drivers/usb/serial/kobil_sct.c | 1 - drivers/usb/serial/mct_u232.c | 1 - drivers/usb/serial/metro-usb.c | 1 - drivers/usb/serial/mos7720.c | 1 - drivers/usb/serial/mos7840.c | 1 - drivers/usb/serial/moto_modem.c | 1 - drivers/usb/serial/navman.c | 1 - drivers/usb/serial/omninet.c | 1 - drivers/usb/serial/opticon.c | 1 - drivers/usb/serial/option.c | 1 - drivers/usb/serial/oti6858.c | 1 - drivers/usb/serial/pl2303.c | 1 - drivers/usb/serial/qcaux.c | 1 - drivers/usb/serial/qcserial.c | 1 - drivers/usb/serial/safe_serial.c | 1 - drivers/usb/serial/siemens_mpi.c | 1 - drivers/usb/serial/sierra.c | 1 - drivers/usb/serial/spcp8x5.c | 1 - drivers/usb/serial/ssu100.c | 1 - drivers/usb/serial/symbolserial.c | 1 - drivers/usb/serial/ti_usb_3410_5052.c | 1 - drivers/usb/serial/usb-serial.c | 26 +++++++++++++------------- drivers/usb/serial/usb_debug.c | 1 - drivers/usb/serial/visor.c | 1 - drivers/usb/serial/vivopay-serial.c | 1 - drivers/usb/serial/whiteheat.c | 1 - drivers/usb/serial/zio.c | 1 - include/linux/usb/serial.h | 1 - 54 files changed, 13 insertions(+), 66 deletions(-) diff --git a/drivers/staging/quatech_usb2/quatech_usb2.c b/drivers/staging/quatech_usb2/quatech_usb2.c index 70147b9..4e9c00e 100644 --- a/drivers/staging/quatech_usb2/quatech_usb2.c +++ b/drivers/staging/quatech_usb2/quatech_usb2.c @@ -132,7 +132,6 @@ MODULE_DEVICE_TABLE(usb, quausb2_id_table); /* custom structures we need go here */ static struct usb_driver quausb2_usb_driver = { .name = "quatech-usb2-serial", - .disconnect = usb_serial_disconnect, .id_table = quausb2_id_table, }; diff --git a/drivers/staging/serqt_usb2/serqt_usb2.c b/drivers/staging/serqt_usb2/serqt_usb2.c index d6e5e18..1ffdaef 100644 --- a/drivers/staging/serqt_usb2/serqt_usb2.c +++ b/drivers/staging/serqt_usb2/serqt_usb2.c @@ -197,7 +197,6 @@ struct quatech_port { static struct usb_driver serqt_usb_driver = { .name = "quatech-usb-serial", - .disconnect = usb_serial_disconnect, .id_table = serqt_id_table, }; diff --git a/drivers/usb/serial/aircable.c b/drivers/usb/serial/aircable.c index ac69b82..93aabd2 100644 --- a/drivers/usb/serial/aircable.c +++ b/drivers/usb/serial/aircable.c @@ -172,7 +172,6 @@ static void aircable_process_read_urb(struct urb *urb) static struct usb_driver aircable_driver = { .name = "aircable", - .disconnect = usb_serial_disconnect, .id_table = id_table, }; diff --git a/drivers/usb/serial/ark3116.c b/drivers/usb/serial/ark3116.c index 33dc0e3..4b79679 100644 --- a/drivers/usb/serial/ark3116.c +++ b/drivers/usb/serial/ark3116.c @@ -716,7 +716,6 @@ static void ark3116_process_read_urb(struct urb *urb) static struct usb_driver ark3116_driver = { .name = "ark3116", - .disconnect = usb_serial_disconnect, .id_table = id_table, }; diff --git a/drivers/usb/serial/belkin_sa.c b/drivers/usb/serial/belkin_sa.c index eb12616..13031bb 100644 --- a/drivers/usb/serial/belkin_sa.c +++ b/drivers/usb/serial/belkin_sa.c @@ -75,7 +75,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined); static struct usb_driver belkin_driver = { .name = "belkin", - .disconnect = usb_serial_disconnect, .id_table = id_table_combined, }; diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c index 83fd8e08..4f0260a 100644 --- a/drivers/usb/serial/ch341.c +++ b/drivers/usb/serial/ch341.c @@ -597,7 +597,6 @@ static int ch341_reset_resume(struct usb_interface *intf) static struct usb_driver ch341_driver = { .name = "ch341", - .disconnect = usb_serial_disconnect, .reset_resume = ch341_reset_resume, .id_table = id_table, }; diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index cbfc08d..02a1cab 100644 --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c @@ -158,7 +158,6 @@ struct cp210x_port_private { static struct usb_driver cp210x_driver = { .name = "cp210x", - .disconnect = usb_serial_disconnect, .id_table = id_table, }; diff --git a/drivers/usb/serial/cyberjack.c b/drivers/usb/serial/cyberjack.c index 5e76508..37fb911 100644 --- a/drivers/usb/serial/cyberjack.c +++ b/drivers/usb/serial/cyberjack.c @@ -79,7 +79,6 @@ MODULE_DEVICE_TABLE(usb, id_table); static struct usb_driver cyberjack_driver = { .name = "cyberjack", - .disconnect = usb_serial_disconnect, .id_table = id_table, }; diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index 14b64ba..df53d57 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c @@ -91,7 +91,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined); static struct usb_driver cypress_driver = { .name = "cypress", - .disconnect = usb_serial_disconnect, .id_table = id_table_combined, }; diff --git a/drivers/usb/serial/digi_acceleport.c b/drivers/usb/serial/digi_acceleport.c index 00abe81..3b584db 100644 --- a/drivers/usb/serial/digi_acceleport.c +++ b/drivers/usb/serial/digi_acceleport.c @@ -273,7 +273,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined); static struct usb_driver digi_driver = { .name = "digi_acceleport", - .disconnect = usb_serial_disconnect, .id_table = id_table_combined, }; diff --git a/drivers/usb/serial/empeg.c b/drivers/usb/serial/empeg.c index cbef1a5..80447e5 100644 --- a/drivers/usb/serial/empeg.c +++ b/drivers/usb/serial/empeg.c @@ -53,7 +53,6 @@ MODULE_DEVICE_TABLE(usb, id_table); static struct usb_driver empeg_driver = { .name = "empeg", - .disconnect = usb_serial_disconnect, .id_table = id_table, }; diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c index db65e7e..9052ec3 100644 --- a/drivers/usb/serial/f81232.c +++ b/drivers/usb/serial/f81232.c @@ -352,7 +352,6 @@ static void f81232_release(struct usb_serial *serial) static struct usb_driver f81232_driver = { .name = "f81232", - .disconnect = usb_serial_disconnect, .id_table = id_table, }; diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 40f9993..7fbba46 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -863,7 +863,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined); static struct usb_driver ftdi_driver = { .name = "ftdi_sio", - .disconnect = usb_serial_disconnect, .id_table = id_table_combined, }; diff --git a/drivers/usb/serial/funsoft.c b/drivers/usb/serial/funsoft.c index 168acbb..2049911 100644 --- a/drivers/usb/serial/funsoft.c +++ b/drivers/usb/serial/funsoft.c @@ -26,7 +26,6 @@ MODULE_DEVICE_TABLE(usb, id_table); static struct usb_driver funsoft_driver = { .name = "funsoft", - .disconnect = usb_serial_disconnect, .id_table = id_table, }; diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c index 3a57059..0e595a6 100644 --- a/drivers/usb/serial/garmin_gps.c +++ b/drivers/usb/serial/garmin_gps.c @@ -221,7 +221,6 @@ MODULE_DEVICE_TABLE(usb, id_table); static struct usb_driver garmin_driver = { .name = "garmin_gps", - .disconnect = usb_serial_disconnect, .id_table = id_table, }; diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index 2cc39ba..a2dcf08 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c @@ -52,7 +52,6 @@ static const struct usb_device_id generic_serial_ids[] = { static struct usb_driver generic_driver = { .name = "usbserial_generic", .probe = generic_probe, - .disconnect = usb_serial_disconnect, .id_table = generic_serial_ids, }; diff --git a/drivers/usb/serial/hp4x.c b/drivers/usb/serial/hp4x.c index d800ff3..37fe402 100644 --- a/drivers/usb/serial/hp4x.c +++ b/drivers/usb/serial/hp4x.c @@ -38,7 +38,6 @@ MODULE_DEVICE_TABLE(usb, id_table); static struct usb_driver hp49gp_driver = { .name = "hp4X", - .disconnect = usb_serial_disconnect, .id_table = id_table, }; diff --git a/drivers/usb/serial/io_tables.h b/drivers/usb/serial/io_tables.h index 7498b5e..650693b 100644 --- a/drivers/usb/serial/io_tables.h +++ b/drivers/usb/serial/io_tables.h @@ -97,7 +97,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined); static struct usb_driver io_driver = { .name = "io_edgeport", - .disconnect = usb_serial_disconnect, .id_table = id_table_combined, }; diff --git a/drivers/usb/serial/io_ti.c b/drivers/usb/serial/io_ti.c index 88ab9f6..643c120 100644 --- a/drivers/usb/serial/io_ti.c +++ b/drivers/usb/serial/io_ti.c @@ -199,7 +199,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined); static struct usb_driver io_driver = { .name = "io_ti", - .disconnect = usb_serial_disconnect, .id_table = id_table_combined, }; diff --git a/drivers/usb/serial/ipaq.c b/drivers/usb/serial/ipaq.c index 340c39e..7d1ae70 100644 --- a/drivers/usb/serial/ipaq.c +++ b/drivers/usb/serial/ipaq.c @@ -504,7 +504,6 @@ MODULE_DEVICE_TABLE(usb, ipaq_id_table); static struct usb_driver ipaq_driver = { .name = "ipaq", - .disconnect = usb_serial_disconnect, .id_table = ipaq_id_table, }; diff --git a/drivers/usb/serial/ipw.c b/drivers/usb/serial/ipw.c index b42e1bb..7690133 100644 --- a/drivers/usb/serial/ipw.c +++ b/drivers/usb/serial/ipw.c @@ -141,7 +141,6 @@ MODULE_DEVICE_TABLE(usb, usb_ipw_ids); static struct usb_driver usb_ipw_driver = { .name = "ipwtty", - .disconnect = usb_serial_disconnect, .id_table = usb_ipw_ids, }; diff --git a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c index 7cee101..c69a81e 100644 --- a/drivers/usb/serial/ir-usb.c +++ b/drivers/usb/serial/ir-usb.c @@ -79,7 +79,6 @@ MODULE_DEVICE_TABLE(usb, ir_id_table); static struct usb_driver ir_driver = { .name = "ir-usb", - .disconnect = usb_serial_disconnect, .id_table = ir_id_table, }; diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c index 88a0931..500e8fb 100644 --- a/drivers/usb/serial/iuu_phoenix.c +++ b/drivers/usb/serial/iuu_phoenix.c @@ -53,7 +53,6 @@ MODULE_DEVICE_TABLE(usb, id_table); static struct usb_driver iuu_driver = { .name = "iuu_phoenix", - .disconnect = usb_serial_disconnect, .id_table = id_table, }; diff --git a/drivers/usb/serial/keyspan.h b/drivers/usb/serial/keyspan.h index 4ebf906..bb018df 100644 --- a/drivers/usb/serial/keyspan.h +++ b/drivers/usb/serial/keyspan.h @@ -489,7 +489,6 @@ MODULE_DEVICE_TABLE(usb, keyspan_ids_combined); static struct usb_driver keyspan_driver = { .name = "keyspan", - .disconnect = usb_serial_disconnect, .id_table = keyspan_ids_combined, }; diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c index 218169a..62574cf 100644 --- a/drivers/usb/serial/keyspan_pda.c +++ b/drivers/usb/serial/keyspan_pda.c @@ -88,7 +88,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined); static struct usb_driver keyspan_pda_driver = { .name = "keyspan_pda", - .disconnect = usb_serial_disconnect, .id_table = id_table_combined, }; diff --git a/drivers/usb/serial/kl5kusb105.c b/drivers/usb/serial/kl5kusb105.c index c97ca54..26dcfac 100644 --- a/drivers/usb/serial/kl5kusb105.c +++ b/drivers/usb/serial/kl5kusb105.c @@ -88,7 +88,6 @@ MODULE_DEVICE_TABLE(usb, id_table); static struct usb_driver kl5kusb105d_driver = { .name = "kl5kusb105d", - .disconnect = usb_serial_disconnect, .id_table = id_table, }; diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c index d62d137..68fb36a 100644 --- a/drivers/usb/serial/kobil_sct.c +++ b/drivers/usb/serial/kobil_sct.c @@ -87,7 +87,6 @@ MODULE_DEVICE_TABLE(usb, id_table); static struct usb_driver kobil_driver = { .name = "kobil", - .disconnect = usb_serial_disconnect, .id_table = id_table, }; diff --git a/drivers/usb/serial/mct_u232.c b/drivers/usb/serial/mct_u232.c index bea53f1..a63d1e8 100644 --- a/drivers/usb/serial/mct_u232.c +++ b/drivers/usb/serial/mct_u232.c @@ -85,7 +85,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined); static struct usb_driver mct_u232_driver = { .name = "mct_u232", - .disconnect = usb_serial_disconnect, .id_table = id_table_combined, }; diff --git a/drivers/usb/serial/metro-usb.c b/drivers/usb/serial/metro-usb.c index 06cf5c8..14ad1db 100644 --- a/drivers/usb/serial/metro-usb.c +++ b/drivers/usb/serial/metro-usb.c @@ -421,7 +421,6 @@ static void metrousb_unthrottle(struct tty_struct *tty) static struct usb_driver metrousb_driver = { .name = "metro-usb", - .disconnect = usb_serial_disconnect, .id_table = id_table }; diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c index 0a0e8b4..eef0d84 100644 --- a/drivers/usb/serial/mos7720.c +++ b/drivers/usb/serial/mos7720.c @@ -2160,7 +2160,6 @@ static void mos7720_release(struct usb_serial *serial) static struct usb_driver usb_driver = { .name = "moschip7720", - .disconnect = usb_serial_disconnect, .id_table = moschip_port_id_table, }; diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index 8f370e08..91c3c5e 100644 --- a/drivers/usb/serial/mos7840.c +++ b/drivers/usb/serial/mos7840.c @@ -2785,7 +2785,6 @@ static void mos7840_release(struct usb_serial *serial) static struct usb_driver io_driver = { .name = "mos7840", - .disconnect = usb_serial_disconnect, .id_table = moschip_id_table_combined, }; diff --git a/drivers/usb/serial/moto_modem.c b/drivers/usb/serial/moto_modem.c index 36b5a75..f6b055f 100644 --- a/drivers/usb/serial/moto_modem.c +++ b/drivers/usb/serial/moto_modem.c @@ -33,7 +33,6 @@ MODULE_DEVICE_TABLE(usb, id_table); static struct usb_driver moto_driver = { .name = "moto-modem", - .disconnect = usb_serial_disconnect, .id_table = id_table, }; diff --git a/drivers/usb/serial/navman.c b/drivers/usb/serial/navman.c index d750fa1..6f12bbc 100644 --- a/drivers/usb/serial/navman.c +++ b/drivers/usb/serial/navman.c @@ -32,7 +32,6 @@ MODULE_DEVICE_TABLE(usb, id_table); static struct usb_driver navman_driver = { .name = "navman", - .disconnect = usb_serial_disconnect, .id_table = id_table, }; diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c index 5cf1f5a..72176f38 100644 --- a/drivers/usb/serial/omninet.c +++ b/drivers/usb/serial/omninet.c @@ -59,7 +59,6 @@ MODULE_DEVICE_TABLE(usb, id_table); static struct usb_driver omninet_driver = { .name = "omninet", - .disconnect = usb_serial_disconnect, .id_table = id_table, }; diff --git a/drivers/usb/serial/opticon.c b/drivers/usb/serial/opticon.c index 5a0f25c..fe12cac 100644 --- a/drivers/usb/serial/opticon.c +++ b/drivers/usb/serial/opticon.c @@ -585,7 +585,6 @@ static int opticon_resume(struct usb_interface *intf) static struct usb_driver opticon_driver = { .name = "opticon", - .disconnect = usb_serial_disconnect, .suspend = opticon_suspend, .resume = opticon_resume, .id_table = id_table, diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index a654f17..780c276 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -1222,7 +1222,6 @@ MODULE_DEVICE_TABLE(usb, option_ids); static struct usb_driver option_driver = { .name = "option", - .disconnect = usb_serial_disconnect, .id_table = option_ids, }; diff --git a/drivers/usb/serial/oti6858.c b/drivers/usb/serial/oti6858.c index bd3ce49..9b19503 100644 --- a/drivers/usb/serial/oti6858.c +++ b/drivers/usb/serial/oti6858.c @@ -68,7 +68,6 @@ MODULE_DEVICE_TABLE(usb, id_table); static struct usb_driver oti6858_driver = { .name = "oti6858", - .disconnect = usb_serial_disconnect, .id_table = id_table, }; diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 93607a4..642136e 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c @@ -97,7 +97,6 @@ MODULE_DEVICE_TABLE(usb, id_table); static struct usb_driver pl2303_driver = { .name = "pl2303", - .disconnect = usb_serial_disconnect, .id_table = id_table, }; diff --git a/drivers/usb/serial/qcaux.c b/drivers/usb/serial/qcaux.c index 1be0653..b0b41c1 100644 --- a/drivers/usb/serial/qcaux.c +++ b/drivers/usb/serial/qcaux.c @@ -79,7 +79,6 @@ MODULE_DEVICE_TABLE(usb, id_table); static struct usb_driver qcaux_driver = { .name = "qcaux", - .disconnect = usb_serial_disconnect, .id_table = id_table, }; diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c index 6c82f46..400a59e 100644 --- a/drivers/usb/serial/qcserial.c +++ b/drivers/usb/serial/qcserial.c @@ -114,7 +114,6 @@ MODULE_DEVICE_TABLE(usb, id_table); static struct usb_driver qcdriver = { .name = "qcserial", - .disconnect = usb_serial_disconnect, .id_table = id_table, }; diff --git a/drivers/usb/serial/safe_serial.c b/drivers/usb/serial/safe_serial.c index 15db522..546ea12 100644 --- a/drivers/usb/serial/safe_serial.c +++ b/drivers/usb/serial/safe_serial.c @@ -153,7 +153,6 @@ MODULE_DEVICE_TABLE(usb, id_table); static struct usb_driver safe_driver = { .name = "safe_serial", - .disconnect = usb_serial_disconnect, .id_table = id_table, }; diff --git a/drivers/usb/serial/siemens_mpi.c b/drivers/usb/serial/siemens_mpi.c index b5e9298..0d3108a 100644 --- a/drivers/usb/serial/siemens_mpi.c +++ b/drivers/usb/serial/siemens_mpi.c @@ -31,7 +31,6 @@ MODULE_DEVICE_TABLE(usb, id_table); static struct usb_driver siemens_usb_mpi_driver = { .name = "siemens_mpi", - .disconnect = usb_serial_disconnect, .id_table = id_table, }; diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c index 5f55cfe..11be3c6 100644 --- a/drivers/usb/serial/sierra.c +++ b/drivers/usb/serial/sierra.c @@ -1053,7 +1053,6 @@ static int sierra_reset_resume(struct usb_interface *intf) static struct usb_driver sierra_driver = { .name = "sierra", - .disconnect = usb_serial_disconnect, .reset_resume = sierra_reset_resume, .id_table = id_table, }; diff --git a/drivers/usb/serial/spcp8x5.c b/drivers/usb/serial/spcp8x5.c index 754b138..51e43cc 100644 --- a/drivers/usb/serial/spcp8x5.c +++ b/drivers/usb/serial/spcp8x5.c @@ -153,7 +153,6 @@ enum spcp8x5_type { static struct usb_driver spcp8x5_driver = { .name = "spcp8x5", - .disconnect = usb_serial_disconnect, .id_table = id_table, }; diff --git a/drivers/usb/serial/ssu100.c b/drivers/usb/serial/ssu100.c index fcc0024..f72b03f 100644 --- a/drivers/usb/serial/ssu100.c +++ b/drivers/usb/serial/ssu100.c @@ -65,7 +65,6 @@ MODULE_DEVICE_TABLE(usb, id_table); static struct usb_driver ssu100_driver = { .name = "ssu100", - .disconnect = usb_serial_disconnect, .id_table = id_table, }; diff --git a/drivers/usb/serial/symbolserial.c b/drivers/usb/serial/symbolserial.c index 454d80a..5ef07ca 100644 --- a/drivers/usb/serial/symbolserial.c +++ b/drivers/usb/serial/symbolserial.c @@ -271,7 +271,6 @@ static void symbol_release(struct usb_serial *serial) static struct usb_driver symbol_driver = { .name = "symbol", - .disconnect = usb_serial_disconnect, .id_table = id_table, }; diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index 29b9c95..9d96224 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c @@ -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 = { .name = "ti_usb_3410_5052", - .disconnect = usb_serial_disconnect, .id_table = ti_id_table_combined, }; diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index e8c4ac9..9791312 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; diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial/usb_debug.c index 4e5426f..e22e543 100644 --- a/drivers/usb/serial/usb_debug.c +++ b/drivers/usb/serial/usb_debug.c @@ -37,7 +37,6 @@ MODULE_DEVICE_TABLE(usb, id_table); static struct usb_driver debug_driver = { .name = "debug", - .disconnect = usb_serial_disconnect, .id_table = id_table, }; diff --git a/drivers/usb/serial/visor.c b/drivers/usb/serial/visor.c index 36e782a..2e24bd3 100644 --- a/drivers/usb/serial/visor.c +++ b/drivers/usb/serial/visor.c @@ -165,7 +165,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined); static struct usb_driver visor_driver = { .name = "visor", - .disconnect = usb_serial_disconnect, .id_table = id_table_combined, }; diff --git a/drivers/usb/serial/vivopay-serial.c b/drivers/usb/serial/vivopay-serial.c index 939ad7f..c7d8ab3 100644 --- a/drivers/usb/serial/vivopay-serial.c +++ b/drivers/usb/serial/vivopay-serial.c @@ -27,7 +27,6 @@ MODULE_DEVICE_TABLE(usb, id_table); static struct usb_driver vivopay_serial_driver = { .name = "vivopay-serial", - .disconnect = usb_serial_disconnect, .id_table = id_table, }; diff --git a/drivers/usb/serial/whiteheat.c b/drivers/usb/serial/whiteheat.c index a0df894..76840cd 100644 --- a/drivers/usb/serial/whiteheat.c +++ b/drivers/usb/serial/whiteheat.c @@ -79,7 +79,6 @@ MODULE_DEVICE_TABLE(usb, id_table_combined); static struct usb_driver whiteheat_driver = { .name = "whiteheat", - .disconnect = usb_serial_disconnect, .id_table = id_table_combined, }; diff --git a/drivers/usb/serial/zio.c b/drivers/usb/serial/zio.c index 2e858c3..4822cc8 100644 --- a/drivers/usb/serial/zio.c +++ b/drivers/usb/serial/zio.c @@ -24,7 +24,6 @@ MODULE_DEVICE_TABLE(usb, id_table); static struct usb_driver zio_driver = { .name = "zio", - .disconnect = usb_serial_disconnect, .id_table = id_table, }; diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 4742838..17e9746 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h @@ -300,7 +300,6 @@ extern void usb_serial_port_softint(struct usb_serial_port *port); extern int usb_serial_probe(struct usb_interface *iface, 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_resume(struct usb_interface *intf); -- 2.7.4