mfd: Use mfd cell platform_data for davinci cells platform bits
authorSamuel Ortiz <sameo@linux.intel.com>
Wed, 6 Apr 2011 14:39:45 +0000 (16:39 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 26 May 2011 17:45:13 +0000 (19:45 +0200)
With the addition of a platform device mfd_cell pointer, MFD drivers
can go back to passing platform 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: Miguel Aguilar <miguel.aguilar@ridgerun.com>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/davinci_voicecodec.c
sound/soc/codecs/cq93vc.c
sound/soc/davinci/davinci-vcif.c

index 414783b048490b7a03a021781c79acd29d32367c..4e2af2cb2d26a76534c884c3cc57fe97f3c30d52 100644 (file)
@@ -119,12 +119,14 @@ static int __init davinci_vc_probe(struct platform_device *pdev)
        /* Voice codec interface client */
        cell = &davinci_vc->cells[DAVINCI_VC_VCIF_CELL];
        cell->name = "davinci-vcif";
-       cell->mfd_data = davinci_vc;
+       cell->platform_data = davinci_vc;
+       cell->pdata_size = sizeof(*davinci_vc);
 
        /* Voice codec CQ93VC client */
        cell = &davinci_vc->cells[DAVINCI_VC_CQ93VC_CELL];
        cell->name = "cq93vc-codec";
-       cell->mfd_data = davinci_vc;
+       cell->platform_data = davinci_vc;
+       cell->pdata_size = sizeof(*davinci_vc);
 
        ret = mfd_add_devices(&pdev->dev, pdev->id, davinci_vc->cells,
                              DAVINCI_VC_CELLS, NULL, 0);
index b8066ef10bb0ae65dcf3b49582fe89329e17f09c..46dbfd067f79647b7fca338eb85addd177eda966 100644 (file)
@@ -153,8 +153,7 @@ static int cq93vc_resume(struct snd_soc_codec *codec)
 
 static int cq93vc_probe(struct snd_soc_codec *codec)
 {
-       struct davinci_vc *davinci_vc =
-                       mfd_get_data(to_platform_device(codec->dev));
+       struct davinci_vc *davinci_vc = codec->dev->platform_data;
 
        davinci_vc->cq93vc.codec = codec;
        codec->control_data = davinci_vc;
index 13e05a302a92edf15aa1f464298f7ae81a2e7579..9259f1f348999cd5963817402023e7b8d805768e 100644 (file)
@@ -205,7 +205,7 @@ static struct snd_soc_dai_driver davinci_vcif_dai = {
 
 static int davinci_vcif_probe(struct platform_device *pdev)
 {
-       struct davinci_vc *davinci_vc = mfd_get_data(pdev);
+       struct davinci_vc *davinci_vc = pdev->dev.platform_data;
        struct davinci_vcif_dev *davinci_vcif_dev;
        int ret;