summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-10-19 13:32:55 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2026-10-19 13:32:55 +0200
commit8669f2b6c96c89dab028b294fa069a672989afad (patch)
treefa144ffdad46ce94a2b34375d4d72d4a60e0cc4c /sound
parent5a44bb4863b15f3f73696cfa7ebd7dbd8add8217 (diff)
parent538076b45429652424801cb127581ed3dc56a0b7 (diff)
Merge branch 'acpi-driver'
Merge changes related to ACPI support in device drivers for 7.4: - Switch over the users of acpi_get_first_physical_node(), that was inherently racy and therefore not really safe to use, to use its replacement acpi_bus_get_primary_device(), and eliminate the former (Rafael Wysocki) - Add !CONFIG_ACPI stubs for acpi_find_child_device() and acpi_device_uid() (Mario Limonciello and Robin Murphy) * acpi-driver: ACPI: bus: Drop acpi_get_first_physical_node() efi/dev-path-parser: Switch to use acpi_bus_get_primary_device() ALSA: hda: tas2781: Switch to use acpi_bus_get_primary_device() ALSA: hda: cs35l41: Switch to use acpi_bus_get_primary_device() iommu/arm-smmu-v3: Switch to use acpi_bus_get_primary_device() ACPI: Add stub for acpi_find_child_device() ACPI: bus: Provide !ACPI stub for acpi_device_uid() ALSA: hda: aw88399: Switch to use acpi_bus_get_primary_device() ASoC: loongson: Switch to use acpi_bus_get_primary_device() ASoC: intel: boards: Switch to use acpi_bus_get_primary_device() ASoC: amd: acp3x-es83xx: Switch to use acpi_bus_get_primary_device() ASoC: amd: acp-es8336: Switch to use acpi_bus_get_primary_device() thunderbolt: Switch to use acpi_bus_get_primary_device() platform/x86: apple-gmux: Switch to use acpi_bus_get_primary_device() platform/x86: x86-android-tablets: Use acpi_bus_get_primary_device() platform/x86: serdev_helpers: Switch to use acpi_bus_get_primary_device() platform/x86: yogabook: Switch to use acpi_bus_get_primary_device() ACPI: amba: Switch to use acpi_bus_get_primary_device() ACPI: bus: Use acpi/acpi_bus.h without CONFIG_ACPI
Diffstat (limited to 'sound')
-rw-r--r--sound/hda/codecs/side-codecs/aw88399_hda.c3
-rw-r--r--sound/hda/codecs/side-codecs/cs35l41_hda.c3
-rw-r--r--sound/hda/codecs/side-codecs/tas2781_hda_i2c.c3
-rw-r--r--sound/hda/codecs/side-codecs/tas2781_hda_spi.c3
-rw-r--r--sound/soc/amd/acp-es8336.c2
-rw-r--r--sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c2
-rw-r--r--sound/soc/intel/boards/bytcht_es8316.c4
-rw-r--r--sound/soc/intel/boards/bytcr_rt5640.c4
-rw-r--r--sound/soc/intel/boards/bytcr_rt5651.c4
-rw-r--r--sound/soc/intel/boards/cht_bsw_rt5645.c5
-rw-r--r--sound/soc/intel/boards/sof_cirrus_common.c2
-rw-r--r--sound/soc/intel/boards/sof_es8336.c4
-rw-r--r--sound/soc/loongson/loongson_card.c3
13 files changed, 18 insertions, 24 deletions
diff --git a/sound/hda/codecs/side-codecs/aw88399_hda.c b/sound/hda/codecs/side-codecs/aw88399_hda.c
index 11cef4923024..439ad45557a4 100644
--- a/sound/hda/codecs/side-codecs/aw88399_hda.c
+++ b/sound/hda/codecs/side-codecs/aw88399_hda.c
@@ -209,8 +209,7 @@ static int aw88399_hda_acpi_probe(struct aw88399_hda *aw88399)
return -ENODEV;
}
- struct device *physdev __free(put_device) =
- get_device(acpi_get_first_physical_node(adev));
+ struct device *physdev __free(put_device) = acpi_bus_get_primary_device(adev);
acpi_dev_put(adev);
if (!physdev)
return -ENODEV;
diff --git a/sound/hda/codecs/side-codecs/cs35l41_hda.c b/sound/hda/codecs/side-codecs/cs35l41_hda.c
index 62296be45c55..32abb71dd401 100644
--- a/sound/hda/codecs/side-codecs/cs35l41_hda.c
+++ b/sound/hda/codecs/side-codecs/cs35l41_hda.c
@@ -1926,8 +1926,7 @@ static int cs35l41_hda_read_acpi(struct cs35l41_hda *cs35l41, const char *hid, i
}
cs35l41->dacpi = adev;
- struct device *physdev __free(put_device) =
- get_device(acpi_get_first_physical_node(adev));
+ struct device *physdev __free(put_device) = acpi_bus_get_primary_device(adev);
if (!physdev) {
acpi_dev_put(adev);
return -ENODEV;
diff --git a/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c b/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c
index 5e5f46c9fb6b..161ca965c63e 100644
--- a/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c
+++ b/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c
@@ -100,8 +100,7 @@ static int tas2781_read_acpi(struct tasdevice_priv *p, const char *hid)
return -ENODEV;
}
- struct device *physdev __free(put_device) =
- get_device(acpi_get_first_physical_node(adev));
+ struct device *physdev __free(put_device) = acpi_bus_get_primary_device(adev);
ret = acpi_dev_get_resources(adev, &resources, tas2781_get_i2c_res, p);
if (ret < 0) {
dev_err(p->dev, "Failed to get ACPI resource.\n");
diff --git a/sound/hda/codecs/side-codecs/tas2781_hda_spi.c b/sound/hda/codecs/side-codecs/tas2781_hda_spi.c
index da71b57a26ee..f3ba7132d2b8 100644
--- a/sound/hda/codecs/side-codecs/tas2781_hda_spi.c
+++ b/sound/hda/codecs/side-codecs/tas2781_hda_spi.c
@@ -341,8 +341,7 @@ static int tas2781_read_acpi(struct tas2781_hda *tas_hda,
strscpy(p->dev_name, hid, sizeof(p->dev_name));
- struct device *physdev __free(put_device) =
- get_device(acpi_get_first_physical_node(adev));
+ struct device *physdev __free(put_device) = acpi_bus_get_primary_device(adev);
acpi_dev_put(adev);
if (!physdev)
return -ENODEV;
diff --git a/sound/soc/amd/acp-es8336.c b/sound/soc/amd/acp-es8336.c
index 9f3f11256788..34e953d1a3a7 100644
--- a/sound/soc/amd/acp-es8336.c
+++ b/sound/soc/amd/acp-es8336.c
@@ -198,7 +198,7 @@ static int st_es8336_late_probe(struct snd_soc_card *card)
if (!adev)
return -ENODEV;
- codec_dev = acpi_get_first_physical_node(adev);
+ codec_dev = acpi_bus_get_primary_device(adev);
acpi_dev_put(adev);
if (!codec_dev) {
dev_err(card->dev, "can not find codec dev\n");
diff --git a/sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c b/sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c
index 3a640e652314..c522b421e1ec 100644
--- a/sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c
+++ b/sound/soc/amd/acp/acp3x-es83xx/acp3x-es83xx.c
@@ -428,7 +428,7 @@ static int acp3x_es83xx_probe(struct snd_soc_card *card)
return -ENXIO;
}
- codec_dev = acpi_get_first_physical_node(adev);
+ codec_dev = acpi_bus_get_primary_device(adev);
acpi_dev_put(adev);
if (!codec_dev) {
dev_warn(dev, "Error cannot find codec device, will defer probe\n");
diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c
index ea387dc74273..4d8d1d176a49 100644
--- a/sound/soc/intel/boards/bytcht_es8316.c
+++ b/sound/soc/intel/boards/bytcht_es8316.c
@@ -601,11 +601,11 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)
return -ENOENT;
}
- codec_dev = acpi_get_first_physical_node(adev);
+ codec_dev = acpi_bus_get_primary_device(adev);
acpi_dev_put(adev);
if (!codec_dev)
return -EPROBE_DEFER;
- priv->codec_dev = get_device(codec_dev);
+ priv->codec_dev = codec_dev;
/* override platform name, if required */
byt_cht_es8316_card.dev = dev;
diff --git a/sound/soc/intel/boards/bytcr_rt5640.c b/sound/soc/intel/boards/bytcr_rt5640.c
index 40da3eea5fa7..c84b9a0fe65a 100644
--- a/sound/soc/intel/boards/bytcr_rt5640.c
+++ b/sound/soc/intel/boards/bytcr_rt5640.c
@@ -1744,11 +1744,11 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev)
return -ENOENT;
}
- codec_dev = acpi_get_first_physical_node(adev);
+ codec_dev = acpi_bus_get_primary_device(adev);
acpi_dev_put(adev);
if (codec_dev) {
- priv->codec_dev = get_device(codec_dev);
+ priv->codec_dev = codec_dev;
} else {
/*
* Special case for Android tablets where the codec i2c_client
diff --git a/sound/soc/intel/boards/bytcr_rt5651.c b/sound/soc/intel/boards/bytcr_rt5651.c
index c9b1053205de..fbfaf0b351c9 100644
--- a/sound/soc/intel/boards/bytcr_rt5651.c
+++ b/sound/soc/intel/boards/bytcr_rt5651.c
@@ -960,11 +960,11 @@ static int snd_byt_rt5651_mc_probe(struct platform_device *pdev)
return -ENOENT;
}
- codec_dev = acpi_get_first_physical_node(adev);
+ codec_dev = acpi_bus_get_primary_device(adev);
acpi_dev_put(adev);
if (!codec_dev)
return -EPROBE_DEFER;
- priv->codec_dev = get_device(codec_dev);
+ priv->codec_dev = codec_dev;
/*
* swap SSP0 if bytcr is detected
diff --git a/sound/soc/intel/boards/cht_bsw_rt5645.c b/sound/soc/intel/boards/cht_bsw_rt5645.c
index 249be121be15..4f20928a3604 100644
--- a/sound/soc/intel/boards/cht_bsw_rt5645.c
+++ b/sound/soc/intel/boards/cht_bsw_rt5645.c
@@ -529,7 +529,6 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
const char *platform_name;
struct cht_mc_private *drv;
struct acpi_device *adev;
- struct device *codec_dev;
bool sof_parent;
bool found = false;
bool is_bytcr = false;
@@ -583,8 +582,8 @@ static int snd_cht_mc_probe(struct platform_device *pdev)
return -ENOENT;
}
- /* acpi_get_first_physical_node() returns a borrowed ref, no need to deref */
- codec_dev = acpi_get_first_physical_node(adev);
+ struct device *codec_dev __free(put_device) = acpi_bus_get_primary_device(adev);
+
acpi_dev_put(adev);
if (!codec_dev)
return -EPROBE_DEFER;
diff --git a/sound/soc/intel/boards/sof_cirrus_common.c b/sound/soc/intel/boards/sof_cirrus_common.c
index 88fc6cb2bfd4..a4ecb1f9a615 100644
--- a/sound/soc/intel/boards/sof_cirrus_common.c
+++ b/sound/soc/intel/boards/sof_cirrus_common.c
@@ -168,7 +168,7 @@ static int cs35l41_compute_codec_conf(void)
cs35l41_name_prefixes[uid]);
continue;
}
- physdev = get_device(acpi_get_first_physical_node(adev));
+ physdev = acpi_bus_get_primary_device(adev);
acpi_dev_put(adev);
if (!physdev) {
pr_devel("Cannot find physical node for HID %s UID %u (%s)\n", CS35L41_HID,
diff --git a/sound/soc/intel/boards/sof_es8336.c b/sound/soc/intel/boards/sof_es8336.c
index f1e62c2e79fe..d40f10c6ae54 100644
--- a/sound/soc/intel/boards/sof_es8336.c
+++ b/sound/soc/intel/boards/sof_es8336.c
@@ -702,11 +702,11 @@ static int sof_es8336_probe(struct platform_device *pdev)
return -ENOENT;
}
- codec_dev = acpi_get_first_physical_node(adev);
+ codec_dev = acpi_bus_get_primary_device(adev);
acpi_dev_put(adev);
if (!codec_dev)
return -EPROBE_DEFER;
- priv->codec_dev = get_device(codec_dev);
+ priv->codec_dev = codec_dev;
ret = snd_soc_fixup_dai_links_platform_name(&sof_es8336_card,
mach->mach_params.platform);
diff --git a/sound/soc/loongson/loongson_card.c b/sound/soc/loongson/loongson_card.c
index 6422cc1703b6..9f3907278462 100644
--- a/sound/soc/loongson/loongson_card.c
+++ b/sound/soc/loongson/loongson_card.c
@@ -196,7 +196,6 @@ static int loongson_card_parse_acpi(struct loongson_card_data *data)
struct snd_soc_card *card = &data->snd_card;
const char *codec_dai_name;
struct acpi_device *adev;
- struct device *phy_dev;
int i, ret;
/* fixup platform name based on reference node */
@@ -204,7 +203,7 @@ static int loongson_card_parse_acpi(struct loongson_card_data *data)
if (!adev)
return -ENOENT;
- phy_dev = acpi_get_first_physical_node(adev);
+ struct device *phy_dev __free(put_device) = acpi_bus_get_primary_device(adev);
if (!phy_dev)
return -EPROBE_DEFER;