Skip to contentSkip to conversation

ASoC: simple-card: card name can be option

PATCH Applied Kuninori Morimoto 2 participants 2 messages Mar 10, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: simple-card: card name can be option

From: Kuninori Morimoto <[email protected]>

snd_card.name is now option on DT case. non-DT case can follow same style,
and it is understandable from platform point of view.

---
 sound/soc/generic/simple-card.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/generic/simple-card.c +1 -2
index 7cabcc5..5dd4769 100644
@@ -287,7 +287,6 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
 		}
 
 		if (!cinfo->name	||
-		    !cinfo->card	||
 		    !cinfo->codec_dai.name	||
 		    !cinfo->codec	||
 		    !cinfo->platform	||
@@ -296,7 +295,7 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
 			return -EINVAL;
 		}
 
-		priv->snd_card.name	= cinfo->card;
+		priv->snd_card.name	= (cinfo->card) ? cinfo->card : cinfo->name;
 		dai_link->name		= cinfo->name;
 		dai_link->stream_name	= cinfo->name;
 		dai_link->platform_name	= cinfo->platform;
Signature · 1 line
1.7.9.5
maintainer Applied
#1 lore raw
Quoted 5 lines · Kuninori Morimoto

From: Kuninori Morimoto <[email protected]>

snd_card.name is now option on DT case. non-DT case can follow same style,
and it is understandable from platform point of view.

Applied, thanks.