linux-mmc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mmc: core: Remove redundant runtime_idle callback
@ 2014-05-28  9:44 Ulf Hansson
  2014-05-28 11:56 ` Jaehoon Chung
  0 siblings, 1 reply; 2+ messages in thread
From: Ulf Hansson @ 2014-05-28  9:44 UTC (permalink / raw)
  To: linux-mmc, Chris Ball; +Cc: Ulf Hansson

The runtime PM core handles a runtime_idle callback set to NULL as one
returning 0. So, let's just set it to NULL instead.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 drivers/mmc/core/bus.c |   10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
index d2dbf02..8a1f124 100644
--- a/drivers/mmc/core/bus.c
+++ b/drivers/mmc/core/bus.c
@@ -180,7 +180,6 @@ static int mmc_bus_resume(struct device *dev)
 #endif
 
 #ifdef CONFIG_PM_RUNTIME
-
 static int mmc_runtime_suspend(struct device *dev)
 {
 	struct mmc_card *card = mmc_dev_to_card(dev);
@@ -196,17 +195,10 @@ static int mmc_runtime_resume(struct device *dev)
 
 	return host->bus_ops->runtime_resume(host);
 }
-
-static int mmc_runtime_idle(struct device *dev)
-{
-	return 0;
-}
-
 #endif /* !CONFIG_PM_RUNTIME */
 
 static const struct dev_pm_ops mmc_bus_pm_ops = {
-	SET_RUNTIME_PM_OPS(mmc_runtime_suspend, mmc_runtime_resume,
-			mmc_runtime_idle)
+	SET_RUNTIME_PM_OPS(mmc_runtime_suspend, mmc_runtime_resume, NULL)
 	SET_SYSTEM_SLEEP_PM_OPS(mmc_bus_suspend, mmc_bus_resume)
 };
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mmc: core: Remove redundant runtime_idle callback
  2014-05-28  9:44 [PATCH] mmc: core: Remove redundant runtime_idle callback Ulf Hansson
@ 2014-05-28 11:56 ` Jaehoon Chung
  0 siblings, 0 replies; 2+ messages in thread
From: Jaehoon Chung @ 2014-05-28 11:56 UTC (permalink / raw)
  To: Ulf Hansson, linux-mmc, Chris Ball

Looks good to me.

Acked-by: Jaehoon Chung <jh80.chung@samsung.com>

Best Regards,
Jaehoon Chung

On 05/28/2014 06:44 PM, Ulf Hansson wrote:
> The runtime PM core handles a runtime_idle callback set to NULL as one
> returning 0. So, let's just set it to NULL instead.
> 
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
>  drivers/mmc/core/bus.c |   10 +---------
>  1 file changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
> index d2dbf02..8a1f124 100644
> --- a/drivers/mmc/core/bus.c
> +++ b/drivers/mmc/core/bus.c
> @@ -180,7 +180,6 @@ static int mmc_bus_resume(struct device *dev)
>  #endif
>  
>  #ifdef CONFIG_PM_RUNTIME
> -
>  static int mmc_runtime_suspend(struct device *dev)
>  {
>  	struct mmc_card *card = mmc_dev_to_card(dev);
> @@ -196,17 +195,10 @@ static int mmc_runtime_resume(struct device *dev)
>  
>  	return host->bus_ops->runtime_resume(host);
>  }
> -
> -static int mmc_runtime_idle(struct device *dev)
> -{
> -	return 0;
> -}
> -
>  #endif /* !CONFIG_PM_RUNTIME */
>  
>  static const struct dev_pm_ops mmc_bus_pm_ops = {
> -	SET_RUNTIME_PM_OPS(mmc_runtime_suspend, mmc_runtime_resume,
> -			mmc_runtime_idle)
> +	SET_RUNTIME_PM_OPS(mmc_runtime_suspend, mmc_runtime_resume, NULL)
>  	SET_SYSTEM_SLEEP_PM_OPS(mmc_bus_suspend, mmc_bus_resume)
>  };
>  
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-28 11:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-28  9:44 [PATCH] mmc: core: Remove redundant runtime_idle callback Ulf Hansson
2014-05-28 11:56 ` Jaehoon Chung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).