aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/dw_mmc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host/dw_mmc.c')
-rw-r--r--drivers/mmc/host/dw_mmc.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index c6caedc2e847..a63766a0bfcd 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -1997,8 +1997,14 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
1997 if (IS_ERR(host->vmmc)) { 1997 if (IS_ERR(host->vmmc)) {
1998 pr_info("%s: no vmmc regulator found\n", mmc_hostname(mmc)); 1998 pr_info("%s: no vmmc regulator found\n", mmc_hostname(mmc));
1999 host->vmmc = NULL; 1999 host->vmmc = NULL;
2000 } else 2000 } else {
2001 regulator_enable(host->vmmc); 2001 ret = regulator_enable(host->vmmc);
2002 if (ret) {
2003 dev_err(host->dev,
2004 "failed to enable regulator: %d\n", ret);
2005 goto err_setup_bus;
2006 }
2007 }
2002 2008
2003 if (dw_mci_get_cd(mmc)) 2009 if (dw_mci_get_cd(mmc))
2004 set_bit(DW_MMC_CARD_PRESENT, &slot->flags); 2010 set_bit(DW_MMC_CARD_PRESENT, &slot->flags);
@@ -2464,8 +2470,14 @@ int dw_mci_resume(struct dw_mci *host)
2464{ 2470{
2465 int i, ret; 2471 int i, ret;
2466 2472
2467 if (host->vmmc) 2473 if (host->vmmc) {
2468 regulator_enable(host->vmmc); 2474 ret = regulator_enable(host->vmmc);
2475 if (ret) {
2476 dev_err(host->dev,
2477 "failed to enable regulator: %d\n", ret);
2478 return ret;
2479 }
2480 }
2469 2481
2470 if (!mci_wait_reset(host->dev, host)) { 2482 if (!mci_wait_reset(host->dev, host)) {
2471 ret = -ENODEV; 2483 ret = -ENODEV;