Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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;