diff options
author | Timur Tabi <timur@freescale.com> | 2010-08-19 16:26:58 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-08-20 12:19:44 -0400 |
commit | 38fec7272bc033b75a0eb8976c56c2024d371b7d (patch) | |
tree | edde947e89e821a1f66440cf8d82d8e73475c1ab /sound/soc/fsl/mpc8610_hpcd.c | |
parent | bf557a50f59fc62dfd89fa5bf08c6f5d96fb2f45 (diff) |
ASoC: mpc8610: replace of_device with platform_device
'struct of_device' no longer exists, and its functionality has been merged
into platform_device. Update the MPC8610 HPCD audio drivers (fsl_ssi, fsl_dma,
and mpc8610_hpcd) accordingly.
Also add a #include for slab.h, which is now needed for kmalloc and kfree.
Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/fsl/mpc8610_hpcd.c')
-rw-r--r-- | sound/soc/fsl/mpc8610_hpcd.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c index 38339c158ed9..0d7dcf1e4863 100644 --- a/sound/soc/fsl/mpc8610_hpcd.c +++ b/sound/soc/fsl/mpc8610_hpcd.c | |||
@@ -13,6 +13,7 @@ | |||
13 | #include <linux/module.h> | 13 | #include <linux/module.h> |
14 | #include <linux/interrupt.h> | 14 | #include <linux/interrupt.h> |
15 | #include <linux/of_device.h> | 15 | #include <linux/of_device.h> |
16 | #include <linux/slab.h> | ||
16 | #include <sound/soc.h> | 17 | #include <sound/soc.h> |
17 | #include <asm/fsl_guts.h> | 18 | #include <asm/fsl_guts.h> |
18 | 19 | ||
@@ -323,9 +324,10 @@ static int get_dma_channel(struct device_node *ssi_np, | |||
323 | static int mpc8610_hpcd_probe(struct platform_device *pdev) | 324 | static int mpc8610_hpcd_probe(struct platform_device *pdev) |
324 | { | 325 | { |
325 | struct device *dev = pdev->dev.parent; | 326 | struct device *dev = pdev->dev.parent; |
326 | /* of_dev is the OF device for the SSI node that probed us */ | 327 | /* ssi_pdev is the platform device for the SSI node that probed us */ |
327 | struct of_device *of_dev = container_of(dev, struct of_device, dev); | 328 | struct platform_device *ssi_pdev = |
328 | struct device_node *np = of_dev->dev.of_node; | 329 | container_of(dev, struct platform_device, dev); |
330 | struct device_node *np = ssi_pdev->dev.of_node; | ||
329 | struct device_node *codec_np = NULL; | 331 | struct device_node *codec_np = NULL; |
330 | struct platform_device *sound_device = NULL; | 332 | struct platform_device *sound_device = NULL; |
331 | struct mpc8610_hpcd_data *machine_data; | 333 | struct mpc8610_hpcd_data *machine_data; |
@@ -348,7 +350,7 @@ static int mpc8610_hpcd_probe(struct platform_device *pdev) | |||
348 | if (!machine_data) | 350 | if (!machine_data) |
349 | return -ENOMEM; | 351 | return -ENOMEM; |
350 | 352 | ||
351 | machine_data->dai[0].cpu_dai_name = dev_name(&of_dev->dev); | 353 | machine_data->dai[0].cpu_dai_name = dev_name(&ssi_pdev->dev); |
352 | machine_data->dai[0].ops = &mpc8610_hpcd_ops; | 354 | machine_data->dai[0].ops = &mpc8610_hpcd_ops; |
353 | 355 | ||
354 | /* Determine the codec name, it will be used as the codec DAI name */ | 356 | /* Determine the codec name, it will be used as the codec DAI name */ |