netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Cox <alan-qBU/x9rampVanCEyBjwyrvXRex20P6io@public.gmane.org>
To: Greg KH <greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
Cc: jgarzik-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Andrew Bird
	<ajb-5+cxppFmGx6/3pe1ocb+s/XRex20P6io@public.gmane.org>,
	Javier Marcet <javier-cnb5s7aUzWrdtAWm4Da02A@public.gmane.org>,
	Filip Aben <f.aben-x9gZzRpC1QbQT0dZR+AlfA@public.gmane.org>,
	Paulius Zaleckas
	<paulius.zaleckas-Ft0m5Q12RQ9xBelEqimL3w@public.gmane.org>,
	Oliver Neukum <oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org>,
	linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.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-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>

> 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-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>


> +	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)


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2008-05-13 22:27 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
     [not found] ` <20080513215134.GC6139-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2008-05-13 22:27   ` Alan Cox [this message]
2008-05-13 23:26     ` Jeff Garzik
2008-05-14  1:58       ` Greg KH
     [not found]         ` <20080514015815.GA29785-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2008-05-14  4:57           ` Greg Kroah-Hartman
     [not found]             ` <20080514045712.GA2843-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2008-05-14 13:59               ` Paulius Zaleckas
2008-05-14 15:12                 ` Filip Aben
     [not found]                 ` <482AF058.3020505-Ft0m5Q12RQ9xBelEqimL3w@public.gmane.org>
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-qbu/x9rampvanceybjwyrvxrex20p6io@public.gmane.org \
    --cc=ajb-5+cxppFmGx6/3pe1ocb+s/XRex20P6io@public.gmane.org \
    --cc=f.aben-x9gZzRpC1QbQT0dZR+AlfA@public.gmane.org \
    --cc=greg-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org \
    --cc=javier-cnb5s7aUzWrdtAWm4Da02A@public.gmane.org \
    --cc=jgarzik-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org \
    --cc=paulius.zaleckas-Ft0m5Q12RQ9xBelEqimL3w@public.gmane.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).