Re: [PATCH 2/7] UART: OMAP: Cut the clock in the error cases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Shubhrajyoti Datta <omaplinuxkernel@xxxxxxxxx> writes:

> On Wed, Apr 18, 2012 at 8:43 PM, Shubhrajyoti <shubhrajyoti@xxxxxx> wrote:
>>>
>>> Kevin
>> Yes agree completely. Will describe that in the changelog.
>> --
> Does the following changelog look ok?

A little better, but still doesn't explain things so that someone who is
not intimately familar with the driver can understand the auto-suspend
version is needed in the one case.

Possibly explaining in more detail what would happen if the normal put
is used here instead of the autosuspend version might help.

Kevin

> From 37fdc2d40c9b2b19b8c5a9a4b8f7dd547d420f55 Mon Sep 17 00:00:00 2001
> From: Shubhrajyoti D <shubhrajyoti@xxxxxx>
> Date: Wed, 4 Apr 2012 16:32:37 +0530
> Subject: [PATCH] UART: OMAP: call pm_runtime_put/autosuspend in the error cases
>
> In the error cases the runtime_put call is missed. This patch intends to fix the
> same. In case dma request fails, we fall back to the nondma mode so after
> enabling the threshold call put_autosuspend.
>
> Cc: Govindraj.R <govindraj.raja@xxxxxx>
> Signed-off-by: Shubhrajyoti D <shubhrajyoti@xxxxxx>
> ---
>  drivers/tty/serial/omap-serial.c |    6 +++++-
>  1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
> index fe099bb..10e80bb 100644
> --- a/drivers/tty/serial/omap-serial.c
> +++ b/drivers/tty/serial/omap-serial.c
> @@ -319,6 +319,8 @@ static void serial_omap_start_tx(struct uart_port *port)
>
>  		if (ret < 0) {
>  			serial_omap_enable_ier_thri(up);
> +			pm_runtime_mark_last_busy(&up->pdev->dev);
> +			pm_runtime_put_autosuspend(&up->pdev->dev);
>  			return;
>  		}
>  	}
> @@ -1029,8 +1031,10 @@ static int serial_omap_poll_get_char(struct
> uart_port *port)
>
>  	pm_runtime_get_sync(&up->pdev->dev);
>  	status = serial_in(up, UART_LSR);
> -	if (!(status & UART_LSR_DR))
> +	if (!(status & UART_LSR_DR)) {
> +		pm_runtime_put(&up->pdev->dev);
>  		return NO_POLL_CHAR;
> +	}
>
>  	status = serial_in(up, UART_RX);
>  	pm_runtime_put(&up->pdev->dev);
--
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


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux