diff options
author | Balaji T K <balajitk@ti.com> | 2014-02-19 09:56:40 -0500 |
---|---|---|
committer | Chris Ball <chris@printf.net> | 2014-03-04 11:44:41 -0500 |
commit | f2ddc1dab61018becf4c5e275bb559d96eec8035 (patch) | |
tree | 22e83f4ea6f5ff2145b52fd92d4f591ee0d65db9 | |
parent | c9ae64db673d5b0bdd6494a59afcc5ed72669932 (diff) |
mmc: omap_hsmmc: use devm_regulator API
Use devm_regulator API, while at it use
devm_regulator_get_optional for optional vmmc_aux supply
Signed-off-by: Balaji T K <balajitk@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Tested-by: Florian Vaussard <florian.vaussard@epfl.ch>
Tested-by: Stefan Roese <sr@denx.de>
Signed-off-by: Chris Ball <chris@printf.net>
-rw-r--r-- | drivers/mmc/host/omap_hsmmc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 83240f05e917..36fb91eefd82 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c | |||
@@ -321,7 +321,7 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host) | |||
321 | struct regulator *reg; | 321 | struct regulator *reg; |
322 | int ocr_value = 0; | 322 | int ocr_value = 0; |
323 | 323 | ||
324 | reg = regulator_get(host->dev, "vmmc"); | 324 | reg = devm_regulator_get(host->dev, "vmmc"); |
325 | if (IS_ERR(reg)) { | 325 | if (IS_ERR(reg)) { |
326 | dev_err(host->dev, "vmmc regulator missing\n"); | 326 | dev_err(host->dev, "vmmc regulator missing\n"); |
327 | return PTR_ERR(reg); | 327 | return PTR_ERR(reg); |
@@ -341,7 +341,7 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host) | |||
341 | } | 341 | } |
342 | 342 | ||
343 | /* Allow an aux regulator */ | 343 | /* Allow an aux regulator */ |
344 | reg = regulator_get(host->dev, "vmmc_aux"); | 344 | reg = devm_regulator_get_optional(host->dev, "vmmc_aux"); |
345 | host->vcc_aux = IS_ERR(reg) ? NULL : reg; | 345 | host->vcc_aux = IS_ERR(reg) ? NULL : reg; |
346 | 346 | ||
347 | /* For eMMC do not power off when not in sleep state */ | 347 | /* For eMMC do not power off when not in sleep state */ |
@@ -371,8 +371,6 @@ static int omap_hsmmc_reg_get(struct omap_hsmmc_host *host) | |||
371 | 371 | ||
372 | static void omap_hsmmc_reg_put(struct omap_hsmmc_host *host) | 372 | static void omap_hsmmc_reg_put(struct omap_hsmmc_host *host) |
373 | { | 373 | { |
374 | regulator_put(host->vcc); | ||
375 | regulator_put(host->vcc_aux); | ||
376 | mmc_slot(host).set_power = NULL; | 374 | mmc_slot(host).set_power = NULL; |
377 | } | 375 | } |
378 | 376 | ||