aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/mc13783-regulator.c
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@queued.net>2011-02-17 22:07:23 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2011-03-23 05:41:54 -0400
commit4ec1b54c4d082d4bad19b55ca709da7e7138d542 (patch)
treec17db1ae92212ed1269d66965a0eaba583f1cd21 /drivers/regulator/mc13783-regulator.c
parent8615e4cba1d3a0f15b9a4da9f32f8fbc3488fa54 (diff)
mfd: mfd_cell is now implicitly available to mc13xxx drivers
The cell's platform_data is now accessed with a helper function; change clients to use that, and remove the now-unused data_size. Note that mfd-core no longer makes a copy of platform_data, but the mc13xxx-core driver creates the pdata structures on the stack. In order to get around that, the various ARM mach types that set the pdata have been changed to hold the variable in static (global) memory. Also note that __initdata references in aforementioned pdata structs have been dropped. Signed-off-by: Andres Salomon <dilinger@queued.net> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/regulator/mc13783-regulator.c')
-rw-r--r--drivers/regulator/mc13783-regulator.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/regulator/mc13783-regulator.c b/drivers/regulator/mc13783-regulator.c
index 3e5d0c3b4e53..23249cb0a8bd 100644
--- a/drivers/regulator/mc13783-regulator.c
+++ b/drivers/regulator/mc13783-regulator.c
@@ -15,6 +15,7 @@
15#include <linux/regulator/driver.h> 15#include <linux/regulator/driver.h>
16#include <linux/platform_device.h> 16#include <linux/platform_device.h>
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/mfd/core.h>
18#include <linux/slab.h> 19#include <linux/slab.h>
19#include <linux/init.h> 20#include <linux/init.h>
20#include <linux/err.h> 21#include <linux/err.h>
@@ -336,8 +337,7 @@ static int __devinit mc13783_regulator_probe(struct platform_device *pdev)
336{ 337{
337 struct mc13xxx_regulator_priv *priv; 338 struct mc13xxx_regulator_priv *priv;
338 struct mc13xxx *mc13783 = dev_get_drvdata(pdev->dev.parent); 339 struct mc13xxx *mc13783 = dev_get_drvdata(pdev->dev.parent);
339 struct mc13783_regulator_platform_data *pdata = 340 struct mc13783_regulator_platform_data *pdata = mfd_get_data(pdev);
340 dev_get_platdata(&pdev->dev);
341 struct mc13783_regulator_init_data *init_data; 341 struct mc13783_regulator_init_data *init_data;
342 int i, ret; 342 int i, ret;
343 343
@@ -381,8 +381,7 @@ err:
381static int __devexit mc13783_regulator_remove(struct platform_device *pdev) 381static int __devexit mc13783_regulator_remove(struct platform_device *pdev)
382{ 382{
383 struct mc13xxx_regulator_priv *priv = platform_get_drvdata(pdev); 383 struct mc13xxx_regulator_priv *priv = platform_get_drvdata(pdev);
384 struct mc13783_regulator_platform_data *pdata = 384 struct mc13783_regulator_platform_data *pdata = mfd_get_data(pdev);
385 dev_get_platdata(&pdev->dev);
386 int i; 385 int i;
387 386
388 platform_set_drvdata(pdev, NULL); 387 platform_set_drvdata(pdev, NULL);