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 ab3550 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 -2
+4 -2
drivers/mfd/ab3550-core.c
··· 1320 1320 goto exit_no_ops; 1321 1321 1322 1322 /* Set up and register the platform devices. */ 1323 - for (i = 0; i < AB3550_NUM_DEVICES; i++) 1324 - ab3550_devs[i].mfd_data = ab3550_plf_data->dev_data[i]; 1323 + for (i = 0; i < AB3550_NUM_DEVICES; i++) { 1324 + ab3550_devs[i].platform_data = ab3550_plf_data->dev_data[i]; 1325 + ab3550_devs[i].pdata_size = ab3550_plf_data->dev_data_sz[i]; 1326 + } 1325 1327 1326 1328 err = mfd_add_devices(&client->dev, 0, ab3550_devs, 1327 1329 ARRAY_SIZE(ab3550_devs), NULL,
+1
include/linux/mfd/abx500.h
··· 186 186 struct ab3550_platform_data { 187 187 struct {unsigned int base; unsigned int count; } irq; 188 188 void *dev_data[AB3550_NUM_DEVICES]; 189 + size_t dev_data_sz[AB3550_NUM_DEVICES]; 189 190 struct abx500_init_settings *init_settings; 190 191 unsigned int init_settings_sz; 191 192 };