public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Johan Hovold <johan@kernel.org>
To: Konstantin Shkolnyy <konstantin.shkolnyy@gmail.com>
Cc: johan@kernel.org, linux-usb@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH RESEND 4/5] USB: serial: cp210x: Prepared get_termios() for adding error handling
Date: Mon, 25 Apr 2016 12:33:17 +0200	[thread overview]
Message-ID: <20160425103317.GL18866@localhost> (raw)
In-Reply-To: <1461517770-6275-1-git-send-email-konstantin.shkolnyy@gmail.com>

On Sun, Apr 24, 2016 at 12:09:30PM -0500, Konstantin Shkolnyy wrote:
> Replaced several register write calls with one, to simplify adding error
> handling.
> 
> Signed-off-by: Konstantin Shkolnyy <konstantin.shkolnyy@gmail.com>
> ---
>  drivers/usb/serial/cp210x.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
> index b2321a7..58cffc9 100644
> --- a/drivers/usb/serial/cp210x.c
> +++ b/drivers/usb/serial/cp210x.c
> @@ -692,6 +692,7 @@ static void cp210x_get_termios_port(struct usb_serial_port *port,

Instead of cleaning up cp210x_get_termios I think you should consider
removing it.

It is used to read the current settings from the device and in case we
have a tty at open, to update the termios settings to match.

Instead you should just make sure that the device settings match
termios (and this is in fact already implemented, but done after
retrieving the settings).

You can also implement the init_termios callback to provide defaults
that match the hardware reset values.

Thanks,
Johan

      reply	other threads:[~2016-04-25 10:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-24 17:09 [PATCH RESEND 4/5] USB: serial: cp210x: Prepared get_termios() for adding error handling Konstantin Shkolnyy
2016-04-25 10:33 ` 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=20160425103317.GL18866@localhost \
    --to=johan@kernel.org \
    --cc=konstantin.shkolnyy@gmail.com \
    --cc=linux-kernel@vger.kernel.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