diff options
author | Alan Cox <alan@linux.intel.com> | 2009-11-30 08:16:25 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-11 18:18:06 -0500 |
commit | c271cf37ba17631e371c97e2e8c8c353a83793e2 (patch) | |
tree | 9b03534304fd169befffd6473630e4d658993bd6 /drivers/mmc/card/sdio_uart.c | |
parent | 6238e712aff51ae74177cee5b2a63c0e37044e8f (diff) |
tty: sdio_uart: Style fixes
Running the current code through checkpatch shows a few bits of noise
mostly but not entirely from before the changes.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/mmc/card/sdio_uart.c')
-rw-r--r-- | drivers/mmc/card/sdio_uart.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/mmc/card/sdio_uart.c b/drivers/mmc/card/sdio_uart.c index 210439742134..b999972eaf28 100644 --- a/drivers/mmc/card/sdio_uart.c +++ b/drivers/mmc/card/sdio_uart.c | |||
@@ -465,7 +465,8 @@ static void sdio_uart_transmit_chars(struct sdio_uart_port *port) | |||
465 | 465 | ||
466 | tty = tty_port_tty_get(&port->port); | 466 | tty = tty_port_tty_get(&port->port); |
467 | 467 | ||
468 | if (tty == NULL || circ_empty(xmit) || tty->stopped || tty->hw_stopped) { | 468 | if (tty == NULL || circ_empty(xmit) || |
469 | tty->stopped || tty->hw_stopped) { | ||
469 | sdio_uart_stop_tx(port); | 470 | sdio_uart_stop_tx(port); |
470 | tty_kref_put(tty); | 471 | tty_kref_put(tty); |
471 | return; | 472 | return; |
@@ -645,7 +646,7 @@ static int sdio_uart_activate(struct tty_port *tport, struct tty_struct *tty) | |||
645 | */ | 646 | */ |
646 | sdio_out(port, UART_LCR, UART_LCR_WLEN8); | 647 | sdio_out(port, UART_LCR, UART_LCR_WLEN8); |
647 | 648 | ||
648 | port->ier = UART_IER_RLSI | UART_IER_RDI | UART_IER_RTOIE | UART_IER_UUE; | 649 | port->ier = UART_IER_RLSI|UART_IER_RDI|UART_IER_RTOIE|UART_IER_UUE; |
649 | port->mctrl = TIOCM_OUT2; | 650 | port->mctrl = TIOCM_OUT2; |
650 | 651 | ||
651 | sdio_uart_change_speed(port, tty->termios, NULL); | 652 | sdio_uart_change_speed(port, tty->termios, NULL); |
@@ -674,7 +675,6 @@ err1: | |||
674 | return ret; | 675 | return ret; |
675 | } | 676 | } |
676 | 677 | ||
677 | |||
678 | /** | 678 | /** |
679 | * sdio_uart_shutdown - stop hardware | 679 | * sdio_uart_shutdown - stop hardware |
680 | * @tport: tty port to shut down | 680 | * @tport: tty port to shut down |
@@ -745,7 +745,6 @@ static int sdio_uart_install(struct tty_driver *driver, struct tty_struct *tty) | |||
745 | } else | 745 | } else |
746 | sdio_uart_port_put(port); | 746 | sdio_uart_port_put(port); |
747 | return ret; | 747 | return ret; |
748 | |||
749 | } | 748 | } |
750 | 749 | ||
751 | /** | 750 | /** |
@@ -785,7 +784,7 @@ static void sdio_uart_hangup(struct tty_struct *tty) | |||
785 | tty_port_hangup(&port->port); | 784 | tty_port_hangup(&port->port); |
786 | } | 785 | } |
787 | 786 | ||
788 | static int sdio_uart_write(struct tty_struct * tty, const unsigned char *buf, | 787 | static int sdio_uart_write(struct tty_struct *tty, const unsigned char *buf, |
789 | int count) | 788 | int count) |
790 | { | 789 | { |
791 | struct sdio_uart_port *port = tty->driver_data; | 790 | struct sdio_uart_port *port = tty->driver_data; |
@@ -810,7 +809,7 @@ static int sdio_uart_write(struct tty_struct * tty, const unsigned char *buf, | |||
810 | } | 809 | } |
811 | spin_unlock(&port->write_lock); | 810 | spin_unlock(&port->write_lock); |
812 | 811 | ||
813 | if ( !(port->ier & UART_IER_THRI)) { | 812 | if (!(port->ier & UART_IER_THRI)) { |
814 | int err = sdio_uart_claim_func(port); | 813 | int err = sdio_uart_claim_func(port); |
815 | if (!err) { | 814 | if (!err) { |
816 | sdio_uart_start_tx(port); | 815 | sdio_uart_start_tx(port); |
@@ -897,7 +896,8 @@ static void sdio_uart_unthrottle(struct tty_struct *tty) | |||
897 | sdio_uart_release_func(port); | 896 | sdio_uart_release_func(port); |
898 | } | 897 | } |
899 | 898 | ||
900 | static void sdio_uart_set_termios(struct tty_struct *tty, struct ktermios *old_termios) | 899 | static void sdio_uart_set_termios(struct tty_struct *tty, |
900 | struct ktermios *old_termios) | ||
901 | { | 901 | { |
902 | struct sdio_uart_port *port = tty->driver_data; | 902 | struct sdio_uart_port *port = tty->driver_data; |
903 | unsigned int cflag = tty->termios->c_cflag; | 903 | unsigned int cflag = tty->termios->c_cflag; |
@@ -976,7 +976,7 @@ static int sdio_uart_tiocmset(struct tty_struct *tty, struct file *file, | |||
976 | int result; | 976 | int result; |
977 | 977 | ||
978 | result = sdio_uart_claim_func(port); | 978 | result = sdio_uart_claim_func(port); |
979 | if(!result) { | 979 | if (!result) { |
980 | sdio_uart_update_mctrl(port, set, clear); | 980 | sdio_uart_update_mctrl(port, set, clear); |
981 | sdio_uart_release_func(port); | 981 | sdio_uart_release_func(port); |
982 | } | 982 | } |
@@ -994,7 +994,7 @@ static int sdio_uart_proc_show(struct seq_file *m, void *v) | |||
994 | struct sdio_uart_port *port = sdio_uart_port_get(i); | 994 | struct sdio_uart_port *port = sdio_uart_port_get(i); |
995 | if (port) { | 995 | if (port) { |
996 | seq_printf(m, "%d: uart:SDIO", i); | 996 | seq_printf(m, "%d: uart:SDIO", i); |
997 | if(capable(CAP_SYS_ADMIN)) { | 997 | if (capable(CAP_SYS_ADMIN)) { |
998 | seq_printf(m, " tx:%d rx:%d", | 998 | seq_printf(m, " tx:%d rx:%d", |
999 | port->icount.tx, port->icount.rx); | 999 | port->icount.tx, port->icount.rx); |
1000 | if (port->icount.frame) | 1000 | if (port->icount.frame) |
@@ -1100,7 +1100,7 @@ static int sdio_uart_probe(struct sdio_func *func, | |||
1100 | } | 1100 | } |
1101 | if (!tpl) { | 1101 | if (!tpl) { |
1102 | printk(KERN_WARNING | 1102 | printk(KERN_WARNING |
1103 | "%s: can't find tuple 0x91 subtuple 0 (SUBTPL_SIOREG) for GPS class\n", | 1103 | "%s: can't find tuple 0x91 subtuple 0 (SUBTPL_SIOREG) for GPS class\n", |
1104 | sdio_func_id(func)); | 1104 | sdio_func_id(func)); |
1105 | kfree(port); | 1105 | kfree(port); |
1106 | return -EINVAL; | 1106 | return -EINVAL; |
@@ -1133,7 +1133,8 @@ static int sdio_uart_probe(struct sdio_func *func, | |||
1133 | kfree(port); | 1133 | kfree(port); |
1134 | } else { | 1134 | } else { |
1135 | struct device *dev; | 1135 | struct device *dev; |
1136 | dev = tty_register_device(sdio_uart_tty_driver, port->index, &func->dev); | 1136 | dev = tty_register_device(sdio_uart_tty_driver, |
1137 | port->index, &func->dev); | ||
1137 | if (IS_ERR(dev)) { | 1138 | if (IS_ERR(dev)) { |
1138 | sdio_uart_port_remove(port); | 1139 | sdio_uart_port_remove(port); |
1139 | ret = PTR_ERR(dev); | 1140 | ret = PTR_ERR(dev); |