提交 1c37f8a8 编写于 作者: S Sascha Hauer 提交者: 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: NSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 ab353c23
......@@ -192,7 +192,9 @@ 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;
drvdata->desc.n_voltages = 1;
if (config->microvolts)
drvdata->desc.n_voltages = 1;
drvdata->microvolts = config->microvolts;
drvdata->gpio = config->gpio;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册