Skip to contentSkip to conversation

ASoC: mxs-sgtl5000: Remove unneeded 'ret' variable

PATCH Applied Fabio Estevam 3 participants 6 messages Apr 24, 2013 – May 6, 2013

Subsystems (3)
lore
Share & tools
lore

Fabio Estevam

author reviewer
#0 lore raw

PATCH 1/2 ASoC: mxs-sgtl5000: Remove unneeded 'ret' variable

From: Fabio Estevam <[email protected]>

Variable 'ret' is not needed here, so just remove it.

---
 sound/soc/mxs/mxs-sgtl5000.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/mxs/mxs-sgtl5000.c +2 -2
index b1d9b5e..4f74b05 100644
@@ -116,7 +116,7 @@ static int mxs_sgtl5000_probe_dt(struct platform_device *pdev)
 {
 	struct device_node *np = pdev->dev.of_node;
 	struct device_node *saif_np[2], *codec_np;
-	int i, ret = 0;
+	int i;
 
 	if (!np)
 		return 1; /* no device tree */
@@ -142,7 +142,7 @@ static int mxs_sgtl5000_probe_dt(struct platform_device *pdev)
 	of_node_put(saif_np[0]);
 	of_node_put(saif_np[1]);
 
-	return ret;
+	return 0;
 }
 
 static int mxs_sgtl5000_probe(struct platform_device *pdev)
Signature · 1 line
1.7.9.5
author reviewer
#1 lore raw

PATCH 2/2 ASoC: mxs-sgtl5000: Remove unneeded fields from snd_soc_dai_link

From: Fabio Estevam <[email protected]>

It makes no sense to hardcode the I2C bus into the codec_name field.

cpu_dai_name and platform_name are also overwritten later in mxs_sgtl5000_probe_dt().

So remove the three fields, as mxs platform is dt-only platform.

---
 sound/soc/mxs/mxs-sgtl5000.c |    6 ------
 1 file changed, 6 deletions(-)
sound/soc/mxs/mxs-sgtl5000.c +0 -6
index 4f74b05..1b134d7 100644
@@ -90,17 +90,11 @@ static struct snd_soc_dai_link mxs_sgtl5000_dai[] = {
 		.name		= "HiFi Tx",
 		.stream_name	= "HiFi Playback",
 		.codec_dai_name	= "sgtl5000",
-		.codec_name	= "sgtl5000.0-000a",
-		.cpu_dai_name	= "mxs-saif.0",
-		.platform_name	= "mxs-saif.0",
 		.ops		= &mxs_sgtl5000_hifi_ops,
 	}, {
 		.name		= "HiFi Rx",
 		.stream_name	= "HiFi Capture",
 		.codec_dai_name	= "sgtl5000",
-		.codec_name	= "sgtl5000.0-000a",
-		.cpu_dai_name	= "mxs-saif.1",
-		.platform_name	= "mxs-saif.1",
 		.ops		= &mxs_sgtl5000_hifi_ops,
 	},
 };
Signature · 1 line
1.7.9.5
Acked-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] ASoC: mxs-sgtl5000: Remove unneeded fields from snd_soc_dai_link

Quoted 10 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

It makes no sense to hardcode the I2C bus into the codec_name field.

cpu_dai_name and platform_name are also overwritten later in mxs_sgtl5000_probe_dt().

So remove the three fields, as mxs platform is dt-only platform.