Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>

+5 -4
+4 -2
drivers/mfd/ab3100-core.c
··· 949 949 goto exit_no_ops; 950 950 951 951 /* Set up and register the platform devices. */ 952 - for (i = 0; i < ARRAY_SIZE(ab3100_devs); i++) 953 - ab3100_devs[i].mfd_data = ab3100_plf_data; 952 + for (i = 0; i < ARRAY_SIZE(ab3100_devs); i++) { 953 + ab3100_devs[i].platform_data = ab3100_plf_data; 954 + ab3100_devs[i].pdata_size = sizeof(struct ab3100_platform_data); 955 + } 954 956 955 957 err = mfd_add_devices(&client->dev, 0, ab3100_devs, 956 958 ARRAY_SIZE(ab3100_devs), NULL, 0);
+1 -2
drivers/regulator/ab3100.c
··· 17 17 #include <linux/platform_device.h> 18 18 #include <linux/regulator/driver.h> 19 19 #include <linux/mfd/abx500.h> 20 - #include <linux/mfd/core.h> 21 20 22 21 /* LDO registers and some handy masking definitions for AB3100 */ 23 22 #define AB3100_LDO_A 0x40 ··· 581 582 582 583 static int __devinit ab3100_regulators_probe(struct platform_device *pdev) 583 584 { 584 - struct ab3100_platform_data *plfdata = mfd_get_data(pdev); 585 + struct ab3100_platform_data *plfdata = pdev->dev.platform_data; 585 586 int err = 0; 586 587 u8 data; 587 588 int i;