The DM_REGULATOR symbol has SPL counterpart in:
drivers/power/regulator/Kconfig:config SPL_DM_REGULATOR
Use CONFIG_IS_ENABLED() macro to match on the correct
variant depending on the build stage.
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
struct usb251xb *hub = dev_get_priv(dev);
int err;
- if (IS_ENABLED(CONFIG_DM_REGULATOR) && hub->vdd) {
+ if (CONFIG_IS_ENABLED(DM_REGULATOR) && hub->vdd) {
err = regulator_set_enable(hub->vdd, true);
if (err)
return err;
return err;
}
- if (IS_ENABLED(CONFIG_DM_REGULATOR)) {
+ if (CONFIG_IS_ENABLED(DM_REGULATOR)) {
err = device_get_supply_regulator(dev, "vdd-supply",
&hub->vdd);
if (err && err != -ENOENT) {