Applied "ASoC: Intel: bytcr_rt5651: Not being able to find the codec ACPI-dev is an error" to the asoc tree

Message ID E1etZp1-0001L8-Cf@debutante
State Accepted
Commit e39cacc1b7de2a6d72ce49043c9cfd7dd129135a
Headers show
Series
  • Applied "ASoC: Intel: bytcr_rt5651: Not being able to find the codec ACPI-dev is an error" to the asoc tree
Related show

Commit Message

Mark Brown March 7, 2018, 2:13 p.m.
The patch

   ASoC: Intel: bytcr_rt5651: Not being able to find the codec ACPI-dev is an error

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

From e39cacc1b7de2a6d72ce49043c9cfd7dd129135a Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>

Date: Sun, 4 Mar 2018 15:35:58 +0100
Subject: [PATCH] ASoC: Intel: bytcr_rt5651: Not being able to find the codec
 ACPI-dev is an error

If we cannot find the codec ACPI-dev, then the snd-soc-core will not be
able to find the codec either and snd_soc_register_card() will just keep
exiting with -EPROBE_DEFER, filling the log with errors each time the
probe gets retried.

Instead simply log an error from the machine driver and exit with -ENODEV.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>

Signed-off-by: Mark Brown <broonie@kernel.org>

---
 sound/soc/intel/boards/bytcr_rt5651.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

-- 
2.16.2

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Patch

diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index 456526a93dd5..105339c5b693 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -540,12 +540,13 @@  static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
 
 	/* fixup codec name based on HID */
 	i2c_name = acpi_dev_get_first_match_name(mach->id, NULL, -1);
-	if (i2c_name) {
-		snprintf(byt_rt5651_codec_name, sizeof(byt_rt5651_codec_name),
-			"%s%s", "i2c-", i2c_name);
-
-		byt_rt5651_dais[dai_index].codec_name = byt_rt5651_codec_name;
+	if (!i2c_name) {
+		dev_err(&pdev->dev, "Error cannot find '%s' dev\n", mach->id);
+		return -ENODEV;
 	}
+	snprintf(byt_rt5651_codec_name, sizeof(byt_rt5651_codec_name),
+		"%s%s", "i2c-", i2c_name);
+	byt_rt5651_dais[dai_index].codec_name = byt_rt5651_codec_name;
 
 	/* check quirks before creating card */
 	dmi_check_system(byt_rt5651_quirk_table);