summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2017-11-21 15:42:29 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-05 11:24:33 +0100
commit0bf4d0517667877c2b0955586070fd7198943896 (patch)
treee7998a73f8b0e2a734a7d7f492e3b0b88c5f4158 /drivers/mmc
parent9aad75786e3d986499934fdaec7f911949a2f3e3 (diff)
downloadlinux-rt-0bf4d0517667877c2b0955586070fd7198943896.tar.gz
mmc: core: Do not leave the block driver in a suspended state
commit ebe7dd45cf49e3b49cacbaace17f9f878f21fbea upstream. The block driver must be resumed if the mmc bus fails to suspend the card. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/bus.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c
index c64266f5a399..60ebe5b4500b 100644
--- a/drivers/mmc/core/bus.c
+++ b/drivers/mmc/core/bus.c
@@ -155,6 +155,9 @@ static int mmc_bus_suspend(struct device *dev)
return ret;
ret = host->bus_ops->suspend(host);
+ if (ret)
+ pm_generic_resume(dev);
+
return ret;
}