diff options
author | Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> | 2009-10-15 15:44:00 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2009-12-04 09:39:48 -0500 |
commit | 1e04b7ae709d19d5c9f69c64e1e30253018ce102 (patch) | |
tree | 4d7a5544b2f17774b3cc530a928298b7d7e194b6 /drivers | |
parent | 94e2bd688820aed72b4f8092f88c2ccf64e003de (diff) |
sdio_uart: coding style fixes
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/card/sdio_uart.c | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/drivers/mmc/card/sdio_uart.c b/drivers/mmc/card/sdio_uart.c index 36a8d53ad2a2..b8e7c5ae981e 100644 --- a/drivers/mmc/card/sdio_uart.c +++ b/drivers/mmc/card/sdio_uart.c | |||
@@ -231,7 +231,8 @@ static unsigned int sdio_uart_get_mctrl(struct sdio_uart_port *port) | |||
231 | return ret; | 231 | return ret; |
232 | } | 232 | } |
233 | 233 | ||
234 | static void sdio_uart_write_mctrl(struct sdio_uart_port *port, unsigned int mctrl) | 234 | static void sdio_uart_write_mctrl(struct sdio_uart_port *port, |
235 | unsigned int mctrl) | ||
235 | { | 236 | { |
236 | unsigned char mcr = 0; | 237 | unsigned char mcr = 0; |
237 | 238 | ||
@@ -387,7 +388,8 @@ static void sdio_uart_stop_rx(struct sdio_uart_port *port) | |||
387 | sdio_out(port, UART_IER, port->ier); | 388 | sdio_out(port, UART_IER, port->ier); |
388 | } | 389 | } |
389 | 390 | ||
390 | static void sdio_uart_receive_chars(struct sdio_uart_port *port, unsigned int *status) | 391 | static void sdio_uart_receive_chars(struct sdio_uart_port *port, |
392 | unsigned int *status) | ||
391 | { | 393 | { |
392 | struct tty_struct *tty = port->tty; | 394 | struct tty_struct *tty = port->tty; |
393 | unsigned int ch, flag; | 395 | unsigned int ch, flag; |
@@ -399,7 +401,7 @@ static void sdio_uart_receive_chars(struct sdio_uart_port *port, unsigned int *s | |||
399 | port->icount.rx++; | 401 | port->icount.rx++; |
400 | 402 | ||
401 | if (unlikely(*status & (UART_LSR_BI | UART_LSR_PE | | 403 | if (unlikely(*status & (UART_LSR_BI | UART_LSR_PE | |
402 | UART_LSR_FE | UART_LSR_OE))) { | 404 | UART_LSR_FE | UART_LSR_OE))) { |
403 | /* | 405 | /* |
404 | * For statistics only | 406 | * For statistics only |
405 | */ | 407 | */ |
@@ -417,9 +419,9 @@ static void sdio_uart_receive_chars(struct sdio_uart_port *port, unsigned int *s | |||
417 | * Mask off conditions which should be ignored. | 419 | * Mask off conditions which should be ignored. |
418 | */ | 420 | */ |
419 | *status &= port->read_status_mask; | 421 | *status &= port->read_status_mask; |
420 | if (*status & UART_LSR_BI) { | 422 | if (*status & UART_LSR_BI) |
421 | flag = TTY_BREAK; | 423 | flag = TTY_BREAK; |
422 | } else if (*status & UART_LSR_PE) | 424 | else if (*status & UART_LSR_PE) |
423 | flag = TTY_PARITY; | 425 | flag = TTY_PARITY; |
424 | else if (*status & UART_LSR_FE) | 426 | else if (*status & UART_LSR_FE) |
425 | flag = TTY_FRAME; | 427 | flag = TTY_FRAME; |
@@ -574,7 +576,7 @@ static int sdio_uart_startup(struct sdio_uart_port *port) | |||
574 | */ | 576 | */ |
575 | sdio_out(port, UART_FCR, UART_FCR_ENABLE_FIFO); | 577 | sdio_out(port, UART_FCR, UART_FCR_ENABLE_FIFO); |
576 | sdio_out(port, UART_FCR, UART_FCR_ENABLE_FIFO | | 578 | sdio_out(port, UART_FCR, UART_FCR_ENABLE_FIFO | |
577 | UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT); | 579 | UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT); |
578 | sdio_out(port, UART_FCR, 0); | 580 | sdio_out(port, UART_FCR, 0); |
579 | 581 | ||
580 | /* | 582 | /* |
@@ -635,7 +637,7 @@ static void sdio_uart_shutdown(struct sdio_uart_port *port) | |||
635 | if (port->tty->termios->c_cflag & HUPCL) | 637 | if (port->tty->termios->c_cflag & HUPCL) |
636 | sdio_uart_clear_mctrl(port, TIOCM_DTR | TIOCM_RTS); | 638 | sdio_uart_clear_mctrl(port, TIOCM_DTR | TIOCM_RTS); |
637 | 639 | ||
638 | /* Disable interrupts from this port */ | 640 | /* Disable interrupts from this port */ |
639 | sdio_release_irq(port->func); | 641 | sdio_release_irq(port->func); |
640 | port->ier = 0; | 642 | port->ier = 0; |
641 | sdio_out(port, UART_IER, 0); | 643 | sdio_out(port, UART_IER, 0); |
@@ -659,7 +661,7 @@ skip: | |||
659 | free_page((unsigned long)port->xmit.buf); | 661 | free_page((unsigned long)port->xmit.buf); |
660 | } | 662 | } |
661 | 663 | ||
662 | static int sdio_uart_open (struct tty_struct *tty, struct file * filp) | 664 | static int sdio_uart_open(struct tty_struct *tty, struct file *filp) |
663 | { | 665 | { |
664 | struct sdio_uart_port *port; | 666 | struct sdio_uart_port *port; |
665 | int ret; | 667 | int ret; |
@@ -846,7 +848,7 @@ static void sdio_uart_set_termios(struct tty_struct *tty, struct ktermios *old_t | |||
846 | struct sdio_uart_port *port = tty->driver_data; | 848 | struct sdio_uart_port *port = tty->driver_data; |
847 | unsigned int cflag = tty->termios->c_cflag; | 849 | unsigned int cflag = tty->termios->c_cflag; |
848 | 850 | ||
849 | #define RELEVANT_IFLAG(iflag) ((iflag) & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK)) | 851 | #define RELEVANT_IFLAG(iflag) ((iflag) & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK)) |
850 | 852 | ||
851 | if ((cflag ^ old_termios->c_cflag) == 0 && | 853 | if ((cflag ^ old_termios->c_cflag) == 0 && |
852 | RELEVANT_IFLAG(tty->termios->c_iflag ^ old_termios->c_iflag) == 0) | 854 | RELEVANT_IFLAG(tty->termios->c_iflag ^ old_termios->c_iflag) == 0) |
@@ -925,7 +927,7 @@ static int sdio_uart_tiocmset(struct tty_struct *tty, struct file *file, | |||
925 | struct sdio_uart_port *port = tty->driver_data; | 927 | struct sdio_uart_port *port = tty->driver_data; |
926 | int result; | 928 | int result; |
927 | 929 | ||
928 | result =sdio_uart_claim_func(port); | 930 | result = sdio_uart_claim_func(port); |
929 | if(!result) { | 931 | if(!result) { |
930 | sdio_uart_update_mctrl(port, set, clear); | 932 | sdio_uart_update_mctrl(port, set, clear); |
931 | sdio_uart_release_func(port); | 933 | sdio_uart_release_func(port); |
@@ -946,31 +948,31 @@ static int sdio_uart_proc_show(struct seq_file *m, void *v) | |||
946 | seq_printf(m, "%d: uart:SDIO", i); | 948 | seq_printf(m, "%d: uart:SDIO", i); |
947 | if(capable(CAP_SYS_ADMIN)) { | 949 | if(capable(CAP_SYS_ADMIN)) { |
948 | seq_printf(m, " tx:%d rx:%d", | 950 | seq_printf(m, " tx:%d rx:%d", |
949 | port->icount.tx, port->icount.rx); | 951 | port->icount.tx, port->icount.rx); |
950 | if (port->icount.frame) | 952 | if (port->icount.frame) |
951 | seq_printf(m, " fe:%d", | 953 | seq_printf(m, " fe:%d", |
952 | port->icount.frame); | 954 | port->icount.frame); |
953 | if (port->icount.parity) | 955 | if (port->icount.parity) |
954 | seq_printf(m, " pe:%d", | 956 | seq_printf(m, " pe:%d", |
955 | port->icount.parity); | 957 | port->icount.parity); |
956 | if (port->icount.brk) | 958 | if (port->icount.brk) |
957 | seq_printf(m, " brk:%d", | 959 | seq_printf(m, " brk:%d", |
958 | port->icount.brk); | 960 | port->icount.brk); |
959 | if (port->icount.overrun) | 961 | if (port->icount.overrun) |
960 | seq_printf(m, " oe:%d", | 962 | seq_printf(m, " oe:%d", |
961 | port->icount.overrun); | 963 | port->icount.overrun); |
962 | if (port->icount.cts) | 964 | if (port->icount.cts) |
963 | seq_printf(m, " cts:%d", | 965 | seq_printf(m, " cts:%d", |
964 | port->icount.cts); | 966 | port->icount.cts); |
965 | if (port->icount.dsr) | 967 | if (port->icount.dsr) |
966 | seq_printf(m, " dsr:%d", | 968 | seq_printf(m, " dsr:%d", |
967 | port->icount.dsr); | 969 | port->icount.dsr); |
968 | if (port->icount.rng) | 970 | if (port->icount.rng) |
969 | seq_printf(m, " rng:%d", | 971 | seq_printf(m, " rng:%d", |
970 | port->icount.rng); | 972 | port->icount.rng); |
971 | if (port->icount.dcd) | 973 | if (port->icount.dcd) |
972 | seq_printf(m, " dcd:%d", | 974 | seq_printf(m, " dcd:%d", |
973 | port->icount.dcd); | 975 | port->icount.dcd); |
974 | } | 976 | } |
975 | sdio_uart_port_put(port); | 977 | sdio_uart_port_put(port); |
976 | seq_putc(m, '\n'); | 978 | seq_putc(m, '\n'); |