]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
USB: serial: fix up reset_resume callback
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 May 2012 15:37:17 +0000 (08:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 May 2012 15:37:17 +0000 (08:37 -0700)
If the usb-serial driver doesn't have a reset_resume callback, then we
need to tell the USB core that it doesn't, and it needs to rebind the
device.

Thanks to Alan for pointing out my mistake, and providing the fix.

Reported-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/usb-serial.c

index 846506f05e12b61524c5117e2f91c6dba884df24..6a1b609a0d94cff247460de6716a71ecfadbe707 100644 (file)
@@ -1176,8 +1176,10 @@ static int usb_serial_reset_resume(struct usb_interface *intf)
        serial->suspending = 0;
        if (serial->type->reset_resume)
                rv = serial->type->reset_resume(serial);
-       else
-               rv = usb_serial_generic_resume(serial);
+       else {
+               rv = -EOPNOTSUPP;
+               intf->needs_binding = 1;
+       }
 
        return rv;
 }