Re: [PATCH V8 08/10] USB: f81232: clarify f81232_ioctl() and fix

From: Johan Hovold
Date: Sat Mar 14 2015 - 08:28:04 EST


On Thu, Feb 26, 2015 at 06:02:14PM +0800, Peter Hung wrote:
> We extract TIOCGSERIAL section in f81232_ioctl() to f81232_get_serial_info()
> to make it clarify.
>
> Also we fix device type from 16654 to 16550A, and set it's baud_base
> to 115200 (1.8432MHz/16).
>
> Signed-off-by: Peter Hung <hpeter+linux_kernel@xxxxxxxxx>
> ---
> drivers/usb/serial/f81232.c | 30 +++++++++++++++++++-----------
> 1 file changed, 19 insertions(+), 11 deletions(-)
>
> diff --git a/drivers/usb/serial/f81232.c b/drivers/usb/serial/f81232.c
> index 0580195..21f2342 100644
> --- a/drivers/usb/serial/f81232.c
> +++ b/drivers/usb/serial/f81232.c
> @@ -596,24 +596,32 @@ static int f81232_carrier_raised(struct usb_serial_port *port)
> return 0;
> }
>
> +static int f81232_get_serial_info(struct usb_serial_port *port,
> + unsigned long arg)
> +{
> + struct serial_struct ser;
> +
> + memset(&ser, 0, sizeof(ser));
> +
> + ser.type = PORT_16550A;
> + ser.line = port->minor;
> + ser.port = port->port_number;
> + ser.baud_base = 115200;

Do you want to use you MAX_BAUDRATE define here as well?

Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/