public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Greg KH <greg@kroah.com>
Cc: jgarzik@pobox.com, netdev@vger.kernel.org,
	Andrew Bird <ajb@spheresystems.co.uk>,
	Javier Marcet <javier@krausbeck.org>,
	Filip Aben <f.aben@option.com>,
	Paulius Zaleckas <paulius.zaleckas@teltonika.lt>,
	Oliver Neukum <oliver@neukum.org>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] HSO: add option hso driver
Date: Tue, 13 May 2008 23:27:27 +0100	[thread overview]
Message-ID: <20080513232727.21c74bb2@core> (raw)
In-Reply-To: <20080513215134.GC6139@kroah.com>

> Jeff, please queue this up for 2.6.27 if there are no problems that you
> can see.  It has been in the linux-next tree for a while, and many users
> are reporting that it is working for them.
> 
> Or if you feel it's ok for 2.6.26, I will not object to that either :)

Can we get it into 2.6.26 - its a driver for new hardware and the driver
is going to get a clean up for 2.6.27 anyway.

Comments below are minor and I don't think blockers

So for the serial side

Acked-by: Alan Cox <alan@redhat.com>


> +	termios = serial->tty->termios;

tty is passed why keep using serial->tty (hint: think about parallel
hangup versus close/open)

> +/* close the requested serial port */
> +static void hso_serial_close(struct tty_struct *tty, struct file *filp)
> +{
> +	struct hso_serial *serial = tty->driver_data;
> +	u8 usb_gone;
> +
> +	D1("Closing serial port");
> +
> +	/* sanity check */
> +	if (tty == NULL || serial == NULL) {
> +		D1("(tty == NULL || tty->driver_data == NULL)");
> +		return;
> +	}

tty cannot be NULL here


> +static int hso_serial_write(struct tty_struct *tty, const unsigned char *buf,
> +			    int count)
> +{
> +	struct hso_serial *serial = get_serial_by_tty(tty);
> +	int space, tx_bytes;
> +	unsigned long flags;
> +
> +	/* sanity check */
> +	if (serial == NULL) {
> +		printk(KERN_ERR "%s: tty or tty->driver_data is NULL\n",

Checks one thing printks another 8)

> +	/* the actual setup */
> +	spin_lock_irqsave(&serial->serial_lock, flags);
> +	if (serial->open_count)
> +		_hso_serial_set_termios(tty, old);

(else *tty->termios = *old_termios)



  reply	other threads:[~2008-05-13 22:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-13 21:51 [PATCH] HSO: add option hso driver Greg KH
2008-05-13 22:27 ` Alan Cox [this message]
2008-05-13 23:26   ` Jeff Garzik
2008-05-14  1:58     ` Greg KH
2008-05-14  4:57       ` Greg Kroah-Hartman
2008-05-14 13:59         ` Paulius Zaleckas
2008-05-14 15:12           ` Filip Aben
2008-05-14 17:36           ` Marcel Holtmann
2008-06-12  2:51         ` Jeff Garzik
2008-05-14  4:52   ` [PATCH] " Greg KH
2008-05-14 15:58 ` Jan Engelhardt

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=20080513232727.21c74bb2@core \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=ajb@spheresystems.co.uk \
    --cc=f.aben@option.com \
    --cc=greg@kroah.com \
    --cc=javier@krausbeck.org \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=oliver@neukum.org \
    --cc=paulius.zaleckas@teltonika.lt \
    /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