[1/2] mmc: tmio: undo PM autosuspend when removing the host
diff mbox series

Message ID 20190109223452.11184-2-niklas.soderlund+renesas@ragnatech.se
State New
Headers show
Series
  • mmc: tmio: improve how runtime PM is enabled
Related show

Commit Message

Niklas Söderlund Jan. 9, 2019, 10:34 p.m. UTC
When removing the driver make sure to undo the PM autosuspend configured
when probing the host.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
 drivers/mmc/host/tmio_mmc_core.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Wolfram Sang Jan. 10, 2019, 10:36 a.m. UTC | #1
On Wed, Jan 09, 2019 at 11:34:51PM +0100, Niklas Söderlund wrote:
> When removing the driver make sure to undo the PM autosuspend configured
> when probing the host.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

Right. Not very well known. Quite some drivers will need that fixed.

Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Ulf Hansson Jan. 14, 2019, 11:45 a.m. UTC | #2
On Wed, 9 Jan 2019 at 23:36, Niklas Söderlund
<niklas.soderlund+renesas@ragnatech.se> wrote:
>
> When removing the driver make sure to undo the PM autosuspend configured
> when probing the host.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

Applied for next, thanks!

Kind regards
Uffe


> ---
>  drivers/mmc/host/tmio_mmc_core.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c
> index 085a0fab769c02a6..7323a5935fff786f 100644
> --- a/drivers/mmc/host/tmio_mmc_core.c
> +++ b/drivers/mmc/host/tmio_mmc_core.c
> @@ -1287,6 +1287,7 @@ void tmio_mmc_host_remove(struct tmio_mmc_host *host)
>         cancel_delayed_work_sync(&host->delayed_reset_work);
>         tmio_mmc_release_dma(host);
>
> +       pm_runtime_dont_use_autosuspend(&pdev->dev);
>         pm_runtime_put_sync(&pdev->dev);
>         pm_runtime_disable(&pdev->dev);
>  }
> --
> 2.20.1
>

Patch
diff mbox series

diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c
index 085a0fab769c02a6..7323a5935fff786f 100644
--- a/drivers/mmc/host/tmio_mmc_core.c
+++ b/drivers/mmc/host/tmio_mmc_core.c
@@ -1287,6 +1287,7 @@  void tmio_mmc_host_remove(struct tmio_mmc_host *host)
 	cancel_delayed_work_sync(&host->delayed_reset_work);
 	tmio_mmc_release_dma(host);
 
+	pm_runtime_dont_use_autosuspend(&pdev->dev);
 	pm_runtime_put_sync(&pdev->dev);
 	pm_runtime_disable(&pdev->dev);
 }