Skip to contentSkip to conversation

regulator: Use device platform_data to retrieve db8500 platform bits

PATCH In review Samuel Ortiz 3 participants 3 messages May 26, 2011 – May 28, 2011 Voltage and current regulator framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 regulator: Use device platform_data to retrieve db8500 platform bits

With the addition of a platform device mfd_cell pointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for an mfd_cell->mfd_data removal and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers.

---
 drivers/regulator/db8500-prcmu.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/regulator/db8500-prcmu.c +2 -2
index 1089a96..e5f7b8f 100644
@@ -13,7 +13,6 @@
 #include <linux/err.h>
 #include <linux/spinlock.h>
 #include <linux/platform_device.h>
-#include <linux/mfd/core.h>
 #include <linux/mfd/db8500-prcmu.h>
 #include <linux/regulator/driver.h>
 #include <linux/regulator/machine.h>
@@ -471,7 +470,8 @@ static struct db8500_regulator_info
 
 static int __devinit db8500_regulator_probe(struct platform_device *pdev)
 {
-	struct regulator_init_data *db8500_init_data = mfd_get_data(pdev);
+	struct regulator_init_data *db8500_init_data =
+					dev_get_platdata(&pdev->dev);
 	int i, err;
 
 	/* register all regulators */
Signature · 5 lines
1.7.2.3

-- 
Intel Open Source Technology Centre
http://oss.intel.com/
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Samuel Ortiz

With the addition of a platform device mfd_cell pointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for an mfd_cell->mfd_data removal and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers.

Acked-by on v1 1/1
#2 lore raw
In reply to Samuel Ortiz
Quoted 7 lines · Samuel Ortiz

With the addition of a platform device mfd_cell pointer, MFD drivers can go back to passing platform data back to their sub drivers. This allows for an mfd_cell->mfd_data removal and thus keep the sub drivers MFD agnostic. This is mostly needed for non MFD aware sub drivers.

Please always CC maintainers on patches!