]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
USB: serial: ti_usb_3410_5052: clean up serial data access
authorJohan Hovold <johan@kernel.org>
Fri, 11 Oct 2019 09:57:36 +0000 (11:57 +0200)
committerJohan Hovold <johan@kernel.org>
Wed, 16 Oct 2019 08:29:23 +0000 (10:29 +0200)
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>
drivers/usb/serial/ti_usb_3410_5052.c

index 9174ba2e06da7c04bdfcf05c38e49cf94215c88a..ef23acc9b9ce4bc8fe8ccb8197b42f69928a87b3 100644 (file)
@@ -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);
        }