[PATCH 2/2] regulator: twl: use platform data in the DT based boot also

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This allows to pass platform information during a DT boot also, currently
this is completely ignored. Needed for supporting the platform specific
regulator set_voltage / get_voltage ops for the SMPS regulators.

Signed-off-by: Tero Kristo <t-kristo@xxxxxx>
To: Liam Girdwood <lgirdwood@xxxxxxxxx>
To: Mark Brown <broonie@xxxxxxxxxx>
---
 drivers/regulator/twl-regulator.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/twl-regulator.c b/drivers/regulator/twl-regulator.c
index 0b4f866..2c4fa06 100644
--- a/drivers/regulator/twl-regulator.c
+++ b/drivers/regulator/twl-regulator.c
@@ -1103,9 +1103,9 @@ static int twlreg_probe(struct platform_device *pdev)
 	if (match) {
 		template = match->data;
 		id = template->desc.id;
+		drvdata = dev_get_platdata(&pdev->dev);
 		initdata = of_get_regulator_init_data(&pdev->dev,
 						      pdev->dev.of_node);
-		drvdata = NULL;
 	} else {
 		id = pdev->id;
 		initdata = dev_get_platdata(&pdev->dev);
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux