From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755612AbbCNM2B (ORCPT ); Sat, 14 Mar 2015 08:28:01 -0400 Received: from mail-lb0-f169.google.com ([209.85.217.169]:35391 "EHLO mail-lb0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751436AbbCNM15 (ORCPT ); Sat, 14 Mar 2015 08:27:57 -0400 Date: Sat, 14 Mar 2015 13:27:43 +0100 From: Johan Hovold To: Peter Hung Cc: johan@kernel.org, gregkh@linuxfoundation.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, tom_tsai@fintek.com.tw, peter_hong@fintek.com.tw, Peter Hung Subject: Re: [PATCH V8 08/10] USB: f81232: clarify f81232_ioctl() and fix Message-ID: <20150314122743.GG9442@localhost> References: <1424944936-7117-1-git-send-email-hpeter+linux_kernel@gmail.com> <1424944936-7117-9-git-send-email-hpeter+linux_kernel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1424944936-7117-9-git-send-email-hpeter+linux_kernel@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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