diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2011-04-06 10:39:45 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-05-26 13:45:13 -0400 |
commit | cb5811cf325f44eb0630b55a6416311e4ba661ee (patch) | |
tree | b7132f4d632804ae3e024134d8aa768de2722b29 | |
parent | 07259a7092e47b9fbb5c8bfdad45fa4c7dbbc051 (diff) |
mfd: Use mfd cell platform_data for davinci cells platform bits
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>
-rw-r--r-- | drivers/mfd/davinci_voicecodec.c | 6 | ||||
-rw-r--r-- | sound/soc/codecs/cq93vc.c | 3 | ||||
-rw-r--r-- | sound/soc/davinci/davinci-vcif.c | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/drivers/mfd/davinci_voicecodec.c b/drivers/mfd/davinci_voicecodec.c index 414783b04849..4e2af2cb2d26 100644 --- a/drivers/mfd/davinci_voicecodec.c +++ b/drivers/mfd/davinci_voicecodec.c | |||
@@ -119,12 +119,14 @@ static int __init davinci_vc_probe(struct platform_device *pdev) | |||
119 | /* Voice codec interface client */ | 119 | /* Voice codec interface client */ |
120 | cell = &davinci_vc->cells[DAVINCI_VC_VCIF_CELL]; | 120 | cell = &davinci_vc->cells[DAVINCI_VC_VCIF_CELL]; |
121 | cell->name = "davinci-vcif"; | 121 | cell->name = "davinci-vcif"; |
122 | cell->mfd_data = davinci_vc; | 122 | cell->platform_data = davinci_vc; |
123 | cell->pdata_size = sizeof(*davinci_vc); | ||
123 | 124 | ||
124 | /* Voice codec CQ93VC client */ | 125 | /* Voice codec CQ93VC client */ |
125 | cell = &davinci_vc->cells[DAVINCI_VC_CQ93VC_CELL]; | 126 | cell = &davinci_vc->cells[DAVINCI_VC_CQ93VC_CELL]; |
126 | cell->name = "cq93vc-codec"; | 127 | cell->name = "cq93vc-codec"; |
127 | cell->mfd_data = davinci_vc; | 128 | cell->platform_data = davinci_vc; |
129 | cell->pdata_size = sizeof(*davinci_vc); | ||
128 | 130 | ||
129 | ret = mfd_add_devices(&pdev->dev, pdev->id, davinci_vc->cells, | 131 | ret = mfd_add_devices(&pdev->dev, pdev->id, davinci_vc->cells, |
130 | DAVINCI_VC_CELLS, NULL, 0); | 132 | DAVINCI_VC_CELLS, NULL, 0); |
diff --git a/sound/soc/codecs/cq93vc.c b/sound/soc/codecs/cq93vc.c index b8066ef10bb0..46dbfd067f79 100644 --- a/sound/soc/codecs/cq93vc.c +++ b/sound/soc/codecs/cq93vc.c | |||
@@ -153,8 +153,7 @@ static int cq93vc_resume(struct snd_soc_codec *codec) | |||
153 | 153 | ||
154 | static int cq93vc_probe(struct snd_soc_codec *codec) | 154 | static int cq93vc_probe(struct snd_soc_codec *codec) |
155 | { | 155 | { |
156 | struct davinci_vc *davinci_vc = | 156 | struct davinci_vc *davinci_vc = codec->dev->platform_data; |
157 | mfd_get_data(to_platform_device(codec->dev)); | ||
158 | 157 | ||
159 | davinci_vc->cq93vc.codec = codec; | 158 | davinci_vc->cq93vc.codec = codec; |
160 | codec->control_data = davinci_vc; | 159 | codec->control_data = davinci_vc; |
diff --git a/sound/soc/davinci/davinci-vcif.c b/sound/soc/davinci/davinci-vcif.c index 13e05a302a92..9259f1f34899 100644 --- a/sound/soc/davinci/davinci-vcif.c +++ b/sound/soc/davinci/davinci-vcif.c | |||
@@ -205,7 +205,7 @@ static struct snd_soc_dai_driver davinci_vcif_dai = { | |||
205 | 205 | ||
206 | static int davinci_vcif_probe(struct platform_device *pdev) | 206 | static int davinci_vcif_probe(struct platform_device *pdev) |
207 | { | 207 | { |
208 | struct davinci_vc *davinci_vc = mfd_get_data(pdev); | 208 | struct davinci_vc *davinci_vc = pdev->dev.platform_data; |
209 | struct davinci_vcif_dev *davinci_vcif_dev; | 209 | struct davinci_vcif_dev *davinci_vcif_dev; |
210 | int ret; | 210 | int ret; |
211 | 211 | ||