USB: serial: drop unused suspending flag
authorJohan Hovold <johan@kernel.org>
Tue, 30 Mar 2021 14:38:17 +0000 (16:38 +0200)
committerJohan Hovold <johan@kernel.org>
Thu, 1 Apr 2021 08:03:45 +0000 (10:03 +0200)
The suspending flag was added back in 2009 but no users ever followed.
Remove it.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/usb-serial.c
include/linux/usb/serial.h

index 27e3bb5..2a38810 100644 (file)
@@ -1114,8 +1114,6 @@ int usb_serial_suspend(struct usb_interface *intf, pm_message_t message)
        struct usb_serial *serial = usb_get_intfdata(intf);
        int i, r = 0;
 
-       serial->suspending = 1;
-
        /*
         * serial->type->suspend() MUST return 0 in system sleep context,
         * otherwise, the resume callback has to recover device from
@@ -1123,10 +1121,8 @@ int usb_serial_suspend(struct usb_interface *intf, pm_message_t message)
         */
        if (serial->type->suspend) {
                r = serial->type->suspend(serial, message);
-               if (r < 0) {
-                       serial->suspending = 0;
+               if (r < 0)
                        goto err_out;
-               }
        }
 
        for (i = 0; i < serial->num_ports; ++i)
@@ -1151,7 +1147,6 @@ int usb_serial_resume(struct usb_interface *intf)
 
        usb_serial_unpoison_port_urbs(serial);
 
-       serial->suspending = 0;
        if (serial->type->resume)
                rv = serial->type->resume(serial);
        else
@@ -1168,7 +1163,6 @@ static int usb_serial_reset_resume(struct usb_interface *intf)
 
        usb_serial_unpoison_port_urbs(serial);
 
-       serial->suspending = 0;
        if (serial->type->reset_resume) {
                rv = serial->type->reset_resume(serial);
        } else {
index 9522720..7efba6c 100644 (file)
@@ -146,7 +146,6 @@ struct usb_serial {
        struct usb_serial_driver        *type;
        struct usb_interface            *interface;
        unsigned char                   disconnected:1;
-       unsigned char                   suspending:1;
        unsigned char                   attached:1;
        unsigned char                   minors_reserved:1;
        unsigned char                   num_ports;