TTY: use tty_port_register_device
authorJiri Slaby <jslaby@suse.cz>
Tue, 7 Aug 2012 19:47:47 +0000 (21:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Aug 2012 23:50:19 +0000 (16:50 -0700)
commit734cc1783816ae358cef45673a29bf7af974e147
tree146fde2a1add56ff7a35915d0fd1db7e01ce6630
parent7e73eca6a7b2967423902a4543821bb97cbbe698
TTY: use tty_port_register_device

Currently we have no way to assign tty->port while performing tty
installation. There are two ways to provide the link tty_struct =>
tty_port. Either by calling tty_port_install from tty->ops->install or
tty_port_register_device called instead of tty_register_device when
the device is being set up after connected.

In this patch we modify most of the drivers to do the latter. When the
drivers use tty_register_device and we have tty_port already, we
switch to tty_port_register_device. So we have the tty_struct =>
tty_port link for free for those.

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>
20 files changed:
arch/um/drivers/line.c
drivers/isdn/capi/capi.c
drivers/isdn/gigaset/interface.c
drivers/mmc/card/sdio_uart.c
drivers/net/usb/hso.c
drivers/staging/ipack/devices/ipoctal.c
drivers/tty/cyclades.c
drivers/tty/ehv_bytechan.c
drivers/tty/ipwireless/tty.c
drivers/tty/isicom.c
drivers/tty/mxser.c
drivers/tty/nozomi.c
drivers/tty/rocket.c
drivers/tty/serial/ifx6x60.c
drivers/tty/serial/msm_smd_tty.c
drivers/tty/serial/serial_core.c
drivers/tty/synclink_gt.c
drivers/usb/class/cdc-acm.c
drivers/usb/gadget/u_serial.c
net/bluetooth/rfcomm/tty.c