summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/ch341.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-07 23:10:27 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-05-07 23:10:27 +0200
commit2bfd1c96a9fb9b547db9a2ad8428dc8de5526e92 (patch)
tree9a6f4aa00cffd0c879ab55e38807f9b0742eb812 /drivers/usb/serial/ch341.c
parentUSB: serial: remove usb_serial_disconnect call in all drivers (diff)
downloadlinux-2bfd1c96a9fb9b547db9a2ad8428dc8de5526e92.tar.xz
linux-2bfd1c96a9fb9b547db9a2ad8428dc8de5526e92.zip
USB: serial: ch341: remove reset_resume callback
This really just is the resume callback for the device, so use that, especially as the usb-serial core just overrode this callback so it wasn't being made anyway. Cc: Johan Hovold <jhovold@gmail.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/ch341.c')
-rw-r--r--drivers/usb/serial/ch341.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/usb/serial/ch341.c b/drivers/usb/serial/ch341.c
index 4f0260a9013a..95b259747697 100644
--- a/drivers/usb/serial/ch341.c
+++ b/drivers/usb/serial/ch341.c
@@ -577,27 +577,20 @@ static int ch341_tiocmget(struct tty_struct *tty)
return result;
}
-
-static int ch341_reset_resume(struct usb_interface *intf)
+static int ch341_resume(struct usb_serial *serial)
{
- struct usb_device *dev = interface_to_usbdev(intf);
- struct usb_serial *serial = NULL;
struct ch341_private *priv;
- serial = usb_get_intfdata(intf);
priv = usb_get_serial_port_data(serial->port[0]);
- /*reconfigure ch341 serial port after bus-reset*/
- ch341_configure(dev, priv);
-
- usb_serial_resume(intf);
+ /* reconfigure ch341 serial port after bus-reset */
+ ch341_configure(serial->dev, priv);
return 0;
}
static struct usb_driver ch341_driver = {
.name = "ch341",
- .reset_resume = ch341_reset_resume,
.id_table = id_table,
};
@@ -619,6 +612,7 @@ static struct usb_serial_driver ch341_device = {
.tiocmset = ch341_tiocmset,
.read_int_callback = ch341_read_int_callback,
.attach = ch341_attach,
+ .resume = ch341_resume,
};
static struct usb_serial_driver * const serial_drivers[] = {