mfd: Rename platform_data field of mfd_cell to mfd_data
authorAndres Salomon <dilinger@queued.net>
Fri, 18 Feb 2011 03:07:25 +0000 (19:07 -0800)
committerSamuel Ortiz <sameo@linux.intel.com>
Wed, 23 Mar 2011 09:41:55 +0000 (10:41 +0100)
Rename the platform_data variable to imply a distinction between
common platform_data driver usage (typically accessed via
pdev->dev.platform_data) and the way MFD passes data down to
clients (using a wrapper named mfd_get_data).

All clients have already been changed to use the wrapper function,
so this can be a quick single-commit change that only touches things
in drivers/mfd.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/ab3100-core.c
drivers/mfd/ab3550-core.c
drivers/mfd/janz-cmodio.c
drivers/mfd/mc13xxx-core.c
drivers/mfd/timberdale.c
drivers/mfd/twl4030-codec.c
drivers/mfd/wl1273-core.c
include/linux/mfd/core.h

index 2dcab8643e717acddfa28bf8a49c7b22e0c4be2c..a751927047ac967b6111359c3d8942253382be12 100644 (file)
@@ -950,7 +950,7 @@ static int __devinit ab3100_probe(struct i2c_client *client,
 
        /* Set up and register the platform devices. */
        for (i = 0; i < ARRAY_SIZE(ab3100_devs); i++)
-               ab3100_devs[i].platform_data = ab3100_plf_data;
+               ab3100_devs[i].mfd_data = ab3100_plf_data;
 
        err = mfd_add_devices(&client->dev, 0, ab3100_devs,
                ARRAY_SIZE(ab3100_devs), NULL, 0);
index c8e555a9ee6ca4e00f8c3e04f8981d4a668ac896..c12d042852269a6ebaeff0e132d316ef2b0a6d0e 100644 (file)
@@ -1321,7 +1321,7 @@ static int __init ab3550_probe(struct i2c_client *client,
 
        /* Set up and register the platform devices. */
        for (i = 0; i < AB3550_NUM_DEVICES; i++)
-               ab3550_devs[i].platform_data = ab3550_plf_data->dev_data[i];
+               ab3550_devs[i].mfd_data = ab3550_plf_data->dev_data[i];
 
        err = mfd_add_devices(&client->dev, 0, ab3550_devs,
                ARRAY_SIZE(ab3550_devs), NULL,
index 58de1e28788ea8bafbf0041011149183a7ddb8dc..fc4191137e9069f20cfd4c87ac76987e8eec3435 100644 (file)
@@ -86,7 +86,7 @@ static int __devinit cmodio_setup_subdevice(struct cmodio_device *priv,
 
        /* Add platform data */
        pdata->modno = modno;
-       cell->platform_data = pdata;
+       cell->mfd_data = pdata;
 
        /* MODULbus registers -- PCI BAR3 is big-endian MODULbus access */
        res->flags = IORESOURCE_MEM;
index 30807d3a65390743779f1d0835b44f2d36673d80..97a3b400ed4f981118fd9ac7f9b4c2b73569a25c 100644 (file)
@@ -689,7 +689,7 @@ static int mc13xxx_add_subdevice_pdata(struct mc13xxx *mc13xxx,
        const char *name = mc13xxx_get_chipname(mc13xxx);
 
        struct mfd_cell cell = {
-               .platform_data = pdata,
+               .mfd_data = pdata,
        };
 
        /* there is no asnprintf in the kernel :-( */
index 6353921c1729d9d32f4e5feaae84b9edf235a340..94c6c8afad12e5abe9e0728b833db5c70f0d23aa 100644 (file)
@@ -384,7 +384,7 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg0[] = {
                .name = "timb-dma",
                .num_resources = ARRAY_SIZE(timberdale_dma_resources),
                .resources = timberdale_dma_resources,
-               .platform_data = &timb_dma_platform_data,
+               .mfd_data = &timb_dma_platform_data,
        },
        {
                .name = "timb-uart",
@@ -395,37 +395,37 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg0[] = {
                .name = "xiic-i2c",
                .num_resources = ARRAY_SIZE(timberdale_xiic_resources),
                .resources = timberdale_xiic_resources,
-               .platform_data = &timberdale_xiic_platform_data,
+               .mfd_data = &timberdale_xiic_platform_data,
        },
        {
                .name = "timb-gpio",
                .num_resources = ARRAY_SIZE(timberdale_gpio_resources),
                .resources = timberdale_gpio_resources,
-               .platform_data = &timberdale_gpio_platform_data,
+               .mfd_data = &timberdale_gpio_platform_data,
        },
        {
                .name = "timb-video",
                .num_resources = ARRAY_SIZE(timberdale_video_resources),
                .resources = timberdale_video_resources,
-               .platform_data = &timberdale_video_platform_data,
+               .mfd_data = &timberdale_video_platform_data,
        },
        {
                .name = "timb-radio",
                .num_resources = ARRAY_SIZE(timberdale_radio_resources),
                .resources = timberdale_radio_resources,
-               .platform_data = &timberdale_radio_platform_data,
+               .mfd_data = &timberdale_radio_platform_data,
        },
        {
                .name = "xilinx_spi",
                .num_resources = ARRAY_SIZE(timberdale_spi_resources),
                .resources = timberdale_spi_resources,
-               .platform_data = &timberdale_xspi_platform_data,
+               .mfd_data = &timberdale_xspi_platform_data,
        },
        {
                .name = "ks8842",
                .num_resources = ARRAY_SIZE(timberdale_eth_resources),
                .resources = timberdale_eth_resources,
-               .platform_data = &timberdale_ks8842_platform_data,
+               .mfd_data = &timberdale_ks8842_platform_data,
        },
 };
 
@@ -434,7 +434,7 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg1[] = {
                .name = "timb-dma",
                .num_resources = ARRAY_SIZE(timberdale_dma_resources),
                .resources = timberdale_dma_resources,
-               .platform_data = &timb_dma_platform_data,
+               .mfd_data = &timb_dma_platform_data,
        },
        {
                .name = "timb-uart",
@@ -450,13 +450,13 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg1[] = {
                .name = "xiic-i2c",
                .num_resources = ARRAY_SIZE(timberdale_xiic_resources),
                .resources = timberdale_xiic_resources,
-               .platform_data = &timberdale_xiic_platform_data,
+               .mfd_data = &timberdale_xiic_platform_data,
        },
        {
                .name = "timb-gpio",
                .num_resources = ARRAY_SIZE(timberdale_gpio_resources),
                .resources = timberdale_gpio_resources,
-               .platform_data = &timberdale_gpio_platform_data,
+               .mfd_data = &timberdale_gpio_platform_data,
        },
        {
                .name = "timb-mlogicore",
@@ -467,25 +467,25 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg1[] = {
                .name = "timb-video",
                .num_resources = ARRAY_SIZE(timberdale_video_resources),
                .resources = timberdale_video_resources,
-               .platform_data = &timberdale_video_platform_data,
+               .mfd_data = &timberdale_video_platform_data,
        },
        {
                .name = "timb-radio",
                .num_resources = ARRAY_SIZE(timberdale_radio_resources),
                .resources = timberdale_radio_resources,
-               .platform_data = &timberdale_radio_platform_data,
+               .mfd_data = &timberdale_radio_platform_data,
        },
        {
                .name = "xilinx_spi",
                .num_resources = ARRAY_SIZE(timberdale_spi_resources),
                .resources = timberdale_spi_resources,
-               .platform_data = &timberdale_xspi_platform_data,
+               .mfd_data = &timberdale_xspi_platform_data,
        },
        {
                .name = "ks8842",
                .num_resources = ARRAY_SIZE(timberdale_eth_resources),
                .resources = timberdale_eth_resources,
-               .platform_data = &timberdale_ks8842_platform_data,
+               .mfd_data = &timberdale_ks8842_platform_data,
        },
 };
 
@@ -494,7 +494,7 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg2[] = {
                .name = "timb-dma",
                .num_resources = ARRAY_SIZE(timberdale_dma_resources),
                .resources = timberdale_dma_resources,
-               .platform_data = &timb_dma_platform_data,
+               .mfd_data = &timb_dma_platform_data,
        },
        {
                .name = "timb-uart",
@@ -505,31 +505,31 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg2[] = {
                .name = "xiic-i2c",
                .num_resources = ARRAY_SIZE(timberdale_xiic_resources),
                .resources = timberdale_xiic_resources,
-               .platform_data = &timberdale_xiic_platform_data,
+               .mfd_data = &timberdale_xiic_platform_data,
        },
        {
                .name = "timb-gpio",
                .num_resources = ARRAY_SIZE(timberdale_gpio_resources),
                .resources = timberdale_gpio_resources,
-               .platform_data = &timberdale_gpio_platform_data,
+               .mfd_data = &timberdale_gpio_platform_data,
        },
        {
                .name = "timb-video",
                .num_resources = ARRAY_SIZE(timberdale_video_resources),
                .resources = timberdale_video_resources,
-               .platform_data = &timberdale_video_platform_data,
+               .mfd_data = &timberdale_video_platform_data,
        },
        {
                .name = "timb-radio",
                .num_resources = ARRAY_SIZE(timberdale_radio_resources),
                .resources = timberdale_radio_resources,
-               .platform_data = &timberdale_radio_platform_data,
+               .mfd_data = &timberdale_radio_platform_data,
        },
        {
                .name = "xilinx_spi",
                .num_resources = ARRAY_SIZE(timberdale_spi_resources),
                .resources = timberdale_spi_resources,
-               .platform_data = &timberdale_xspi_platform_data,
+               .mfd_data = &timberdale_xspi_platform_data,
        },
 };
 
@@ -538,7 +538,7 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg3[] = {
                .name = "timb-dma",
                .num_resources = ARRAY_SIZE(timberdale_dma_resources),
                .resources = timberdale_dma_resources,
-               .platform_data = &timb_dma_platform_data,
+               .mfd_data = &timb_dma_platform_data,
        },
        {
                .name = "timb-uart",
@@ -549,37 +549,37 @@ static __devinitdata struct mfd_cell timberdale_cells_bar0_cfg3[] = {
                .name = "ocores-i2c",
                .num_resources = ARRAY_SIZE(timberdale_ocores_resources),
                .resources = timberdale_ocores_resources,
-               .platform_data = &timberdale_ocores_platform_data,
+               .mfd_data = &timberdale_ocores_platform_data,
        },
        {
                .name = "timb-gpio",
                .num_resources = ARRAY_SIZE(timberdale_gpio_resources),
                .resources = timberdale_gpio_resources,
-               .platform_data = &timberdale_gpio_platform_data,
+               .mfd_data = &timberdale_gpio_platform_data,
        },
        {
                .name = "timb-video",
                .num_resources = ARRAY_SIZE(timberdale_video_resources),
                .resources = timberdale_video_resources,
-               .platform_data = &timberdale_video_platform_data,
+               .mfd_data = &timberdale_video_platform_data,
        },
        {
                .name = "timb-radio",
                .num_resources = ARRAY_SIZE(timberdale_radio_resources),
                .resources = timberdale_radio_resources,
-               .platform_data = &timberdale_radio_platform_data,
+               .mfd_data = &timberdale_radio_platform_data,
        },
        {
                .name = "xilinx_spi",
                .num_resources = ARRAY_SIZE(timberdale_spi_resources),
                .resources = timberdale_spi_resources,
-               .platform_data = &timberdale_xspi_platform_data,
+               .mfd_data = &timberdale_xspi_platform_data,
        },
        {
                .name = "ks8842",
                .num_resources = ARRAY_SIZE(timberdale_eth_resources),
                .resources = timberdale_eth_resources,
-               .platform_data = &timberdale_ks8842_platform_data,
+               .mfd_data = &timberdale_ks8842_platform_data,
        },
 };
 
index 0f5742655b465e61a4abcc2806c67c46e3ed148a..c02fded316c9f1ce1ee8fd2343b1bfb476399a9f 100644 (file)
@@ -208,13 +208,13 @@ static int __devinit twl4030_codec_probe(struct platform_device *pdev)
        if (pdata->audio) {
                cell = &codec->cells[childs];
                cell->name = "twl4030-codec";
-               cell->platform_data = pdata->audio;
+               cell->mfd_data = pdata->audio;
                childs++;
        }
        if (pdata->vibra) {
                cell = &codec->cells[childs];
                cell->name = "twl4030-vibra";
-               cell->platform_data = pdata->vibra;
+               cell->mfd_data = pdata->vibra;
                childs++;
        }
 
index b4823bf9523b1bcffa5a58ec8028802da860eed7..529d65ba5353bd58de151ffe876355ad900c62ba 100644 (file)
@@ -78,7 +78,7 @@ static int __devinit wl1273_core_probe(struct i2c_client *client,
 
        cell = &core->cells[children];
        cell->name = "wl1273_fm_radio";
-       cell->platform_data = &core;
+       cell->mfd_data = &core;
        children++;
 
        if (pdata->children & WL1273_CODEC_CHILD) {
@@ -86,7 +86,7 @@ static int __devinit wl1273_core_probe(struct i2c_client *client,
 
                dev_dbg(&client->dev, "%s: Have codec.\n", __func__);
                cell->name = "wl1273-codec";
-               cell->platform_data = &core;
+               cell->mfd_data = &core;
                children++;
        }
 
index 923ec2591eb7ca80def76f50588bb54644459672..f317fe4f83667b039db89ca21b6fefbd0c27f3c5 100644 (file)
@@ -33,8 +33,8 @@ struct mfd_cell {
        /* driver-specific data for MFD-aware "cell" drivers */
        void                    *driver_data;
 
-       /* platform_data can be used to pass data to "generic" drivers */
-       void                    *platform_data;
+       /* mfd_data can be used to pass data to client drivers */
+       void                    *mfd_data;
 
        /*
         * These resources can be specified relative to the parent device.
@@ -64,11 +64,11 @@ static inline const struct mfd_cell *mfd_get_cell(struct platform_device *pdev)
 
 /*
  * Given a platform device that's been created by mfd_add_devices(), fetch
- * the .platform_data entry from the mfd_cell that created it.
+ * the .mfd_data entry from the mfd_cell that created it.
  */
 static inline void *mfd_get_data(struct platform_device *pdev)
 {
-       return mfd_get_cell(pdev)->platform_data;
+       return mfd_get_cell(pdev)->mfd_data;
 }
 
 extern int mfd_add_devices(struct device *parent, int id,