summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/fsl_ssi.c
diff options
context:
space:
mode:
authorLiam Girdwood <lrg@slimlogic.co.uk>2010-08-23 12:58:01 +0100
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-08-23 12:58:01 +0100
commit97e15b1fcf79a60cb146d4123e7c72ac2736e258 (patch)
tree5923cd4d4f2e1945b66a7aab27acf684f8590c47 /sound/soc/fsl/fsl_ssi.c
parenta8165e0e6f0511d14132423b4bce2d285e890fc8 (diff)
parent38fec7272bc033b75a0eb8976c56c2024d371b7d (diff)
Merge remote branch 'broonie-asoc/for-2.6.37' into for-2.6.37
Diffstat (limited to 'sound/soc/fsl/fsl_ssi.c')
-rw-r--r--sound/soc/fsl/fsl_ssi.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index d1c855ade8f..4cc167a7aeb 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -624,13 +624,13 @@ static void make_lowercase(char *s)
}
}
-static int __devinit fsl_ssi_probe(struct of_device *of_dev,
+static int __devinit fsl_ssi_probe(struct platform_device *pdev,
const struct of_device_id *match)
{
struct fsl_ssi_private *ssi_private;
int ret = 0;
struct device_attribute *dev_attr = NULL;
- struct device_node *np = of_dev->dev.of_node;
+ struct device_node *np = pdev->dev.of_node;
const char *p, *sprop;
const uint32_t *iprop;
struct resource res;
@@ -645,14 +645,14 @@ static int __devinit fsl_ssi_probe(struct of_device *of_dev,
/* Check for a codec-handle property. */
if (!of_get_property(np, "codec-handle", NULL)) {
- dev_err(&of_dev->dev, "missing codec-handle property\n");
+ dev_err(&pdev->dev, "missing codec-handle property\n");
return -ENODEV;
}
/* We only support the SSI in "I2S Slave" mode */
sprop = of_get_property(np, "fsl,mode", NULL);
if (!sprop || strcmp(sprop, "i2s-slave")) {
- dev_notice(&of_dev->dev, "mode %s is unsupported\n", sprop);
+ dev_notice(&pdev->dev, "mode %s is unsupported\n", sprop);
return -ENODEV;
}
@@ -661,7 +661,7 @@ static int __devinit fsl_ssi_probe(struct of_device *of_dev,
ssi_private = kzalloc(sizeof(struct fsl_ssi_private) + strlen(p),
GFP_KERNEL);
if (!ssi_private) {
- dev_err(&of_dev->dev, "could not allocate DAI object\n");
+ dev_err(&pdev->dev, "could not allocate DAI object\n");
return -ENOMEM;
}
@@ -675,7 +675,7 @@ static int __devinit fsl_ssi_probe(struct of_device *of_dev,
/* Get the addresses and IRQ */
ret = of_address_to_resource(np, 0, &res);
if (ret) {
- dev_err(&of_dev->dev, "could not determine device resources\n");
+ dev_err(&pdev->dev, "could not determine device resources\n");
kfree(ssi_private);
return ret;
}
@@ -703,19 +703,19 @@ static int __devinit fsl_ssi_probe(struct of_device *of_dev,
dev_attr->attr.mode = S_IRUGO;
dev_attr->show = fsl_sysfs_ssi_show;
- ret = device_create_file(&of_dev->dev, dev_attr);
+ ret = device_create_file(&pdev->dev, dev_attr);
if (ret) {
- dev_err(&of_dev->dev, "could not create sysfs %s file\n",
+ dev_err(&pdev->dev, "could not create sysfs %s file\n",
ssi_private->dev_attr.attr.name);
goto error;
}
/* Register with ASoC */
- dev_set_drvdata(&of_dev->dev, ssi_private);
+ dev_set_drvdata(&pdev->dev, ssi_private);
- ret = snd_soc_register_dai(&of_dev->dev, &ssi_private->cpu_dai_drv);
+ ret = snd_soc_register_dai(&pdev->dev, &ssi_private->cpu_dai_drv);
if (ret) {
- dev_err(&of_dev->dev, "failed to register DAI: %d\n", ret);
+ dev_err(&pdev->dev, "failed to register DAI: %d\n", ret);
goto error;
}
@@ -733,20 +733,20 @@ static int __devinit fsl_ssi_probe(struct of_device *of_dev,
make_lowercase(name);
ssi_private->pdev =
- platform_device_register_data(&of_dev->dev, name, 0, NULL, 0);
+ platform_device_register_data(&pdev->dev, name, 0, NULL, 0);
if (IS_ERR(ssi_private->pdev)) {
ret = PTR_ERR(ssi_private->pdev);
- dev_err(&of_dev->dev, "failed to register platform: %d\n", ret);
+ dev_err(&pdev->dev, "failed to register platform: %d\n", ret);
goto error;
}
return 0;
error:
- snd_soc_unregister_dai(&of_dev->dev);
- dev_set_drvdata(&of_dev->dev, NULL);
+ snd_soc_unregister_dai(&pdev->dev);
+ dev_set_drvdata(&pdev->dev, NULL);
if (dev_attr)
- device_remove_file(&of_dev->dev, dev_attr);
+ device_remove_file(&pdev->dev, dev_attr);
irq_dispose_mapping(ssi_private->irq);
iounmap(ssi_private->ssi);
kfree(ssi_private);
@@ -754,16 +754,16 @@ error:
return ret;
}
-static int fsl_ssi_remove(struct of_device *of_dev)
+static int fsl_ssi_remove(struct platform_device *pdev)
{
- struct fsl_ssi_private *ssi_private = dev_get_drvdata(&of_dev->dev);
+ struct fsl_ssi_private *ssi_private = dev_get_drvdata(&pdev->dev);
platform_device_unregister(ssi_private->pdev);
- snd_soc_unregister_dai(&of_dev->dev);
- device_remove_file(&of_dev->dev, &ssi_private->dev_attr);
+ snd_soc_unregister_dai(&pdev->dev);
+ device_remove_file(&pdev->dev, &ssi_private->dev_attr);
kfree(ssi_private);
- dev_set_drvdata(&of_dev->dev, NULL);
+ dev_set_drvdata(&pdev->dev, NULL);
return 0;
}