On Thu, May 07, 2009 at 04:13:53AM -0300, Daniel Ribeiro wrote: > +#else > +static int pxamci_regulator_get(struct pxamci_host *host) > +{ > + return 0; > +} > +static void pxamci_regulator_put(struct pxamci_host *host) {}
regulator_get() and regulator_put() compile out if regulator is not defined, though you will get a dummy regulator back. > - mmc->ocr_avail = host->pdata ? > + if (pxamci_regulator_get(&pdev->dev, host) == 0) > + mmc->ocr_avail = pxamci_regulator_get_ocrmask(host); > + else > + mmc->ocr_avail = host->pdata ? > host->pdata->ocr_mask : > MMC_VDD_32_33|MMC_VDD_33_34; > mmc->caps = 0; Are you sure this does the right thing if regulator API is compiled out? The dummy get() will succeed, meaning that we never take the platform data case which is probably not what you want. What should happen if the system both supplies platform data and a regulator?