mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Acked-by: Alan Cox <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
7e73eca6a7
commit
734cc17838
20 changed files with 58 additions and 40 deletions
|
|
@ -1132,8 +1132,8 @@ static int sdio_uart_probe(struct sdio_func *func,
|
|||
kfree(port);
|
||||
} else {
|
||||
struct device *dev;
|
||||
dev = tty_register_device(sdio_uart_tty_driver,
|
||||
port->index, &func->dev);
|
||||
dev = tty_port_register_device(&port->port,
|
||||
sdio_uart_tty_driver, port->index, &func->dev);
|
||||
if (IS_ERR(dev)) {
|
||||
sdio_uart_port_remove(port);
|
||||
ret = PTR_ERR(dev);
|
||||
|
|
|
|||
Loading…
Reference in a new issue