summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/mxuport.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-05-14 11:25:35 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-05-14 11:25:35 +0200
commit60d5794fe5a50d02f4a0df84b45910a4dfa8b487 (patch)
tree5c221ba843285abe809b23e4dec064ed0219a9ca /drivers/usb/serial/mxuport.c
parentusb: Remove unnecessary space before operator ','. (diff)
parentUSB: serial: ti_usb_3410_5052: add MOXA UPORT 11x0 support (diff)
downloadlinux-60d5794fe5a50d02f4a0df84b45910a4dfa8b487.tar.xz
linux-60d5794fe5a50d02f4a0df84b45910a4dfa8b487.zip
Merge tag 'usb-serial-4.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next
Johan writes: USB-serial updates for v4.7-rc1 These updates fixes a number of issues where resources were not properly released on probe errors. Included is also a fix for hardware flow-control disable for cp210x. Support for Moxa UPort 11x0 is added to the ti_usb_3410_5052 driver, and included are also some general code clean ups. Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial/mxuport.c')
-rw-r--r--drivers/usb/serial/mxuport.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/usb/serial/mxuport.c b/drivers/usb/serial/mxuport.c
index 31a8b47f1ac6..c6596cbcc4b6 100644
--- a/drivers/usb/serial/mxuport.c
+++ b/drivers/usb/serial/mxuport.c
@@ -1259,6 +1259,15 @@ static int mxuport_attach(struct usb_serial *serial)
return 0;
}
+static void mxuport_release(struct usb_serial *serial)
+{
+ struct usb_serial_port *port0 = serial->port[0];
+ struct usb_serial_port *port1 = serial->port[1];
+
+ usb_serial_generic_close(port1);
+ usb_serial_generic_close(port0);
+}
+
static int mxuport_open(struct tty_struct *tty, struct usb_serial_port *port)
{
struct mxuport_port *mxport = usb_get_serial_port_data(port);
@@ -1361,6 +1370,7 @@ static struct usb_serial_driver mxuport_device = {
.probe = mxuport_probe,
.port_probe = mxuport_port_probe,
.attach = mxuport_attach,
+ .release = mxuport_release,
.calc_num_ports = mxuport_calc_num_ports,
.open = mxuport_open,
.close = mxuport_close,