Commit 1c37f8a8 authored by Sascha Hauer's avatar Sascha Hauer Committed by Mark Brown

regulator fixed: Do not report enumaratable voltages if there are none

If used as a dummy voltage provider the fixed regulator should
not set n_voltages to make the core accept the device.
Signed-off-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent ab353c23
......@@ -192,6 +192,8 @@ static int __devinit reg_fixed_voltage_probe(struct platform_device *pdev)
drvdata->desc.type = REGULATOR_VOLTAGE;
drvdata->desc.owner = THIS_MODULE;
drvdata->desc.ops = &fixed_voltage_ops;
if (config->microvolts)
drvdata->desc.n_voltages = 1;
drvdata->microvolts = config->microvolts;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment