cp2101: coding style

Bring up to coding style

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Alan Cox 2008-07-22 11:10:17 +01:00 committed by Linus Torvalds
parent c17ee88697
commit ff7eb60260
2 changed files with 156 additions and 160 deletions

View file

@ -25,7 +25,7 @@
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/usb.h>
#include <asm/uaccess.h>
#include <linux/uaccess.h>
#include <linux/usb/serial.h>
/*
@ -406,16 +406,15 @@ static void cp2101_get_termios (struct tty_struct *tty)
cflag |= CS8;
break;
case BITS_DATA_9:
dbg("%s - data bits = 9 (not supported, "
"using 8 data bits)", __func__);
dbg("%s - data bits = 9 (not supported, using 8 data bits)",
__func__);
cflag |= CS8;
bits &= ~BITS_DATA_MASK;
bits |= BITS_DATA_8;
cp2101_set_config(port, CP2101_BITS, &bits, 2);
break;
default:
dbg("%s - Unknown number of data bits, "
"using 8", __func__);
dbg("%s - Unknown number of data bits, using 8", __func__);
cflag |= CS8;
bits &= ~BITS_DATA_MASK;
bits |= BITS_DATA_8;
@ -438,22 +437,21 @@ static void cp2101_get_termios (struct tty_struct *tty)
cflag |= PARENB;
break;
case BITS_PARITY_MARK:
dbg("%s - parity = MARK (not supported, "
"disabling parity)", __func__);
dbg("%s - parity = MARK (not supported, disabling parity)",
__func__);
cflag &= ~PARENB;
bits &= ~BITS_PARITY_MASK;
cp2101_set_config(port, CP2101_BITS, &bits, 2);
break;
case BITS_PARITY_SPACE:
dbg("%s - parity = SPACE (not supported, "
"disabling parity)", __func__);
dbg("%s - parity = SPACE (not supported, disabling parity)",
__func__);
cflag &= ~PARENB;
bits &= ~BITS_PARITY_MASK;
cp2101_set_config(port, CP2101_BITS, &bits, 2);
break;
default:
dbg("%s - Unknown parity mode, "
"disabling parity", __func__);
dbg("%s - Unknown parity mode, disabling parity", __func__);
cflag &= ~PARENB;
bits &= ~BITS_PARITY_MASK;
cp2101_set_config(port, CP2101_BITS, &bits, 2);
@ -466,8 +464,8 @@ static void cp2101_get_termios (struct tty_struct *tty)
dbg("%s - stop bits = 1", __func__);
break;
case BITS_STOP_1_5:
dbg("%s - stop bits = 1.5 (not supported, "
"using 1 stop bit)", __func__);
dbg("%s - stop bits = 1.5 (not supported, using 1 stop bit)",
__func__);
bits &= ~BITS_STOP_MASK;
cp2101_set_config(port, CP2101_BITS, &bits, 2);
break;
@ -476,8 +474,8 @@ static void cp2101_get_termios (struct tty_struct *tty)
cflag |= CSTOPB;
break;
default:
dbg("%s - Unknown number of stop bits, "
"using 1 stop bit", __func__);
dbg("%s - Unknown number of stop bits, using 1 stop bit",
__func__);
bits &= ~BITS_STOP_MASK;
cp2101_set_config(port, CP2101_BITS, &bits, 2);
break;
@ -732,10 +730,9 @@ static void cp2101_shutdown (struct usb_serial *serial)
dbg("%s", __func__);
/* Stop reads and writes on all ports */
for (i=0; i < serial->num_ports; ++i) {
for (i = 0; i < serial->num_ports; ++i)
cp2101_cleanup(serial->port[i]);
}
}
static int __init cp2101_init(void)
{

View file

@ -646,7 +646,6 @@ static int whiteheat_open(struct tty_struct *tty,
struct usb_serial_port *port, struct file *filp)
{
int retval = 0;
struct ktermios old_term;
dbg("%s - port %d", __func__, port->number);