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-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux