Re: [PATCH] mmc: always save error codes in mmc_regulator_get_supply()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Wed, Jun 27 2012, Guennadi Liakhovetski wrote:
> If mmc_regulator_get_supply() fails to obtain any of the regulators, store
> the error codes in struct mmc_host to unify error reporting to the host
> driver.
>
> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@xxxxxx>
> ---
>
> Chris, if you don't mind rebasing your mmc-next branch, feel free to roll 
> this patch into the original "mmc: add a function to get regulators, 
> supplying card's power". Otherwise, committing it as an incremental patch 
> is also ok.
>
>  drivers/mmc/core/core.c |    5 ++---
>  1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
> index 385cadf..d0f17d8 100644
> --- a/drivers/mmc/core/core.c
> +++ b/drivers/mmc/core/core.c
> @@ -1020,13 +1020,12 @@ int mmc_regulator_get_supply(struct mmc_host *mmc)
>  	int ret;
>  
>  	supply = devm_regulator_get(dev, "vmmc");
> +	mmc->supply.vmmc = supply;
> +	mmc->supply.vqmmc = devm_regulator_get(dev, "vqmmc");
>  
>  	if (IS_ERR(supply))
>  		return PTR_ERR(supply);
>  
> -	mmc->supply.vmmc = supply;
> -	mmc->supply.vqmmc = devm_regulator_get(dev, "vqmmc");
> -
>  	ret = mmc_regulator_get_ocrmask(supply);
>  	if (ret > 0)
>  		mmc->ocr_avail = ret;

Thanks, I rebased it and pushed out to mmc-next.

- Chris.
-- 
Chris Ball   <cjb@xxxxxxxxxx>   <http://printf.net/>
One Laptop Per Child
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux