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 rdc321x 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.

Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>

+6 -6
+1 -2
drivers/gpio/rdc321x-gpio.c
··· 27 27 #include <linux/pci.h> 28 28 #include <linux/gpio.h> 29 29 #include <linux/mfd/rdc321x.h> 30 - #include <linux/mfd/core.h> 31 30 #include <linux/slab.h> 32 31 33 32 struct rdc321x_gpio { ··· 135 136 struct rdc321x_gpio *rdc321x_gpio_dev; 136 137 struct rdc321x_gpio_pdata *pdata; 137 138 138 - pdata = mfd_get_data(pdev); 139 + pdata = pdev->dev.platform_data; 139 140 if (!pdata) { 140 141 dev_err(&pdev->dev, "no platform data supplied\n"); 141 142 return -ENODEV;
+4 -2
drivers/mfd/rdc321x-southbridge.c
··· 61 61 .name = "rdc321x-wdt", 62 62 .resources = rdc321x_wdt_resource, 63 63 .num_resources = ARRAY_SIZE(rdc321x_wdt_resource), 64 - .mfd_data = &rdc321x_wdt_pdata, 64 + .platform_data = &rdc321x_wdt_pdata, 65 + .pdata_size = sizeof(rdc321x_wdt_pdata), 65 66 }, { 66 67 .name = "rdc321x-gpio", 67 68 .resources = rdc321x_gpio_resources, 68 69 .num_resources = ARRAY_SIZE(rdc321x_gpio_resources), 69 - .mfd_data = &rdc321x_gpio_pdata, 70 + .platform_data = &rdc321x_gpio_pdata, 71 + .pdata_size = sizeof(rdc321x_gpio_pdata), 70 72 }, 71 73 }; 72 74
+1 -2
drivers/watchdog/rdc321x_wdt.c
··· 37 37 #include <linux/io.h> 38 38 #include <linux/uaccess.h> 39 39 #include <linux/mfd/rdc321x.h> 40 - #include <linux/mfd/core.h> 41 40 42 41 #define RDC_WDT_MASK 0x80000000 /* Mask */ 43 42 #define RDC_WDT_EN 0x00800000 /* Enable bit */ ··· 231 232 struct resource *r; 232 233 struct rdc321x_wdt_pdata *pdata; 233 234 234 - pdata = mfd_get_data(pdev); 235 + pdata = pdev->dev.platform_data; 235 236 if (!pdata) { 236 237 dev_err(&pdev->dev, "no platform data supplied\n"); 237 238 return -ENODEV;