Commit cb5811cf325f44eb0630b55a6416311e4ba661ee
1 parent
07259a7092
Exists in
master
and in
7 other branches
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>
Showing 3 changed files with 6 additions and 5 deletions Side-by-side Diff
drivers/mfd/davinci_voicecodec.c
... | ... | @@ -119,12 +119,14 @@ |
119 | 119 | /* Voice codec interface client */ |
120 | 120 | cell = &davinci_vc->cells[DAVINCI_VC_VCIF_CELL]; |
121 | 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 | 125 | /* Voice codec CQ93VC client */ |
125 | 126 | cell = &davinci_vc->cells[DAVINCI_VC_CQ93VC_CELL]; |
126 | 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 | 131 | ret = mfd_add_devices(&pdev->dev, pdev->id, davinci_vc->cells, |
130 | 132 | DAVINCI_VC_CELLS, NULL, 0); |
sound/soc/codecs/cq93vc.c
... | ... | @@ -153,8 +153,7 @@ |
153 | 153 | |
154 | 154 | static int cq93vc_probe(struct snd_soc_codec *codec) |
155 | 155 | { |
156 | - struct davinci_vc *davinci_vc = | |
157 | - mfd_get_data(to_platform_device(codec->dev)); | |
156 | + struct davinci_vc *davinci_vc = codec->dev->platform_data; | |
158 | 157 | |
159 | 158 | davinci_vc->cq93vc.codec = codec; |
160 | 159 | codec->control_data = davinci_vc; |
sound/soc/davinci/davinci-vcif.c
... | ... | @@ -205,7 +205,7 @@ |
205 | 205 | |
206 | 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 | 209 | struct davinci_vcif_dev *davinci_vcif_dev; |
210 | 210 | int ret; |
211 | 211 |