summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2012-08-07 21:47:47 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-08-13 16:50:19 -0700
commit734cc1783816ae358cef45673a29bf7af974e147 (patch)
tree146fde2a1add56ff7a35915d0fd1db7e01ce6630 /drivers/staging
parent7e73eca6a7b2967423902a4543821bb97cbbe698 (diff)
downloadlinux-734cc1783816ae358cef45673a29bf7af974e147.tar.bz2
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/ipack/devices/ipoctal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/ipack/devices/ipoctal.c b/drivers/staging/ipack/devices/ipoctal.c
index 394f5deca34e..a68d981c259f 100644
--- a/drivers/staging/ipack/devices/ipoctal.c
+++ b/drivers/staging/ipack/devices/ipoctal.c
@@ -502,7 +502,7 @@ static int ipoctal_inst_slot(struct ipoctal *ipoctal, unsigned int bus_nr,
ipoctal->pointer_read[i] = 0;
ipoctal->pointer_write[i] = 0;
ipoctal->nb_bytes[i] = 0;
- tty_register_device(tty, i, NULL);
+ tty_port_register_device(&ipoctal->tty_port[i], tty, i, NULL);
/*
* Enable again the RX. TX will be enabled when