Commit c565ee07 authored by Jiri Slaby's avatar Jiri Slaby Committed by Greg Kroah-Hartman

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: default avatarJiri Slaby <jslaby@suse.cz>
Cc: J Freyensee <james_p_freyensee@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5bd42000
...@@ -427,7 +427,7 @@ static int pti_tty_driver_open(struct tty_struct *tty, struct file *filp) ...@@ -427,7 +427,7 @@ static int pti_tty_driver_open(struct tty_struct *tty, struct file *filp)
* also removes a locking requirement for the actual write * also removes a locking requirement for the actual write
* procedure. * procedure.
*/ */
return tty_port_open(&drv_data->port[tty->index], tty, filp); return tty_port_open(tty->port, tty, filp);
} }
/** /**
...@@ -443,7 +443,7 @@ static int pti_tty_driver_open(struct tty_struct *tty, struct file *filp) ...@@ -443,7 +443,7 @@ static int pti_tty_driver_open(struct tty_struct *tty, struct file *filp)
*/ */
static void pti_tty_driver_close(struct tty_struct *tty, struct file *filp) static void pti_tty_driver_close(struct tty_struct *tty, struct file *filp)
{ {
tty_port_close(&drv_data->port[tty->index], tty, filp); tty_port_close(tty->port, tty, filp);
} }
/** /**
...@@ -856,7 +856,7 @@ static int __devinit pti_pci_probe(struct pci_dev *pdev, ...@@ -856,7 +856,7 @@ static int __devinit pti_pci_probe(struct pci_dev *pdev,
tty_port_init(port); tty_port_init(port);
port->ops = &tty_port_ops; port->ops = &tty_port_ops;
tty_register_device(pti_tty_driver, a, &pdev->dev); tty_port_register_device(port, pti_tty_driver, a, &pdev->dev);
} }
register_console(&pti_console); register_console(&pti_console);
......
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