From: Johan Hovold <johan@kernel.org>
To: linux-usb@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Johan Hovold <johan@kernel.org>
Subject: Re: [PATCH 2/2] USB: serial: ti_usb_3410_5052: clean up serial data access
Date: Fri, 11 Oct 2019 12:00:09 +0200 [thread overview]
Message-ID: <20191011100009.GE27819@localhost> (raw)
In-Reply-To: <20191011095736.21934-2-johan@kernel.org>
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 <johan@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
prev parent reply other threads:[~2019-10-11 10:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-11 9:57 [PATCH 1/2] USB: serial: ti_usb_3410_5052: fix port-close races Johan Hovold
2019-10-11 9:57 ` [PATCH 2/2] USB: serial: ti_usb_3410_5052: clean up serial data access Johan Hovold
2019-10-11 10:00 ` Johan Hovold [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191011100009.GE27819@localhost \
--to=johan@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).