diff mbox

PM / Runtime: Improve prepare handling at system suspend for genpd

Message ID 1365759704-23722-1-git-send-email-ulf.hansson@stericsson.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Ulf Hansson April 12, 2013, 9:41 a.m. UTC
From: Ulf Hansson <ulf.hansson@linaro.org>

When genpd prepares for a system suspend it will fetch a runtime
reference for the device. When returning it we now use the
asyncronous runtime PM API. Thus we don't have to wait for the
device to become idle|suspended before we move on and handle the
next device in queue.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Kevin Hilman <khilman@linaro.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
---
 drivers/base/power/domain.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Rafael Wysocki April 12, 2013, 11:50 a.m. UTC | #1
On Friday, April 12, 2013 11:41:44 AM Ulf Hansson wrote:
> From: Ulf Hansson <ulf.hansson@linaro.org>
> 
> When genpd prepares for a system suspend it will fetch a runtime
> reference for the device. When returning it we now use the
> asyncronous runtime PM API. Thus we don't have to wait for the
> device to become idle|suspended before we move on and handle the
> next device in queue.
> 
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> Cc: Kevin Hilman <khilman@linaro.org>
> Cc: Alan Stern <stern@rowland.harvard.edu>

All three patches applied to linux-pm.git/linux-next.

Thanks,
Rafael


> ---
>  drivers/base/power/domain.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
> index 9a6b05a..e6ec4a7 100644
> --- a/drivers/base/power/domain.c
> +++ b/drivers/base/power/domain.c
> @@ -920,7 +920,7 @@ static int pm_genpd_prepare(struct device *dev)
>  		pm_wakeup_event(dev, 0);
>  
>  	if (pm_wakeup_pending()) {
> -		pm_runtime_put_sync(dev);
> +		pm_runtime_put(dev);
>  		return -EBUSY;
>  	}
>  
> @@ -961,7 +961,7 @@ static int pm_genpd_prepare(struct device *dev)
>  		pm_runtime_enable(dev);
>  	}
>  
> -	pm_runtime_put_sync(dev);
> +	pm_runtime_put(dev);
>  	return ret;
>  }
>  
>
Kevin Hilman April 15, 2013, 10:44 p.m. UTC | #2
"Rafael J. Wysocki" <rjw@sisk.pl> writes:

> On Friday, April 12, 2013 11:41:44 AM Ulf Hansson wrote:
>> From: Ulf Hansson <ulf.hansson@linaro.org>
>> 
>> When genpd prepares for a system suspend it will fetch a runtime
>> reference for the device. When returning it we now use the
>> asyncronous runtime PM API. Thus we don't have to wait for the
>> device to become idle|suspended before we move on and handle the
>> next device in queue.
>> 
>> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
>> Cc: Kevin Hilman <khilman@linaro.org>
>> Cc: Alan Stern <stern@rowland.harvard.edu>
>
> All three patches applied to linux-pm.git/linux-next.

In case it matters, for all three:

Reviewed-by: Kevin Hilman <khilman@linaro.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 9a6b05a..e6ec4a7 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -920,7 +920,7 @@  static int pm_genpd_prepare(struct device *dev)
 		pm_wakeup_event(dev, 0);
 
 	if (pm_wakeup_pending()) {
-		pm_runtime_put_sync(dev);
+		pm_runtime_put(dev);
 		return -EBUSY;
 	}
 
@@ -961,7 +961,7 @@  static int pm_genpd_prepare(struct device *dev)
 		pm_runtime_enable(dev);
 	}
 
-	pm_runtime_put_sync(dev);
+	pm_runtime_put(dev);
 	return ret;
 }