On Thu, Apr 21, 2011 at 02:27:53PM +0200, Antonio Ospite wrote:

> +#ifdef CONFIG_REGULATOR
> +     host->vcc = regulator_get(mmc_dev(host->mmc), "vmmc");
> +
> +     if (IS_ERR(host->vcc)) {
> +             host->vcc = NULL;
> +     } else {
> +             host->mmc->ocr_avail = mmc_regulator_get_ocrmask(host->vcc);
> +             if (host->pdata && host->pdata->ocr_mask)
> +                     dev_warn(mmc_dev(host->mmc),
> +                             "ocr_mask/setpower will not be used\n");
>       }
> +#endif

Why is this code conditional?  The regulator API will stub itself out
(by returning a null pointer, which plays well with your use of null) if
it's disabled.  I'm also not seeing any corresponding code to release
the regulator.

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
spi-devel-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/spi-devel-general

Reply via email to