aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sound/soc/intel/boards/bytcht_es8316.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c
index d2a7e6ba11ae..6937c00cf63d 100644
--- a/sound/soc/intel/boards/bytcht_es8316.c
+++ b/sound/soc/intel/boards/bytcht_es8316.c
@@ -442,7 +442,7 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)
442 struct device *dev = &pdev->dev; 442 struct device *dev = &pdev->dev;
443 struct snd_soc_acpi_mach *mach; 443 struct snd_soc_acpi_mach *mach;
444 const char *platform_name; 444 const char *platform_name;
445 const char *i2c_name = NULL; 445 struct acpi_device *adev;
446 struct device *codec_dev; 446 struct device *codec_dev;
447 int dai_index = 0; 447 int dai_index = 0;
448 int i; 448 int i;
@@ -463,10 +463,11 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)
463 } 463 }
464 464
465 /* fixup codec name based on HID */ 465 /* fixup codec name based on HID */
466 i2c_name = acpi_dev_get_first_match_name(mach->id, NULL, -1); 466 adev = acpi_dev_get_first_match_dev(mach->id, NULL, -1);
467 if (i2c_name) { 467 if (adev) {
468 snprintf(codec_name, sizeof(codec_name), 468 snprintf(codec_name, sizeof(codec_name),
469 "%s%s", "i2c-", i2c_name); 469 "i2c-%s", acpi_dev_name(adev));
470 put_device(&adev->dev);
470 byt_cht_es8316_dais[dai_index].codec_name = codec_name; 471 byt_cht_es8316_dais[dai_index].codec_name = codec_name;
471 } 472 }
472 473