Re: [PATCH] tty: serial_core: Add mechanism to identify port closure. |
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
> diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
> index 9c4c05b..c176ff2 100644
> --- a/drivers/tty/serial/serial_core.c
> +++ b/drivers/tty/serial/serial_core.c
> @@ -1426,6 +1426,9 @@ static void uart_port_shutdown(struct tty_port *port)
> */
> uport->ops->shutdown(uport);
>
> + if (uport->ops->set_wake)
> + uport->ops->set_wake(uport, false);
> +
> /*
> * Ensure that the IRQ handler isn't running on another CPU.
> */
> @@ -1512,6 +1515,9 @@ static int uart_open(struct tty_struct *tty,
> struct file *filp)
> goto err_dec_count;
> }
>
> + if (uport->ops->set_wake)
> + uport->ops->set_wake(uport, true);
> +
> /*
> * Make sure the device is in D0 state.
> */
This is probably the right approach for now. In the ideal world we should
probably use the struct device * and device power management but that is
a big upheaval and would mean fixing lots of other stuff first.
So this looks good to me - providing it doesn't break anything else.
Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux Arm (vger)]
[ARM Kernel]
[ARM MSM]
[Linux Tegra]
[Maemo Users]
[Linux USB Devel]
[Video for Linux]
[Linux Audio Users]
[Photo]
[Yosemite News]
[Yosemite Photos]
[Free Online Dating]
[Linux Kernel]
[Linux SCSI]
[XFree86]