Re: [PATCH 1/3] usb serial: Add generic USB wwan support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On torstai 18 helmikuu 2010 00:11:10 Matthew Garrett wrote:
> The generic USB serial code is ill-suited for high-speed USB wwan devices,
> resulting in the option driver. However, other non-option devices may also
> gain similar benefits from not using the generic code. Factorise out the
> non-option specific code from the option driver and make it available to
> other users.
> 
> Signed-off-by: Matthew Garrett <mjg@xxxxxxxxxx>

Seems to work, after correcting the compiler errors below.

[...]
> +void usb_wwan_dtr_rts(struct usb_serial_port *port, int on)
> +{
> +	struct usb_serial *serial = port->serial;
> +	struct option_port_private *portdata;

I guess this should be usb_wwan_port_private? option_port_private is not 
defined here.

Also, this function should be exported.

[...]
> +void usb_wwan_set_termios(struct tty_struct *tty,
> +			  struct usb_serial_port *port,
> +			  struct ktermios *old_termios)
> +{
> +	struct usb_serial_port *port = tty->driver_data;

This is already passed as a parameter.

> +	struct option_port_private *portdata;

Unused variable.

> +	struct usb_wwan_intf_private *intfdata;
> +
> +	dbg("%s", __func__);
> +
> +	intfdata = port->serial->private;
> +
> +	if (!intfdata->send_setup)
> +		return -EINVAL;

The function returns void. Moreover, is it correct to skip 
tty_termios_copy_hw() call?

> +	/* Doesn't support option setting */
> +	tty_termios_copy_hw(tty->termios, old_termios);
> +	intfdata->send_setup(port);
> +}
> +EXPORT_SYMBOL(usb_wwan_set_termios);
> +
> +int usb_wwan_tiocmget(struct tty_struct *tty, struct file *file)
> +{
> +	struct usb_serial_port *port = tty->driver_data;
> +	unsigned int value;
> +	struct option_port_private *portdata;

Another option_port_private.

[..]
> +int usb_wwan_tiocmset(struct tty_struct *tty, struct file *file,
> +		      unsigned int set, unsigned int clear)
> +{
> +	struct usb_serial_port *port = tty->driver_data;
> +	struct option_port_private *portdata;

And a third one.

[...]
-- 
Anssi Hannula
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux