All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: "Raja, Govindraj" <govindraj.raja@ti.com>
Cc: linux-serial@vger.kernel.org, linux-omap@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Alan Cox <alan@linux.intel.com>
Subject: Re: [PATCH] tty: serial_core: Add mechanism to identify port closure.
Date: Mon, 23 Apr 2012 11:07:22 +0100	[thread overview]
Message-ID: <20120423110722.7d8dd2c0@pyramind.ukuu.org.uk> (raw)
In-Reply-To: <CAMrsUdLaamf9boyMF824iTXdDce0qB3AiUfMiM3a1gL2DcVPqA@mail.gmail.com>

> 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

      reply	other threads:[~2012-04-23 10:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-20 10:57 Govindraj.R
2012-04-20 13:27 ` Alan Cox
2012-04-23  8:55   ` Raja, Govindraj
2012-04-23 10:07     ` Alan Cox [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120423110722.7d8dd2c0@pyramind.ukuu.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=alan@linux.intel.com \
    --cc=govindraj.raja@ti.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --subject='Re: [PATCH] tty: serial_core: Add mechanism to identify port closure.' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.