Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c49cfa91 authored by Oliver Neukum's avatar Oliver Neukum Committed by Greg Kroah-Hartman
Browse files

USB: serial: use generic method if no alternative is provided in usb serial layer



This patch makes use of the generic method if a serial driver provides
no implementation. This simplifies implementing suspend/resume support
in serial drivers.

Signed-off-by: default avatarOliver Neukum <oneukum@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 81d043c2
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1085,12 +1085,15 @@ EXPORT_SYMBOL(usb_serial_suspend);
int usb_serial_resume(struct usb_interface *intf)
{
	struct usb_serial *serial = usb_get_intfdata(intf);
	int rv;

	serial->suspending = 0;
	if (serial->type->resume)
		return serial->type->resume(serial);
		rv = serial->type->resume(serial);
	else
		rv = usb_serial_generic_resume(serial);

	return 0;
	return rv;
}
EXPORT_SYMBOL(usb_serial_resume);