Commit a771e36e authored by Samuel Ortiz's avatar Samuel Ortiz

mfd: Use mfd cell platform_data for ab3100 cells 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.
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent 1f235a37
...@@ -949,8 +949,10 @@ static int __devinit ab3100_probe(struct i2c_client *client, ...@@ -949,8 +949,10 @@ static int __devinit ab3100_probe(struct i2c_client *client,
goto exit_no_ops; goto exit_no_ops;
/* Set up and register the platform devices. */ /* Set up and register the platform devices. */
for (i = 0; i < ARRAY_SIZE(ab3100_devs); i++) for (i = 0; i < ARRAY_SIZE(ab3100_devs); i++) {
ab3100_devs[i].mfd_data = ab3100_plf_data; ab3100_devs[i].platform_data = ab3100_plf_data;
ab3100_devs[i].pdata_size = sizeof(struct ab3100_platform_data);
}
err = mfd_add_devices(&client->dev, 0, ab3100_devs, err = mfd_add_devices(&client->dev, 0, ab3100_devs,
ARRAY_SIZE(ab3100_devs), NULL, 0); ARRAY_SIZE(ab3100_devs), NULL, 0);
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/regulator/driver.h> #include <linux/regulator/driver.h>
#include <linux/mfd/abx500.h> #include <linux/mfd/abx500.h>
#include <linux/mfd/core.h>
/* LDO registers and some handy masking definitions for AB3100 */ /* LDO registers and some handy masking definitions for AB3100 */
#define AB3100_LDO_A 0x40 #define AB3100_LDO_A 0x40
...@@ -582,7 +581,7 @@ ab3100_regulator_desc[AB3100_NUM_REGULATORS] = { ...@@ -582,7 +581,7 @@ ab3100_regulator_desc[AB3100_NUM_REGULATORS] = {
static int __devinit ab3100_regulators_probe(struct platform_device *pdev) static int __devinit ab3100_regulators_probe(struct platform_device *pdev)
{ {
struct ab3100_platform_data *plfdata = mfd_get_data(pdev); struct ab3100_platform_data *plfdata = pdev->dev.platform_data;
int err = 0; int err = 0;
u8 data; u8 data;
int i; int i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment