mfd: Use mfd cell platform_data for rdc321x cells platform bits
authorSamuel Ortiz <sameo@linux.intel.com>
Wed, 6 Apr 2011 11:21:01 +0000 (13:21 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 26 May 2011 17:45:06 +0000 (19:45 +0200)
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>
drivers/gpio/rdc321x-gpio.c
drivers/mfd/rdc321x-southbridge.c
drivers/watchdog/rdc321x_wdt.c

index a9bda881935a82907ff0c5c753efee59b924cdf5..2762698e0204adc99699839137680bafc7fcc0c7 100644 (file)
@@ -27,7 +27,6 @@
 #include <linux/pci.h>
 #include <linux/gpio.h>
 #include <linux/mfd/rdc321x.h>
-#include <linux/mfd/core.h>
 #include <linux/slab.h>
 
 struct rdc321x_gpio {
@@ -136,7 +135,7 @@ static int __devinit rdc321x_gpio_probe(struct platform_device *pdev)
        struct rdc321x_gpio *rdc321x_gpio_dev;
        struct rdc321x_gpio_pdata *pdata;
 
-       pdata = mfd_get_data(pdev);
+       pdata = pdev->dev.platform_data;
        if (!pdata) {
                dev_err(&pdev->dev, "no platform data supplied\n");
                return -ENODEV;
index 10dbe6374a89328b00da7014e4eccfa886906f2f..809bd4a610895c75baf469ceb1d3bec417aa64c8 100644 (file)
@@ -61,12 +61,14 @@ static struct mfd_cell rdc321x_sb_cells[] = {
                .name           = "rdc321x-wdt",
                .resources      = rdc321x_wdt_resource,
                .num_resources  = ARRAY_SIZE(rdc321x_wdt_resource),
-               .mfd_data       = &rdc321x_wdt_pdata,
+               .platform_data  = &rdc321x_wdt_pdata,
+               .pdata_size     = sizeof(rdc321x_wdt_pdata),
        }, {
                .name           = "rdc321x-gpio",
                .resources      = rdc321x_gpio_resources,
                .num_resources  = ARRAY_SIZE(rdc321x_gpio_resources),
-               .mfd_data       = &rdc321x_gpio_pdata,
+               .platform_data  = &rdc321x_gpio_pdata,
+               .pdata_size     = sizeof(rdc321x_gpio_pdata),
        },
 };
 
index d8e725082fdc1c103d66f91eab6694e65af18c06..428f8a1583e8598ae69414f8171e21a3bbbf2ba8 100644 (file)
@@ -37,7 +37,6 @@
 #include <linux/io.h>
 #include <linux/uaccess.h>
 #include <linux/mfd/rdc321x.h>
-#include <linux/mfd/core.h>
 
 #define RDC_WDT_MASK   0x80000000 /* Mask */
 #define RDC_WDT_EN     0x00800000 /* Enable bit */
@@ -232,7 +231,7 @@ static int __devinit rdc321x_wdt_probe(struct platform_device *pdev)
        struct resource *r;
        struct rdc321x_wdt_pdata *pdata;
 
-       pdata = mfd_get_data(pdev);
+       pdata = pdev->dev.platform_data;
        if (!pdata) {
                dev_err(&pdev->dev, "no platform data supplied\n");
                return -ENODEV;
This page took 0.026986 seconds and 5 git commands to generate.