> I hope it's OK that I submit the patch with the below changes to Greg
> for inclusion in v3.14. Let me know if you prefer to respin yourself.

Hi Johan

The patch looks good.

Acked-by: Andrew Lunn <[email protected]>

> Thanks for all your work with fixing up and mainlining this driver!

And thanks for all the reviews.

    Andrew

> 
> Happy new year,
> Johan
> 
> 
> diff --git a/drivers/usb/serial/mxuport.c b/drivers/usb/serial/mxuport.c
> index 4b7a5bf57526..17e4f40b6306 100644
> --- a/drivers/usb/serial/mxuport.c
> +++ b/drivers/usb/serial/mxuport.c
> @@ -229,13 +229,14 @@ static int mxuport_recv_ctrl_urb(struct usb_serial 
> *serial,
>                                USB_CTRL_GET_TIMEOUT);
>       if (status < 0) {
>               dev_err(&serial->interface->dev,
> -                     "%s - recv usb_control_msg failed. (%d)\n",
> +                     "%s - usb_control_msg failed (%d)\n",
>                       __func__, status);
>               return status;
>       }
>  
>       if (status != size) {
> -             dev_err(&serial->interface->dev, "%s - sort read (%d / %zd)\n",
> +             dev_err(&serial->interface->dev,
> +                     "%s - short read (%d / %zd)\n",
>                       __func__, status, size);
>               return -EIO;
>       }
> @@ -260,13 +261,14 @@ static int mxuport_send_ctrl_data_urb(struct usb_serial 
> *serial,
>                                USB_CTRL_SET_TIMEOUT);
>       if (status < 0) {
>               dev_err(&serial->interface->dev,
> -                     "%s - send usb_control_msg failed. (%d)\n",
> +                     "%s - usb_control_msg failed (%d)\n",
>                       __func__, status);
>               return status;
>       }
>  
>       if (status != size) {
> -             dev_err(&serial->interface->dev, "%s - sort write (%d / %zd)\n",
> +             dev_err(&serial->interface->dev,
> +                     "%s - short write (%d / %zd)\n",
>                       __func__, status, size);
>               return -EIO;
>       }
> @@ -974,8 +976,10 @@ static int mxuport_get_fw_version(struct usb_serial 
> *serial, u32 *version)
>       /* Get firmware version from SDRAM */
>       err = mxuport_recv_ctrl_urb(serial, RQ_VENDOR_GET_VERSION, 0, 0,
>                                   ver_buf, 4);
> -     if (err != 4)
> +     if (err != 4) {
> +             err = -EIO;
>               goto out;
> +     }
>  
>       *version = (ver_buf[0] << 16) | (ver_buf[1] << 8) | ver_buf[2];
>       err = 0;
> @@ -1137,7 +1141,10 @@ static int mxuport_port_probe(struct usb_serial_port 
> *port)
>       err = mxuport_send_ctrl_urb(serial, RQ_VENDOR_SET_INTERFACE,
>                                   MX_INT_RS232,
>                                   port->port_number);
> -     return err;
> +     if (err)
> +             return err;
> +
> +     return 0;
>  }
>  
>  static int mxuport_alloc_write_urb(struct usb_serial *serial,
> @@ -1240,13 +1247,14 @@ static int mxuport_attach(struct usb_serial *serial)
>       /*
>        * All data from the ports is received on the first bulk in
>        * endpoint, with a multiplex header. The second bulk in is
> -      * used for events. Start to read serial data from the device
> +      * used for events.
> +      *
> +      * Start to read from the device.
>        */
>       err = usb_serial_generic_submit_read_urbs(port0, GFP_KERNEL);
>       if (err)
>               return err;
>  
> -     /* Endpoints on Port1 is used for events */
>       err = usb_serial_generic_submit_read_urbs(port1, GFP_KERNEL);
>       if (err) {
>               usb_serial_generic_close(port0);
> @@ -1304,11 +1312,8 @@ static void mxuport_break_ctl(struct tty_struct *tty, 
> int break_state)
>  {
>       struct usb_serial_port *port = tty->driver_data;
>       struct usb_serial *serial = port->serial;
> -     struct mxuport_port *mxport;
>       int enable;
>  
> -     mxport = usb_get_serial_port_data(port);
> -
>       if (break_state == -1) {
>               enable = 1;
>               dev_dbg(&port->dev, "%s - sending break\n", __func__);
> @@ -1384,11 +1389,6 @@ static struct usb_serial_driver *const 
> serial_drivers[] = {
>  
>  module_usb_serial_driver(serial_drivers, mxuport_idtable);
>  
> -/*
> - *  Module Information
> - */
>  MODULE_AUTHOR("Andrew Lunn <[email protected]>");
>  MODULE_AUTHOR("<[email protected]>");
>  MODULE_LICENSE("GPL");
> -
> -
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to