@@ -60,7 +60,8 @@ static void atmel_stop_rx(struct uart_port *port);
/* Use device name ttyAT, major 204 and minor 154-169. This is necessary if we
* should coexist with the 8250 driver, such as if we have an external 16C550
- * UART. */
+ * UART.
+ */
#define SERIAL_ATMEL_MAJOR 204
#define MINOR_START 154
#define ATMEL_DEVICENAME "ttyAT"
@@ -68,7 +69,8 @@ static void atmel_stop_rx(struct uart_port *port);
#else
/* Use device name ttyS, major 4, minor 64-68. This is the usual serial port
- * name, but it is legally reserved for the 8250 driver. */
+ * name, but it is legally reserved for the 8250 driver.
+ */
#define SERIAL_ATMEL_MAJOR TTY_MAJOR
#define MINOR_START 64
#define ATMEL_DEVICENAME "ttyS"
@@ -582,7 +584,8 @@ static void atmel_start_tx(struct uart_port *port)
if (atmel_use_pdc_tx(port) && (atmel_uart_readl(port, ATMEL_PDC_PTSR)
& ATMEL_PDC_TXTEN))
/* The transmitter is already running. Yes, we
- really need this.*/
+ * really need this.
+ */
return;
if (atmel_use_pdc_tx(port) || atmel_use_dma_tx(port))
@@ -2399,6 +2402,7 @@ static void atmel_config_port(struct uart_port *port, int flags)
static int atmel_verify_port(struct uart_port *port, struct serial_struct *ser)
{
int ret = 0;
+
if (ser->type != PORT_UNKNOWN && ser->type != PORT_ATMEL)
ret = -EINVAL;
if (port->irq != ser->irq)
@@ -2837,7 +2841,8 @@ static int atmel_serial_probe(struct platform_device *pdev)
ret = of_alias_get_id(np, "serial");
if (ret < 0)
/* port id not found in platform data nor device-tree aliases:
- * auto-enumerate it */
+ * auto-enumerate it
+ */
ret = find_first_zero_bit(atmel_ports_in_use, ATMEL_MAX_UART);
if (ret >= ATMEL_MAX_UART) {