summaryrefslogtreecommitdiff
path: root/sound/hda/hdac_component.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-12-09 12:04:25 +0300
committerTakashi Iwai <tiwai@suse.de>2018-12-11 10:18:25 +0300
commit4f799e734094f09feaae89ee75982fac84742c56 (patch)
treed4721bd977f2f554273b432c0b4453989ee773fd /sound/hda/hdac_component.c
parent457f3c86d3358beb0ae19774fef8a9035dedd88f (diff)
downloadlinux-4f799e734094f09feaae89ee75982fac84742c56.tar.xz
ALSA: hda: Make snd_hdac_display_power() void function
After the recent refactoring, snd_hdac_display_power() doesn't return any error, hence it can be defined to return void. This makes many error checks redundant and allows us to reduce them gracefully. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/hda/hdac_component.c')
-rw-r--r--sound/hda/hdac_component.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sound/hda/hdac_component.c b/sound/hda/hdac_component.c
index dd766414436b..a6d37b9d6413 100644
--- a/sound/hda/hdac_component.c
+++ b/sound/hda/hdac_component.c
@@ -62,10 +62,8 @@ EXPORT_SYMBOL_GPL(snd_hdac_set_codec_wakeup);
*
* This function updates the power status, and calls the get_power() and
* put_power() ops accordingly, toggling the codec wakeup, too.
- *
- * Returns zero for success or a negative error code.
*/
-int snd_hdac_display_power(struct hdac_bus *bus, unsigned int idx, bool enable)
+void snd_hdac_display_power(struct hdac_bus *bus, unsigned int idx, bool enable)
{
struct drm_audio_component *acomp = bus->audio_component;
@@ -77,7 +75,7 @@ int snd_hdac_display_power(struct hdac_bus *bus, unsigned int idx, bool enable)
clear_bit(idx, &bus->display_power_status);
if (!acomp || !acomp->ops)
- return 0;
+ return;
if (bus->display_power_status) {
if (!bus->display_power_active) {
@@ -94,8 +92,6 @@ int snd_hdac_display_power(struct hdac_bus *bus, unsigned int idx, bool enable)
bus->display_power_active = false;
}
}
-
- return 0;
}
EXPORT_SYMBOL_GPL(snd_hdac_display_power);