#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/of_device.h>
+#include <linux/slab.h>
#include <sound/soc.h>
#include <asm/fsl_guts.h>
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;
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 */