Commit 4f2ab888 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

USB: cp210x: fix whitespace issues

Fix missing and superfluous whitespace.
Fix misplaced brackets.
Fix indentation.
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 487c151a
......@@ -35,8 +35,7 @@
*/
static int cp210x_open(struct tty_struct *tty, struct usb_serial_port *);
static void cp210x_close(struct usb_serial_port *);
static void cp210x_get_termios(struct tty_struct *,
struct usb_serial_port *port);
static void cp210x_get_termios(struct tty_struct *, struct usb_serial_port *);
static void cp210x_get_termios_port(struct usb_serial_port *port,
unsigned int *cflagp, unsigned int *baudp);
static void cp210x_change_speed(struct tty_struct *, struct usb_serial_port *,
......@@ -281,7 +280,7 @@ static int cp210x_get_config(struct usb_serial_port *port, u8 request,
int result, i, length;
/* Number of integers required to contain the array */
length = (((size - 1) | 3) + 1)/4;
length = (((size - 1) | 3) + 1) / 4;
buf = kcalloc(length, sizeof(__le32), GFP_KERNEL);
if (!buf) {
......@@ -328,12 +327,11 @@ static int cp210x_set_config(struct usb_serial_port *port, u8 request,
int result, i, length;
/* Number of integers required to contain the array */
length = (((size - 1) | 3) + 1)/4;
length = (((size - 1) | 3) + 1) / 4;
buf = kmalloc(length * sizeof(__le32), GFP_KERNEL);
if (!buf) {
dev_err(&port->dev, "%s - out of memory.\n",
__func__);
dev_err(&port->dev, "%s - out of memory.\n", __func__);
return -ENOMEM;
}
......@@ -384,7 +382,8 @@ static inline int cp210x_set_config_single(struct usb_serial_port *port,
* cp210x_quantise_baudrate
* Quantises the baud rate as per AN205 Table 1
*/
static unsigned int cp210x_quantise_baudrate(unsigned int baud) {
static unsigned int cp210x_quantise_baudrate(unsigned int baud)
{
if (baud <= 300)
baud = 300;
else if (baud <= 600) baud = 600;
......@@ -467,9 +466,7 @@ static void cp210x_get_termios(struct tty_struct *tty,
cp210x_get_termios_port(tty->driver_data,
&tty->termios.c_cflag, &baud);
tty_encode_baud_rate(tty, baud, baud);
}
else {
} else {
unsigned int cflag;
cflag = 0;
cp210x_get_termios_port(port, &cflag, &baud);
......@@ -767,7 +764,7 @@ static void cp210x_set_termios(struct tty_struct *tty,
}
static int cp210x_tiocmset (struct tty_struct *tty,
static int cp210x_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{
struct usb_serial_port *port = tty->driver_data;
......@@ -809,7 +806,7 @@ static void cp210x_dtr_rts(struct usb_serial_port *p, int on)
cp210x_tiocmset_port(p, 0, TIOCM_DTR|TIOCM_RTS);
}
static int cp210x_tiocmget (struct tty_struct *tty)
static int cp210x_tiocmget(struct tty_struct *tty)
{
struct usb_serial_port *port = tty->driver_data;
unsigned int control;
......@@ -829,7 +826,7 @@ static int cp210x_tiocmget (struct tty_struct *tty)
return result;
}
static void cp210x_break_ctl (struct tty_struct *tty, int break_state)
static void cp210x_break_ctl(struct tty_struct *tty, int break_state)
{
struct usb_serial_port *port = tty->driver_data;
unsigned int state;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment