[PATCH] usb-serial: clean up unneeded PM-related fields

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch (as1551) cleans up the PM-related entries in the usb_driver
structures of the various USB serial driver modules.  Those entries
are now filled in by the usb-serial core during driver registration,
so they don't need to be initialized explicitly in the source code.

The same is true of the one remaining no_dynamic_id entry.

reset_resume remains a small problem, because the serial core doesn't
support it.  The patch ignores these entries.

Signed-off-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>

---

Greg:

This doesn't fix any problems; it's just a clean up.  Therefore it can 
wait for the next available merge window.

Also, it looks like we can further clean up the usb_driver structures
by removing the .probe and .disconnect entries.  They can also by
filled in by the usb-serial core when the driver is registered.  Then
all that will remain are the .name and .id_table entries, which are
obviously necessary.  However, that should be done in a separate patch
(or series of patches).

Alan Stern


 drivers/usb/serial/ch341.c    |    3 ---
 drivers/usb/serial/f81232.c   |    4 ----
 drivers/usb/serial/option.c   |    5 -----
 drivers/usb/serial/pl2303.c   |    3 ---
 drivers/usb/serial/qcserial.c |    3 ---
 drivers/usb/serial/sierra.c   |    3 ---
 drivers/usb/serial/ssu100.c   |    3 ---
 7 files changed, 24 deletions(-)

Index: usb-3.4/drivers/usb/serial/ch341.c
===================================================================
--- usb-3.4.orig/drivers/usb/serial/ch341.c
+++ usb-3.4/drivers/usb/serial/ch341.c
@@ -621,11 +621,8 @@ static struct usb_driver ch341_driver =
 	.name		= "ch341",
 	.probe		= usb_serial_probe,
 	.disconnect	= usb_serial_disconnect,
-	.suspend	= usb_serial_suspend,
-	.resume		= usb_serial_resume,
 	.reset_resume	= ch341_reset_resume,
 	.id_table	= id_table,
-	.supports_autosuspend =	1,
 };
 
 static struct usb_serial_driver ch341_device = {
Index: usb-3.4/drivers/usb/serial/f81232.c
===================================================================
--- usb-3.4.orig/drivers/usb/serial/f81232.c
+++ usb-3.4/drivers/usb/serial/f81232.c
@@ -358,10 +358,6 @@ static struct usb_driver f81232_driver =
 	.probe =	usb_serial_probe,
 	.disconnect =	usb_serial_disconnect,
 	.id_table =	id_table,
-	.suspend =      usb_serial_suspend,
-	.resume =       usb_serial_resume,
-	.no_dynamic_id = 	1,
-	.supports_autosuspend =	1,
 };
 
 static struct usb_serial_driver f81232_device = {
Index: usb-3.4/drivers/usb/serial/option.c
===================================================================
--- usb-3.4.orig/drivers/usb/serial/option.c
+++ usb-3.4/drivers/usb/serial/option.c
@@ -1224,11 +1224,6 @@ static struct usb_driver option_driver =
 	.name       = "option",
 	.probe      = usb_serial_probe,
 	.disconnect = usb_serial_disconnect,
-#ifdef CONFIG_PM
-	.suspend    = usb_serial_suspend,
-	.resume     = usb_serial_resume,
-	.supports_autosuspend =	1,
-#endif
 	.id_table   = option_ids,
 };
 
Index: usb-3.4/drivers/usb/serial/pl2303.c
===================================================================
--- usb-3.4.orig/drivers/usb/serial/pl2303.c
+++ usb-3.4/drivers/usb/serial/pl2303.c
@@ -100,9 +100,6 @@ static struct usb_driver pl2303_driver =
 	.probe =	usb_serial_probe,
 	.disconnect =	usb_serial_disconnect,
 	.id_table =	id_table,
-	.suspend =      usb_serial_suspend,
-	.resume =       usb_serial_resume,
-	.supports_autosuspend =	1,
 };
 
 #define SET_LINE_REQUEST_TYPE		0x21
Index: usb-3.4/drivers/usb/serial/qcserial.c
===================================================================
--- usb-3.4.orig/drivers/usb/serial/qcserial.c
+++ usb-3.4/drivers/usb/serial/qcserial.c
@@ -117,9 +117,6 @@ static struct usb_driver qcdriver = {
 	.probe			= usb_serial_probe,
 	.disconnect		= usb_serial_disconnect,
 	.id_table		= id_table,
-	.suspend		= usb_serial_suspend,
-	.resume			= usb_serial_resume,
-	.supports_autosuspend	= true,
 };
 
 static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id)
Index: usb-3.4/drivers/usb/serial/sierra.c
===================================================================
--- usb-3.4.orig/drivers/usb/serial/sierra.c
+++ usb-3.4/drivers/usb/serial/sierra.c
@@ -1083,11 +1083,8 @@ static struct usb_driver sierra_driver =
 	.name       = "sierra",
 	.probe      = usb_serial_probe,
 	.disconnect = usb_serial_disconnect,
-	.suspend    = usb_serial_suspend,
-	.resume     = usb_serial_resume,
 	.reset_resume = sierra_reset_resume,
 	.id_table   = id_table,
-	.supports_autosuspend =	1,
 };
 
 static struct usb_serial_driver sierra_device = {
Index: usb-3.4/drivers/usb/serial/ssu100.c
===================================================================
--- usb-3.4.orig/drivers/usb/serial/ssu100.c
+++ usb-3.4/drivers/usb/serial/ssu100.c
@@ -68,9 +68,6 @@ static struct usb_driver ssu100_driver =
 	.probe			       = usb_serial_probe,
 	.disconnect		       = usb_serial_disconnect,
 	.id_table		       = id_table,
-	.suspend		       = usb_serial_suspend,
-	.resume			       = usb_serial_resume,
-	.supports_autosuspend	       = 1,
 };
 
 struct ssu100_port_private {

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux