ASoC: simple-card: card name can be option
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 10 Mar 2014 02:37:56 +0000 (19:37 -0700)
committerMark Brown <broonie@linaro.org>
Mon, 10 Mar 2014 07:53:35 +0000 (07:53 +0000)
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>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/generic/simple-card.c

index 7cabcc5c8703fce97a04e501c701c9ab6228e743..5dd47691ba417bde6f446ba65b368f4340798d30 100644 (file)
@@ -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;