summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@perex.cz>2019-11-20 18:44:35 +0100
committerMark Brown <broonie@kernel.org>2019-11-22 20:54:50 +0100
commit39870b0dec68ed7dd814beb697e541670975c7d8 (patch)
tree6802b34020311555c17390850cbec125df69908d /sound
parentASoC: improve the DMI long card code in asoc-core (diff)
downloadlinux-39870b0dec68ed7dd814beb697e541670975c7d8.tar.xz
linux-39870b0dec68ed7dd814beb697e541670975c7d8.zip
ASoC: DMI long name - avoid to add board name if matches with product name
Current code: LENOVO-20QE000VMC-ThinkPadX1Carbon7th-20QE000VMC With the patch: LENOVO-20QE000VMC-ThinkPadX1Carbon7th Signed-off-by: Jaroslav Kysela <perex@perex.cz> Link: https://lore.kernel.org/r/20191120174435.30920-2-perex@perex.cz Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index a1f4d64a0a18..062653ab03a3 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1798,7 +1798,8 @@ int snd_soc_set_dmi_name(struct snd_soc_card *card, const char *flavour)
board = dmi_get_system_info(DMI_BOARD_NAME);
if (board && is_dmi_valid(board)) {
- append_dmi_string(card, board);
+ if (!product || strcasecmp(board, product))
+ append_dmi_string(card, board);
} else if (!product) {
/* fall back to using legacy name */
dev_warn(card->dev, "ASoC: no DMI board/product name!\n");