Skip to content

Commit

Permalink
USB: serial: fix up reset_resume callback
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Greg Kroah-Hartman committed May 16, 2012
1 parent 1c1eaba commit dcd82cd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/usb/serial/usb-serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit dcd82cd

Please sign in to comment.