diff options
author | Jiri Slaby <jslaby@suse.cz> | 2012-08-07 15:47:51 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-13 19:50:19 -0400 |
commit | b19e2ca77ee4becadc85341bb0c1cee454dd4fd5 (patch) | |
tree | 783ee3b9e363cf1848ad373cbb558f1c5994df08 /arch | |
parent | 2cb4ca0208722836e921d5ba780b09f29d4026b8 (diff) |
TTY: use tty_port_link_device
So now for those drivers that can use neither tty_port_install nor
tty_port_register_driver but still have tty_port available before
tty_register_driver we use newly added tty_port_link_device.
The rest of the drivers that still do not provide tty_struct <->
tty_port link will have to be converted to implement
tty->ops->install.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/alpha/kernel/srmcons.c | 1 | ||||
-rw-r--r-- | arch/ia64/hp/sim/simserial.c | 1 | ||||
-rw-r--r-- | arch/parisc/kernel/pdc_cons.c | 1 | ||||
-rw-r--r-- | arch/xtensa/platforms/iss/console.c | 1 |
4 files changed, 4 insertions, 0 deletions
diff --git a/arch/alpha/kernel/srmcons.c b/arch/alpha/kernel/srmcons.c index 3ea809430eda..5d5865204a1d 100644 --- a/arch/alpha/kernel/srmcons.c +++ b/arch/alpha/kernel/srmcons.c | |||
@@ -223,6 +223,7 @@ srmcons_init(void) | |||
223 | driver->subtype = SYSTEM_TYPE_SYSCONS; | 223 | driver->subtype = SYSTEM_TYPE_SYSCONS; |
224 | driver->init_termios = tty_std_termios; | 224 | driver->init_termios = tty_std_termios; |
225 | tty_set_operations(driver, &srmcons_ops); | 225 | tty_set_operations(driver, &srmcons_ops); |
226 | tty_port_link_device(&srmcons_singleton.port, driver, 0); | ||
226 | err = tty_register_driver(driver); | 227 | err = tty_register_driver(driver); |
227 | if (err) { | 228 | if (err) { |
228 | put_tty_driver(driver); | 229 | put_tty_driver(driver); |
diff --git a/arch/ia64/hp/sim/simserial.c b/arch/ia64/hp/sim/simserial.c index 1ce97f497d23..ec536e4e36c9 100644 --- a/arch/ia64/hp/sim/simserial.c +++ b/arch/ia64/hp/sim/simserial.c | |||
@@ -545,6 +545,7 @@ static int __init simrs_init(void) | |||
545 | /* the port is imaginary */ | 545 | /* the port is imaginary */ |
546 | printk(KERN_INFO "ttyS0 at 0x03f8 (irq = %d) is a 16550\n", state->irq); | 546 | printk(KERN_INFO "ttyS0 at 0x03f8 (irq = %d) is a 16550\n", state->irq); |
547 | 547 | ||
548 | tty_port_link_device(&state->port, hp_simserial_driver, 0); | ||
548 | retval = tty_register_driver(hp_simserial_driver); | 549 | retval = tty_register_driver(hp_simserial_driver); |
549 | if (retval) { | 550 | if (retval) { |
550 | printk(KERN_ERR "Couldn't register simserial driver\n"); | 551 | printk(KERN_ERR "Couldn't register simserial driver\n"); |
diff --git a/arch/parisc/kernel/pdc_cons.c b/arch/parisc/kernel/pdc_cons.c index 47341aa208f2..88238638aee6 100644 --- a/arch/parisc/kernel/pdc_cons.c +++ b/arch/parisc/kernel/pdc_cons.c | |||
@@ -202,6 +202,7 @@ static int __init pdc_console_tty_driver_init(void) | |||
202 | pdc_console_tty_driver->flags = TTY_DRIVER_REAL_RAW | | 202 | pdc_console_tty_driver->flags = TTY_DRIVER_REAL_RAW | |
203 | TTY_DRIVER_RESET_TERMIOS; | 203 | TTY_DRIVER_RESET_TERMIOS; |
204 | tty_set_operations(pdc_console_tty_driver, &pdc_console_tty_ops); | 204 | tty_set_operations(pdc_console_tty_driver, &pdc_console_tty_ops); |
205 | tty_port_link_device(&tty_port, pdc_console_tty_driver, 0); | ||
205 | 206 | ||
206 | err = tty_register_driver(pdc_console_tty_driver); | 207 | err = tty_register_driver(pdc_console_tty_driver); |
207 | if (err) { | 208 | if (err) { |
diff --git a/arch/xtensa/platforms/iss/console.c b/arch/xtensa/platforms/iss/console.c index f9726f6afdf1..2cd3d3a3400b 100644 --- a/arch/xtensa/platforms/iss/console.c +++ b/arch/xtensa/platforms/iss/console.c | |||
@@ -223,6 +223,7 @@ int __init rs_init(void) | |||
223 | serial_driver->flags = TTY_DRIVER_REAL_RAW; | 223 | serial_driver->flags = TTY_DRIVER_REAL_RAW; |
224 | 224 | ||
225 | tty_set_operations(serial_driver, &serial_ops); | 225 | tty_set_operations(serial_driver, &serial_ops); |
226 | tty_port_link_device(&serial_port, serial_driver, 0); | ||
226 | 227 | ||
227 | if (tty_register_driver(serial_driver)) | 228 | if (tty_register_driver(serial_driver)) |
228 | panic("Couldn't register serial driver\n"); | 229 | panic("Couldn't register serial driver\n"); |