diff mbox

ASoC: simple-card: card name can be option

Message ID 87vbvmrd6m.wl%kuninori.morimoto.gx@gmail.com (mailing list archive)
State Accepted
Commit 12ffa6fc1958879a81b6af1624c1a2edd83ec04a
Headers show

Commit Message

Kuninori Morimoto March 10, 2014, 2:37 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

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.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/generic/simple-card.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Mark Brown March 10, 2014, 7:53 a.m. UTC | #1
On Sun, Mar 09, 2014 at 07:37:56PM -0700, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> 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.
diff mbox

Patch

diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index 7cabcc5..5dd4769 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -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;