summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBrian Norris <briannorris@chromium.org>2026-10-06 16:13:36 -0700
committerTakashi Iwai <tiwai@suse.de>2026-10-07 11:44:20 +0200
commiteb6237f64909d54540267581967293f2d423bb4c (patch)
treee9caf0d7fc0b6321710031e4c8d6433344394024 /include
parentccfe6ab672c020fca56988e634088bfb7764e2a7 (diff)
downloadlinux-next-eb6237f64909d54540267581967293f2d423bb4c.tar.gz
linux-next-eb6237f64909d54540267581967293f2d423bb4c.zip
ALSA: hda: Discard pm_runtime_put_autosuspend() return value
snd_hdac_power_down() and snd_hdac_power_down_pm() are defined to return an int, but their return values are never used by any caller. snd_hdac_power_down() also passes the return value of pm_runtime_put_autosuspend() to the caller, which is not very useful. Returning an error code from pm_runtime_put_autosuspend() merely means that it has not queued up a timer or work item to check whether or not the device can be suspended and there are many perfectly valid situations in which that can happen, like after writing "on" to the device's runtime PM "control" attribute in sysfs for one example. Modify snd_hdac_power_down() to discard the pm_runtime_put_autosuspend() return value and change the return types of snd_hdac_power_down() and snd_hdac_power_down_pm() to void. No intentional functional impact. This will facilitate a planned change of the pm_runtime_put_autosuspend() return type to void in the future, similar to commit 3afd8df02433 ("PM: runtime: Change pm_runtime_put() return type to void"). Signed-off-by: Brian Norris <briannorris@chromium.org> Link: https://patch.msgid.link/20261006161337.8.Idcada3ae757100bf3a38f7e71bac37f827be06c6@changeid Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/sound/hdaudio.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/sound/hdaudio.h b/include/sound/hdaudio.h
index aa994d6e6d35..4cbbb1744740 100644
--- a/include/sound/hdaudio.h
+++ b/include/sound/hdaudio.h
@@ -179,9 +179,9 @@ static inline int snd_hdac_read_parm(struct hdac_device *codec, hda_nid_t nid,
#ifdef CONFIG_PM
int snd_hdac_power_up(struct hdac_device *codec);
-int snd_hdac_power_down(struct hdac_device *codec);
+void snd_hdac_power_down(struct hdac_device *codec);
int snd_hdac_power_up_pm(struct hdac_device *codec);
-int snd_hdac_power_down_pm(struct hdac_device *codec);
+void snd_hdac_power_down_pm(struct hdac_device *codec);
int snd_hdac_keep_power_up(struct hdac_device *codec);
/* call this at entering into suspend/resume callbacks in codec driver */
@@ -207,9 +207,9 @@ static inline bool snd_hdac_is_power_on(struct hdac_device *codec)
}
#else
static inline int snd_hdac_power_up(struct hdac_device *codec) { return 0; }
-static inline int snd_hdac_power_down(struct hdac_device *codec) { return 0; }
+static inline void snd_hdac_power_down(struct hdac_device *codec) {}
static inline int snd_hdac_power_up_pm(struct hdac_device *codec) { return 0; }
-static inline int snd_hdac_power_down_pm(struct hdac_device *codec) { return 0; }
+static inline void snd_hdac_power_down_pm(struct hdac_device *codec) {}
static inline int snd_hdac_keep_power_up(struct hdac_device *codec) { return 0; }
static inline void snd_hdac_enter_pm(struct hdac_device *codec) {}
static inline void snd_hdac_leave_pm(struct hdac_device *codec) {}