All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mmc: sdhci-omap: Use pm_runtime_resume_and_get() to replace open coding
@ 2021-05-21  1:02 Tian Tao
  2021-05-24 14:10 ` Ulf Hansson
  0 siblings, 1 reply; 2+ messages in thread
From: Tian Tao @ 2021-05-21  1:02 UTC (permalink / raw)
  To: kishon, adrian.hunter, ulf.hansson; +Cc: linux-mmc, Tian Tao

use pm_runtime_resume_and_get() to replace pm_runtime_get_sync and
pm_runtime_put_noidle. this change is just to simplify the code, no
actual functional changes.

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
 drivers/mmc/host/sdhci-omap.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c
index 7893fd3..8f4d1f0 100644
--- a/drivers/mmc/host/sdhci-omap.c
+++ b/drivers/mmc/host/sdhci-omap.c
@@ -1173,10 +1173,9 @@ static int sdhci_omap_probe(struct platform_device *pdev)
 	 * as part of pm_runtime_get_sync.
 	 */
 	pm_runtime_enable(dev);
-	ret = pm_runtime_get_sync(dev);
-	if (ret < 0) {
+	ret = pm_runtime_resume_and_get(dev);
+	if (ret) {
 		dev_err(dev, "pm_runtime_get_sync failed\n");
-		pm_runtime_put_noidle(dev);
 		goto err_rpm_disable;
 	}
 
-- 
2.7.4


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

* Re: [PATCH] mmc: sdhci-omap: Use pm_runtime_resume_and_get() to replace open coding
  2021-05-21  1:02 [PATCH] mmc: sdhci-omap: Use pm_runtime_resume_and_get() to replace open coding Tian Tao
@ 2021-05-24 14:10 ` Ulf Hansson
  0 siblings, 0 replies; 2+ messages in thread
From: Ulf Hansson @ 2021-05-24 14:10 UTC (permalink / raw)
  To: Tian Tao; +Cc: Kishon, Adrian Hunter, linux-mmc

On Fri, 21 May 2021 at 03:02, Tian Tao <tiantao6@hisilicon.com> wrote:
>
> use pm_runtime_resume_and_get() to replace pm_runtime_get_sync and
> pm_runtime_put_noidle. this change is just to simplify the code, no
> actual functional changes.
>
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/sdhci-omap.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c
> index 7893fd3..8f4d1f0 100644
> --- a/drivers/mmc/host/sdhci-omap.c
> +++ b/drivers/mmc/host/sdhci-omap.c
> @@ -1173,10 +1173,9 @@ static int sdhci_omap_probe(struct platform_device *pdev)
>          * as part of pm_runtime_get_sync.
>          */
>         pm_runtime_enable(dev);
> -       ret = pm_runtime_get_sync(dev);
> -       if (ret < 0) {
> +       ret = pm_runtime_resume_and_get(dev);
> +       if (ret) {
>                 dev_err(dev, "pm_runtime_get_sync failed\n");
> -               pm_runtime_put_noidle(dev);
>                 goto err_rpm_disable;
>         }
>
> --
> 2.7.4
>

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

end of thread, other threads:[~2021-05-24 14:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-21  1:02 [PATCH] mmc: sdhci-omap: Use pm_runtime_resume_and_get() to replace open coding Tian Tao
2021-05-24 14:10 ` Ulf Hansson

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.