Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff7eb602 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds
Browse files

cp2101: coding style



Bring up to coding style

Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c17ee886
Loading
Loading
Loading
Loading
+156 −159
Original line number Diff line number Diff line
@@ -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)
{
+0 −1
Original line number Diff line number Diff line
@@ -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);