Message ID | 20190618153448.27145-3-ulf.hansson@linaro.org |
---|---|
State | New |
Headers | show |
Series | mmc: sdio: Various fixes/improvements for SDIO PM | expand |
Hi, On Tue, Jun 18, 2019 at 8:35 AM Ulf Hansson <ulf.hansson@linaro.org> wrote: > > The function mmc_sdio_power_restore() is called either from > mmc_sdio_runtime_resume() or from mmc_sdio_hw_reset(). Both callers either > claims/releases the host or require its callers to do so. Therefore let's > drop the redundant calls to mmc_claim|release_host() in > mmc_sdio_power_restore(). > > Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> > --- > drivers/mmc/core/sdio.c | 4 ---- > 1 file changed, 4 deletions(-) Without being an expert, I looked through the code and as far as I can tell this is fine. Specifically: * I agree there are two calls and mmc_sdio_runtime_resume() clearly claims. * The only call to mmc_sdio_hw_reset() looks to be mmc_hw_reset(); looking through calls to mmc_hw_reset() I see the claims. It's super obvious in the 3 cases in "drivers/net" and I decided that I didn't need to look at block.c because that shouldn't be a codepath that affects SDIO. Thus: Reviewed-by: Douglas Anderson <dianders@chromium.org> I also don't see this patch causing any problems on the rk3288-veyron boards I tested it on. Thus: Tested-by: Douglas Anderson <dianders@chromium.org>
diff --git a/drivers/mmc/core/sdio.c b/drivers/mmc/core/sdio.c index 712a7742765e..b3303b7d9956 100644 --- a/drivers/mmc/core/sdio.c +++ b/drivers/mmc/core/sdio.c @@ -1030,14 +1030,10 @@ static int mmc_sdio_power_restore(struct mmc_host *host) * */ - mmc_claim_host(host); - ret = mmc_sdio_reinit_card(host, mmc_card_keep_power(host)); if (!ret && host->sdio_irqs) mmc_signal_sdio_irq(host); - mmc_release_host(host); - return ret; }
The function mmc_sdio_power_restore() is called either from mmc_sdio_runtime_resume() or from mmc_sdio_hw_reset(). Both callers either claims/releases the host or require its callers to do so. Therefore let's drop the redundant calls to mmc_claim|release_host() in mmc_sdio_power_restore(). Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> --- drivers/mmc/core/sdio.c | 4 ---- 1 file changed, 4 deletions(-) -- 2.17.1