public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@linux.intel.com>
To: Alexander Shiyan <shc_work@mail.ru>
Cc: linux-serial@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] serial: The new version of the driver MAX3107.
Date: Fri, 27 Jul 2012 16:29:09 +0100	[thread overview]
Message-ID: <20120727162909.38244772@bob.linux.org.uk> (raw)
In-Reply-To: <1343401309-14862-1-git-send-email-shc_work@mail.ru>


> +static void max3107_handle_rx(struct max3107_port *s, unsigned int
> rxlen) +{
> +	unsigned int status, ch, flag;
> +	struct tty_struct *tty = s->port.state->port.tty;

This all wants to be using tty_port_tty_get() and tty_kref_put - thats
a problem from the original of course. tty could also be NULL.

>
> +	tty = port->state->port.tty;
> +	if (!tty)
> +		return;

This seems to be a meaninless test ?

> +
> +	/* Word size */
> +	if ((termios->c_cflag & CSIZE) == CS7)
> +		lcr = MAX3107_LCR_WORD_LEN_7;
> +	else
> +		lcr = MAX3107_LCR_WORD_LEN_8;

Should also write back the word size actually used if we can't see that
which was requested (ie mask ~CSIZE and | CS8 in the CS5/6 case)


> +static volatile int driver_registered = 0;

Shouldn't need a volatile. Module load/unload are serialized for
obvious reasons.

Looks a very improved driver.

Alan

  reply	other threads:[~2012-07-27 15:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-27 15:01 [PATCH] serial: The new version of the driver MAX3107 Alexander Shiyan
2012-07-27 15:29 ` Alan Cox [this message]
2012-07-27 17:34   ` Re[2]: " Alexander Shiyan

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=20120727162909.38244772@bob.linux.org.uk \
    --to=alan@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=shc_work@mail.ru \
    /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