summaryrefslogtreecommitdiff
path: root/sound/hda
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2022-10-19 11:21:06 -0500
committerTakashi Iwai <tiwai@suse.de>2022-10-20 14:31:06 +0200
commit056b6ccc9d74136a106922f72b26eeef23af2ce8 (patch)
tree317609a28965049764f0b2d5eb55ccb4d8fc9882 /sound/hda
parent9abf2313adc1ca1b6180c508c25f22f9395cc780 (diff)
ALSA: hda: ext: hdac_ext_controller: use helpers in loop
No need to copy/paste code, use helper instead. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://lore.kernel.org/r/20221019162115.185917-2-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/hda')
-rw-r--r--sound/hda/ext/hdac_ext_controller.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sound/hda/ext/hdac_ext_controller.c b/sound/hda/ext/hdac_ext_controller.c
index 80876b9a87f4..f521d286a394 100644
--- a/sound/hda/ext/hdac_ext_controller.c
+++ b/sound/hda/ext/hdac_ext_controller.c
@@ -225,9 +225,7 @@ int snd_hdac_ext_bus_link_power_up_all(struct hdac_bus *bus)
int ret;
list_for_each_entry(hlink, &bus->hlink_list, list) {
- snd_hdac_updatel(hlink->ml_addr, AZX_REG_ML_LCTL,
- AZX_ML_LCTL_SPA, AZX_ML_LCTL_SPA);
- ret = check_hdac_link_power_active(hlink, true);
+ ret = snd_hdac_ext_bus_link_power_up(hlink);
if (ret < 0)
return ret;
}
@@ -246,9 +244,7 @@ int snd_hdac_ext_bus_link_power_down_all(struct hdac_bus *bus)
int ret;
list_for_each_entry(hlink, &bus->hlink_list, list) {
- snd_hdac_updatel(hlink->ml_addr, AZX_REG_ML_LCTL,
- AZX_ML_LCTL_SPA, 0);
- ret = check_hdac_link_power_active(hlink, false);
+ ret = snd_hdac_ext_bus_link_power_down(hlink);
if (ret < 0)
return ret;
}