From 38fec7272bc033b75a0eb8976c56c2024d371b7d Mon Sep 17 00:00:00 2001 From: Timur Tabi Date: Thu, 19 Aug 2010 15:26:58 -0500 Subject: 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 Signed-off-by: Mark Brown --- sound/soc/fsl/mpc8610_hpcd.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sound/soc/fsl/mpc8610_hpcd.c') 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 @@ #include #include #include +#include #include #include @@ -323,9 +324,10 @@ static int get_dma_channel(struct device_node *ssi_np, static int mpc8610_hpcd_probe(struct platform_device *pdev) { struct device *dev = pdev->dev.parent; - /* of_dev is the OF device for the SSI node that probed us */ - struct of_device *of_dev = container_of(dev, struct of_device, dev); - struct device_node *np = of_dev->dev.of_node; + /* ssi_pdev is the platform device for the SSI node that probed us */ + struct platform_device *ssi_pdev = + container_of(dev, struct platform_device, dev); + struct device_node *np = ssi_pdev->dev.of_node; struct device_node *codec_np = NULL; struct platform_device *sound_device = NULL; struct mpc8610_hpcd_data *machine_data; @@ -348,7 +350,7 @@ static int mpc8610_hpcd_probe(struct platform_device *pdev) if (!machine_data) return -ENOMEM; - machine_data->dai[0].cpu_dai_name = dev_name(&of_dev->dev); + machine_data->dai[0].cpu_dai_name = dev_name(&ssi_pdev->dev); machine_data->dai[0].ops = &mpc8610_hpcd_ops; /* Determine the codec name, it will be used as the codec DAI name */ -- cgit v1.2.3