Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e41975ed authored by Xiubo Li's avatar Xiubo Li Committed by Mark Brown
Browse files

ASoC: core: Fix the DAI name getting.



From "ASoC: make snd_soc_dai_link more symmetrical", can we see that
the name of CPU DAI maybe omitted. If the DAI name is omitted, try to
use the component name instead.

Signed-off-by: default avatarXiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 95ab1297
Loading
Loading
Loading
Loading
+7 −3
Original line number Original line Diff line number Diff line
@@ -4617,10 +4617,14 @@ int snd_soc_of_get_dai_name(struct device_node *of_node,


			if (id < 0 || id >= pos->num_dai) {
			if (id < 0 || id >= pos->num_dai) {
				ret = -EINVAL;
				ret = -EINVAL;
			} else {
				break;
				*dai_name = pos->dai_drv[id].name;
				ret = 0;
			}
			}

			ret = 0;

			*dai_name = pos->dai_drv[id].name;
			if (!*dai_name)
				*dai_name = pos->name;
		}
		}


		break;
		break;