Commit 82313e66 authored by Sachin Kamat's avatar Sachin Kamat Committed by Greg Kroah-Hartman

serial: imx: Fix checkpatch errors related to spacing

Fixed checkpatch errors and warnings related to incorrect spacing.

Cc: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: default avatarSachin Kamat <sachin.kamat@linaro.org>
Acked-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 905f4ba2
...@@ -199,7 +199,7 @@ struct imx_port { ...@@ -199,7 +199,7 @@ struct imx_port {
struct uart_port port; struct uart_port port;
struct timer_list timer; struct timer_list timer;
unsigned int old_status; unsigned int old_status;
int txirq,rxirq,rtsirq; int txirq, rxirq, rtsirq;
unsigned int have_rtscts:1; unsigned int have_rtscts:1;
unsigned int use_irda:1; unsigned int use_irda:1;
unsigned int irda_inv_rx:1; unsigned int irda_inv_rx:1;
...@@ -397,7 +397,7 @@ static void imx_stop_rx(struct uart_port *port) ...@@ -397,7 +397,7 @@ static void imx_stop_rx(struct uart_port *port)
unsigned long temp; unsigned long temp;
temp = readl(sport->port.membase + UCR2); temp = readl(sport->port.membase + UCR2);
writel(temp &~ UCR2_RXEN, sport->port.membase + UCR2); writel(temp & ~UCR2_RXEN, sport->port.membase + UCR2);
} }
/* /*
...@@ -490,7 +490,7 @@ static irqreturn_t imx_txint(int irq, void *dev_id) ...@@ -490,7 +490,7 @@ static irqreturn_t imx_txint(int irq, void *dev_id)
struct circ_buf *xmit = &sport->port.state->xmit; struct circ_buf *xmit = &sport->port.state->xmit;
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&sport->port.lock,flags); spin_lock_irqsave(&sport->port.lock, flags);
if (sport->port.x_char) if (sport->port.x_char)
{ {
/* Send next char */ /* Send next char */
...@@ -509,18 +509,18 @@ static irqreturn_t imx_txint(int irq, void *dev_id) ...@@ -509,18 +509,18 @@ static irqreturn_t imx_txint(int irq, void *dev_id)
uart_write_wakeup(&sport->port); uart_write_wakeup(&sport->port);
out: out:
spin_unlock_irqrestore(&sport->port.lock,flags); spin_unlock_irqrestore(&sport->port.lock, flags);
return IRQ_HANDLED; return IRQ_HANDLED;
} }
static irqreturn_t imx_rxint(int irq, void *dev_id) static irqreturn_t imx_rxint(int irq, void *dev_id)
{ {
struct imx_port *sport = dev_id; struct imx_port *sport = dev_id;
unsigned int rx,flg,ignored = 0; unsigned int rx, flg, ignored = 0;
struct tty_struct *tty = sport->port.state->port.tty; struct tty_struct *tty = sport->port.state->port.tty;
unsigned long flags, temp; unsigned long flags, temp;
spin_lock_irqsave(&sport->port.lock,flags); spin_lock_irqsave(&sport->port.lock, flags);
while (readl(sport->port.membase + USR2) & USR2_RDR) { while (readl(sport->port.membase + USR2) & USR2_RDR) {
flg = TTY_NORMAL; flg = TTY_NORMAL;
...@@ -574,7 +574,7 @@ static irqreturn_t imx_rxint(int irq, void *dev_id) ...@@ -574,7 +574,7 @@ static irqreturn_t imx_rxint(int irq, void *dev_id)
} }
out: out:
spin_unlock_irqrestore(&sport->port.lock,flags); spin_unlock_irqrestore(&sport->port.lock, flags);
tty_flip_buffer_push(tty); tty_flip_buffer_push(tty);
return IRQ_HANDLED; return IRQ_HANDLED;
} }
...@@ -654,7 +654,7 @@ static void imx_break_ctl(struct uart_port *port, int break_state) ...@@ -654,7 +654,7 @@ static void imx_break_ctl(struct uart_port *port, int break_state)
temp = readl(sport->port.membase + UCR1) & ~UCR1_SNDBRK; temp = readl(sport->port.membase + UCR1) & ~UCR1_SNDBRK;
if ( break_state != 0 ) if (break_state != 0)
temp |= UCR1_SNDBRK; temp |= UCR1_SNDBRK;
writel(temp, sport->port.membase + UCR1); writel(temp, sport->port.membase + UCR1);
...@@ -696,8 +696,8 @@ static int imx_startup(struct uart_port *port) ...@@ -696,8 +696,8 @@ static int imx_startup(struct uart_port *port)
temp |= UCR4_IRSC; temp |= UCR4_IRSC;
/* set the trigger level for CTS */ /* set the trigger level for CTS */
temp &= ~(UCR4_CTSTL_MASK<< UCR4_CTSTL_SHF); temp &= ~(UCR4_CTSTL_MASK << UCR4_CTSTL_SHF);
temp |= CTSTL<< UCR4_CTSTL_SHF; temp |= CTSTL << UCR4_CTSTL_SHF;
writel(temp & ~UCR4_DREN, sport->port.membase + UCR4); writel(temp & ~UCR4_DREN, sport->port.membase + UCR4);
...@@ -799,7 +799,7 @@ static int imx_startup(struct uart_port *port) ...@@ -799,7 +799,7 @@ static int imx_startup(struct uart_port *port)
* Enable modem status interrupts * Enable modem status interrupts
*/ */
imx_enable_ms(&sport->port); imx_enable_ms(&sport->port);
spin_unlock_irqrestore(&sport->port.lock,flags); spin_unlock_irqrestore(&sport->port.lock, flags);
if (USE_IRDA(sport)) { if (USE_IRDA(sport)) {
struct imxuart_platform_data *pdata; struct imxuart_platform_data *pdata;
...@@ -909,7 +909,7 @@ imx_set_termios(struct uart_port *port, struct ktermios *termios, ...@@ -909,7 +909,7 @@ imx_set_termios(struct uart_port *port, struct ktermios *termios,
ucr2 = UCR2_SRST | UCR2_IRTS; ucr2 = UCR2_SRST | UCR2_IRTS;
if (termios->c_cflag & CRTSCTS) { if (termios->c_cflag & CRTSCTS) {
if( sport->have_rtscts ) { if (sport->have_rtscts) {
ucr2 &= ~UCR2_IRTS; ucr2 &= ~UCR2_IRTS;
ucr2 |= UCR2_CTSC; ucr2 |= UCR2_CTSC;
} else { } else {
...@@ -969,12 +969,12 @@ imx_set_termios(struct uart_port *port, struct ktermios *termios, ...@@ -969,12 +969,12 @@ imx_set_termios(struct uart_port *port, struct ktermios *termios,
writel(old_ucr1 & ~(UCR1_TXMPTYEN | UCR1_RRDYEN | UCR1_RTSDEN), writel(old_ucr1 & ~(UCR1_TXMPTYEN | UCR1_RRDYEN | UCR1_RTSDEN),
sport->port.membase + UCR1); sport->port.membase + UCR1);
while ( !(readl(sport->port.membase + USR2) & USR2_TXDC)) while (!(readl(sport->port.membase + USR2) & USR2_TXDC))
barrier(); barrier();
/* then, disable everything */ /* then, disable everything */
old_txrxen = readl(sport->port.membase + UCR2); old_txrxen = readl(sport->port.membase + UCR2);
writel(old_txrxen & ~( UCR2_TXEN | UCR2_RXEN), writel(old_txrxen & ~(UCR2_TXEN | UCR2_RXEN),
sport->port.membase + UCR2); sport->port.membase + UCR2);
old_txrxen &= (UCR2_TXEN | UCR2_RXEN); old_txrxen &= (UCR2_TXEN | UCR2_RXEN);
...@@ -1255,7 +1255,7 @@ imx_console_get_options(struct imx_port *sport, int *baud, ...@@ -1255,7 +1255,7 @@ imx_console_get_options(struct imx_port *sport, int *baud,
if (readl(sport->port.membase + UCR1) & UCR1_UARTEN) { if (readl(sport->port.membase + UCR1) & UCR1_UARTEN) {
/* ok, the port was enabled */ /* ok, the port was enabled */
unsigned int ucr2, ubir,ubmr, uartclk; unsigned int ucr2, ubir, ubmr, uartclk;
unsigned int baud_raw; unsigned int baud_raw;
unsigned int ucfr_rfdiv; unsigned int ucfr_rfdiv;
...@@ -1301,7 +1301,7 @@ imx_console_get_options(struct imx_port *sport, int *baud, ...@@ -1301,7 +1301,7 @@ imx_console_get_options(struct imx_port *sport, int *baud,
*baud = (baud_raw + 50) / 100 * 100; *baud = (baud_raw + 50) / 100 * 100;
} }
if(*baud != baud_raw) if (*baud != baud_raw)
printk(KERN_INFO "Serial: Console IMX rounded baud rate from %d to %d\n", printk(KERN_INFO "Serial: Console IMX rounded baud rate from %d to %d\n",
baud_raw, *baud); baud_raw, *baud);
} }
...@@ -1324,7 +1324,7 @@ imx_console_setup(struct console *co, char *options) ...@@ -1324,7 +1324,7 @@ imx_console_setup(struct console *co, char *options)
if (co->index == -1 || co->index >= ARRAY_SIZE(imx_ports)) if (co->index == -1 || co->index >= ARRAY_SIZE(imx_ports))
co->index = 0; co->index = 0;
sport = imx_ports[co->index]; sport = imx_ports[co->index];
if(sport == NULL) if (sport == NULL)
return -ENODEV; return -ENODEV;
if (options) if (options)
......
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