Commit bddd7d02 authored by Stephen Warren's avatar Stephen Warren Committed by Mark Brown

ASoC: tegra_wm8753: minor cleanup

Various minor cleanups so that the probe() body more closely resembles
other drivers, for easier comparison.
Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 69de6be7
...@@ -124,6 +124,7 @@ static struct snd_soc_card snd_soc_tegra_wm8753 = { ...@@ -124,6 +124,7 @@ static struct snd_soc_card snd_soc_tegra_wm8753 = {
static int tegra_wm8753_driver_probe(struct platform_device *pdev) static int tegra_wm8753_driver_probe(struct platform_device *pdev)
{ {
struct device_node *np = pdev->dev.of_node;
struct snd_soc_card *card = &snd_soc_tegra_wm8753; struct snd_soc_card *card = &snd_soc_tegra_wm8753;
struct tegra_wm8753 *machine; struct tegra_wm8753 *machine;
int ret; int ret;
...@@ -132,8 +133,7 @@ static int tegra_wm8753_driver_probe(struct platform_device *pdev) ...@@ -132,8 +133,7 @@ static int tegra_wm8753_driver_probe(struct platform_device *pdev)
GFP_KERNEL); GFP_KERNEL);
if (!machine) { if (!machine) {
dev_err(&pdev->dev, "Can't allocate tegra_wm8753 struct\n"); dev_err(&pdev->dev, "Can't allocate tegra_wm8753 struct\n");
ret = -ENOMEM; return -ENOMEM;
goto err;
} }
card->dev = &pdev->dev; card->dev = &pdev->dev;
...@@ -148,8 +148,8 @@ static int tegra_wm8753_driver_probe(struct platform_device *pdev) ...@@ -148,8 +148,8 @@ static int tegra_wm8753_driver_probe(struct platform_device *pdev)
if (ret) if (ret)
goto err; goto err;
tegra_wm8753_dai.codec_of_node = of_parse_phandle( tegra_wm8753_dai.codec_of_node = of_parse_phandle(np,
pdev->dev.of_node, "nvidia,audio-codec", 0); "nvidia,audio-codec", 0);
if (!tegra_wm8753_dai.codec_of_node) { if (!tegra_wm8753_dai.codec_of_node) {
dev_err(&pdev->dev, dev_err(&pdev->dev,
"Property 'nvidia,audio-codec' missing or invalid\n"); "Property 'nvidia,audio-codec' missing or invalid\n");
...@@ -157,8 +157,8 @@ static int tegra_wm8753_driver_probe(struct platform_device *pdev) ...@@ -157,8 +157,8 @@ static int tegra_wm8753_driver_probe(struct platform_device *pdev)
goto err; goto err;
} }
tegra_wm8753_dai.cpu_of_node = of_parse_phandle( tegra_wm8753_dai.cpu_of_node = of_parse_phandle(np,
pdev->dev.of_node, "nvidia,i2s-controller", 0); "nvidia,i2s-controller", 0);
if (!tegra_wm8753_dai.cpu_of_node) { if (!tegra_wm8753_dai.cpu_of_node) {
dev_err(&pdev->dev, dev_err(&pdev->dev,
"Property 'nvidia,i2s-controller' missing or invalid\n"); "Property 'nvidia,i2s-controller' missing or invalid\n");
...@@ -166,8 +166,7 @@ static int tegra_wm8753_driver_probe(struct platform_device *pdev) ...@@ -166,8 +166,7 @@ static int tegra_wm8753_driver_probe(struct platform_device *pdev)
goto err; goto err;
} }
tegra_wm8753_dai.platform_of_node = tegra_wm8753_dai.platform_of_node = tegra_wm8753_dai.cpu_of_node;
tegra_wm8753_dai.cpu_of_node;
ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev); ret = tegra_asoc_utils_init(&machine->util_data, &pdev->dev);
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment