On Fri, Oct 11, 2019 at 11:57:36AM +0200, Johan Hovold wrote:
> Use the tdev pointer directly instead of going through the port data
> when accessing the serial data in open().

hmm, s/open/close/.

> Signed-off-by: Johan Hovold <jo...@kernel.org>
> ---
>  drivers/usb/serial/ti_usb_3410_5052.c | 4 ++--
>  1 file 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);
>       }

Johan

Reply via email to