From: Greg KH <gregkh@linuxfoundation.org>
To: Paul Chavent <Paul.Chavent@onera.fr>
Cc: linux-usb@vger.kernel.org, jhovold@gmail.com,
fschaefer.oss@googlemail.com, jslaby@suse.cz, max@suse.de,
giometti@enneenne.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/5] USB : serial : invoke dcd_change ldisc's handler.
Date: Mon, 9 Sep 2013 09:36:48 -0700 [thread overview]
Message-ID: <20130909163648.GA26148@kroah.com> (raw)
In-Reply-To: <1378742480-2146-5-git-send-email-paul.chavent@onera.fr>
On Mon, Sep 09, 2013 at 06:01:19PM +0200, Paul Chavent wrote:
> In order to have the PPS line discipline to work with usb devices.
>
> Signed-off-by: Paul Chavent <paul.chavent@onera.fr>
> ---
> drivers/usb/serial/generic.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
> index 91f0592..a18a086 100644
> --- a/drivers/usb/serial/generic.c
> +++ b/drivers/usb/serial/generic.c
> @@ -567,6 +567,13 @@ void usb_serial_handle_dcd_change(struct usb_serial_port *usb_port,
> {
> struct tty_port *port = &usb_port->port;
> struct tty_struct *tty = tty_port_tty_get(port);
> + struct tty_ldisc *ld = tty ? tty_ldisc_ref(tty) : NULL;
> +
> + if (ld) {
Minor nit, I hate the ? : mode of C, and as you are doing another if
statement right after it, it's pretty redundant here. So can you just
merge them together into one if chain?
thanks,
greg k-h
next prev parent reply other threads:[~2013-09-09 16:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-09 16:01 [PATCH 0/5] Enable PPS reporting for USB serial devices Paul Chavent
2013-09-09 16:01 ` [PATCH 1/5] USB : serial : remove tty arg of handle_dcd_change Paul Chavent
2013-09-09 17:45 ` Johan Hovold
2013-09-09 17:48 ` Johan Hovold
2013-09-10 8:09 ` Paul Chavent
2013-09-09 16:01 ` [PATCH 2/5] USB : serial : get protected tty in handle_dcd_change Paul Chavent
2013-09-09 18:03 ` Sergei Shtylyov
2013-09-09 16:01 ` [PATCH 3/5] USB : serial : call handle_dcd_change in ftdi driver Paul Chavent
2013-09-09 16:01 ` [PATCH 4/5] USB : serial : invoke dcd_change ldisc's handler Paul Chavent
2013-09-09 16:36 ` Greg KH [this message]
2013-09-09 16:01 ` [PATCH 5/5] USB : serial : pl2303 wake up after dcd status check Paul Chavent
2013-09-10 7:31 ` [PATCH 0/5] Enable PPS reporting for USB serial devices Rodolfo Giometti
2013-09-10 8:00 ` Paul Chavent
2013-09-10 20:02 ` Gary E. Miller
2013-09-12 7:53 ` Rodolfo Giometti
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=20130909163648.GA26148@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=Paul.Chavent@onera.fr \
--cc=fschaefer.oss@googlemail.com \
--cc=giometti@enneenne.com \
--cc=jhovold@gmail.com \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=max@suse.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.