aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2012-08-07 15:47:36 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-08-10 16:29:57 -0400
commitc565ee07708e19474cd1133bf50289a36b5bcc26 (patch)
tree8c41dd851e0e974f1a2948a7866e8f6d041cdc70
parent5bd420009716f3348610fdf9c6307f0db583ba04 (diff)
misc: pti, use tty_port_register_device
So now we have enough of tty_ports, so we can signal the TTY layer to use them by tty_port_register_device. The upside is that we look like we can introduce tty_port_easy_open and put it directly as tty_operations->open to drivers doing nothing in open and using tty_port_register_device. Because the easy open can obtain a tty_port rather easily from a tty now. Heh, what a nice by-product. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: J Freyensee <james_p_freyensee@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/misc/pti.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/misc/pti.c b/drivers/misc/pti.c
index fe76f9dca1de..4999b34b7a60 100644
--- a/drivers/misc/pti.c
+++ b/drivers/misc/pti.c
@@ -427,7 +427,7 @@ static int pti_tty_driver_open(struct tty_struct *tty, struct file *filp)
427 * also removes a locking requirement for the actual write 427 * also removes a locking requirement for the actual write
428 * procedure. 428 * procedure.
429 */ 429 */
430 return tty_port_open(&drv_data->port[tty->index], tty, filp); 430 return tty_port_open(tty->port, tty, filp);
431} 431}
432 432
433/** 433/**
@@ -443,7 +443,7 @@ static int pti_tty_driver_open(struct tty_struct *tty, struct file *filp)
443 */ 443 */
444static void pti_tty_driver_close(struct tty_struct *tty, struct file *filp) 444static void pti_tty_driver_close(struct tty_struct *tty, struct file *filp)
445{ 445{
446 tty_port_close(&drv_data->port[tty->index], tty, filp); 446 tty_port_close(tty->port, tty, filp);
447} 447}
448 448
449/** 449/**
@@ -856,7 +856,7 @@ static int __devinit pti_pci_probe(struct pci_dev *pdev,
856 tty_port_init(port); 856 tty_port_init(port);
857 port->ops = &tty_port_ops; 857 port->ops = &tty_port_ops;
858 858
859 tty_register_device(pti_tty_driver, a, &pdev->dev); 859 tty_port_register_device(port, pti_tty_driver, a, &pdev->dev);
860 } 860 }
861 861
862 register_console(&pti_console); 862 register_console(&pti_console);