When DM_REGULATOR=n is used the device_get_supply_regulator() function
always return -ENOSYS.
Change to treat missing support for regulators as a missing optional
vdd/vss-supply regulator to reduce error messages being logged.
Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
if (!ret)
return adc_vdd_plat_update(dev);
- if (ret != -ENOENT)
+ if (ret != -ENOSYS && ret != -ENOENT)
return ret;
/* No vdd-supply phandle. */
if (!ret)
return adc_vss_plat_update(dev);
- if (ret != -ENOENT)
+ if (ret != -ENOSYS && ret != -ENOENT)
return ret;
/* No vss-supply phandle. */