Commit 3b8458a9 authored by Graf Yang's avatar Graf Yang Committed by Bryan Wu

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: default avatarGraf Yang <graf.yang@analog.com>
Signed-off-by: default avatarBryan Wu <cooloney@kernel.org>
parent 5bda2723
...@@ -813,15 +813,15 @@ bfin_serial_verify_port(struct uart_port *port, struct serial_struct *ser) ...@@ -813,15 +813,15 @@ bfin_serial_verify_port(struct uart_port *port, struct serial_struct *ser)
* Enable the IrDA function if tty->ldisc.num is N_IRDA. * Enable the IrDA function if tty->ldisc.num is N_IRDA.
* In other cases, disable IrDA function. * In other cases, disable IrDA function.
*/ */
static void bfin_set_ldisc(struct tty_struct *tty) static void bfin_serial_set_ldisc(struct uart_port *port)
{ {
int line = tty->index; int line = port->line;
unsigned short val; unsigned short val;
if (line >= tty->driver->num) if (line >= port->info->tty->driver->num)
return; return;
switch (tty->ldisc.num) { switch (port->info->tty->ldisc.num) {
case N_IRDA: case N_IRDA:
val = UART_GET_GCTL(&bfin_serial_ports[line]); val = UART_GET_GCTL(&bfin_serial_ports[line]);
val |= (IREN | RPOLC); val |= (IREN | RPOLC);
...@@ -846,6 +846,7 @@ static struct uart_ops bfin_serial_pops = { ...@@ -846,6 +846,7 @@ static struct uart_ops bfin_serial_pops = {
.startup = bfin_serial_startup, .startup = bfin_serial_startup,
.shutdown = bfin_serial_shutdown, .shutdown = bfin_serial_shutdown,
.set_termios = bfin_serial_set_termios, .set_termios = bfin_serial_set_termios,
.set_ldisc = bfin_serial_set_ldisc,
.type = bfin_serial_type, .type = bfin_serial_type,
.release_port = bfin_serial_release_port, .release_port = bfin_serial_release_port,
.request_port = bfin_serial_request_port, .request_port = bfin_serial_request_port,
...@@ -1186,7 +1187,6 @@ static int __init bfin_serial_init(void) ...@@ -1186,7 +1187,6 @@ static int __init bfin_serial_init(void)
ret = uart_register_driver(&bfin_serial_reg); ret = uart_register_driver(&bfin_serial_reg);
if (ret == 0) { if (ret == 0) {
bfin_serial_reg.tty_driver->set_ldisc = bfin_set_ldisc;
ret = platform_driver_register(&bfin_serial_driver); ret = platform_driver_register(&bfin_serial_driver);
if (ret) { if (ret) {
pr_debug("uart register failed\n"); pr_debug("uart register failed\n");
......
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