aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/bfin_5xx.c
diff options
context:
space:
mode:
authorGraf Yang <graf.yang@analog.com>2008-06-07 03:36:33 -0400
committerBryan Wu <cooloney@kernel.org>2008-06-07 03:36:33 -0400
commit3b8458a9793a92a6ca3cb24e309f19821bf0d8e5 (patch)
tree66e1f53a04fbe99f23c382b9bc7441b4a19bdcbe /drivers/serial/bfin_5xx.c
parent5bda27235b24146cf870de663141ee4fbfa8a70b (diff)
Blackfin serial driver: fix up tty core set_ldisc API change breakage bug
This is the patch that follows Linus's modification about set_ldisc. Graf has built and tested it on BF537 using Linus's git Tree. Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'drivers/serial/bfin_5xx.c')
-rw-r--r--drivers/serial/bfin_5xx.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/serial/bfin_5xx.c b/drivers/serial/bfin_5xx.c
index 636b6876c6fb..f20952c43cb8 100644
--- a/drivers/serial/bfin_5xx.c
+++ b/drivers/serial/bfin_5xx.c
@@ -813,15 +813,15 @@ bfin_serial_verify_port(struct uart_port *port, struct serial_struct *ser)
813 * Enable the IrDA function if tty->ldisc.num is N_IRDA. 813 * Enable the IrDA function if tty->ldisc.num is N_IRDA.
814 * In other cases, disable IrDA function. 814 * In other cases, disable IrDA function.
815 */ 815 */
816static void bfin_set_ldisc(struct tty_struct *tty) 816static void bfin_serial_set_ldisc(struct uart_port *port)
817{ 817{
818 int line = tty->index; 818 int line = port->line;
819 unsigned short val; 819 unsigned short val;
820 820
821 if (line >= tty->driver->num) 821 if (line >= port->info->tty->driver->num)
822 return; 822 return;
823 823
824 switch (tty->ldisc.num) { 824 switch (port->info->tty->ldisc.num) {
825 case N_IRDA: 825 case N_IRDA:
826 val = UART_GET_GCTL(&bfin_serial_ports[line]); 826 val = UART_GET_GCTL(&bfin_serial_ports[line]);
827 val |= (IREN | RPOLC); 827 val |= (IREN | RPOLC);
@@ -846,6 +846,7 @@ static struct uart_ops bfin_serial_pops = {
846 .startup = bfin_serial_startup, 846 .startup = bfin_serial_startup,
847 .shutdown = bfin_serial_shutdown, 847 .shutdown = bfin_serial_shutdown,
848 .set_termios = bfin_serial_set_termios, 848 .set_termios = bfin_serial_set_termios,
849 .set_ldisc = bfin_serial_set_ldisc,
849 .type = bfin_serial_type, 850 .type = bfin_serial_type,
850 .release_port = bfin_serial_release_port, 851 .release_port = bfin_serial_release_port,
851 .request_port = bfin_serial_request_port, 852 .request_port = bfin_serial_request_port,
@@ -1186,7 +1187,6 @@ static int __init bfin_serial_init(void)
1186 1187
1187 ret = uart_register_driver(&bfin_serial_reg); 1188 ret = uart_register_driver(&bfin_serial_reg);
1188 if (ret == 0) { 1189 if (ret == 0) {
1189 bfin_serial_reg.tty_driver->set_ldisc = bfin_set_ldisc;
1190 ret = platform_driver_register(&bfin_serial_driver); 1190 ret = platform_driver_register(&bfin_serial_driver);
1191 if (ret) { 1191 if (ret) {
1192 pr_debug("uart register failed\n"); 1192 pr_debug("uart register failed\n");