diff options
author | Johan Hovold <johan@kernel.org> | 2019-10-11 11:57:36 +0200 |
---|---|---|
committer | Johan Hovold <johan@kernel.org> | 2019-10-16 10:29:23 +0200 |
commit | bc25770f00d3f4e7482278f9823c2c2793605484 (patch) | |
tree | 1222112aa48a7725fd64ef08fc84c25ad8e14bc3 /drivers/usb | |
parent | 6f1d1dc8d540a9aa6e39b9cb86d3a67bbc1c8d8d (diff) |
USB: serial: ti_usb_3410_5052: clean up serial data access
Use the tdev pointer directly instead of going through the port data
when accessing the serial data in close().
Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/serial/ti_usb_3410_5052.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/serial/ti_usb_3410_5052.c b/drivers/usb/serial/ti_usb_3410_5052.c index 9174ba2e06da..ef23acc9b9ce 100644 --- a/drivers/usb/serial/ti_usb_3410_5052.c +++ b/drivers/usb/serial/ti_usb_3410_5052.c @@ -800,8 +800,8 @@ static void ti_close(struct usb_serial_port *port) , __func__, status); mutex_lock(&tdev->td_open_close_lock); - --tport->tp_tdev->td_open_port_count; - if (tport->tp_tdev->td_open_port_count == 0) { + --tdev->td_open_port_count; + if (tdev->td_open_port_count == 0) { /* last port is closed, shut down interrupt urb */ usb_kill_urb(port->serial->port[0]->interrupt_in_urb); } |