summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2022-03-08 13:26:02 -0600
committerMark Brown <broonie@kernel.org>2022-03-09 13:30:25 +0000
commit42302b205f03c74c0226bbc79dca48448dd11d48 (patch)
treef864f814b9523584f4551e0e309ab739e8941925 /sound
parent5a6cfba5553b4f315b3d12b423e56a7fb9e8e0be (diff)
downloadlinux-42302b205f03c74c0226bbc79dca48448dd11d48.tar.bz2
ASoC: Intel: sof_es8336: get codec device with ACPI instead of bus search
We have an existing 'adev' handle from which we can find the codec device, no need for an I2C bus search. This change aligns this driver will all other I2S-based machine drivers. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://lore.kernel.org/r/20220308192610.392950-13-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/intel/boards/sof_es8336.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/intel/boards/sof_es8336.c b/sound/soc/intel/boards/sof_es8336.c
index eb792bd911fa..bb4a3491d71c 100644
--- a/sound/soc/intel/boards/sof_es8336.c
+++ b/sound/soc/intel/boards/sof_es8336.c
@@ -515,9 +515,10 @@ static int sof_es8336_probe(struct platform_device *pdev)
return ret;
/* get speaker enable GPIO */
- codec_dev = bus_find_device_by_name(&i2c_bus_type, NULL, codec_name);
+ codec_dev = acpi_get_first_physical_node(adev);
if (!codec_dev)
return -EPROBE_DEFER;
+ priv->codec_dev = get_device(codec_dev);
ret = devm_acpi_dev_add_driver_gpios(codec_dev, gpio_mapping);
if (ret)
@@ -530,7 +531,6 @@ static int sof_es8336_probe(struct platform_device *pdev)
goto err;
}
- priv->codec_dev = codec_dev;
INIT_LIST_HEAD(&priv->hdmi_pcm_list);
snd_soc_card_set_drvdata(card, priv);