summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_codec.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-09-21 09:57:06 +0200
committerTakashi Iwai <tiwai@suse.de>2010-09-21 10:00:03 +0200
commit9e5341b92d1d2dde11691b394721b45b36416bef (patch)
tree987a81df30cec229d2af12f87c4b572ded04095d /sound/pci/hda/hda_codec.h
parent9396d3174b761685d6fefb1103e66b96a2e5db6d (diff)
ALSA: hda - Introduce hda_call_check_power_status() helper
Replace the explicit ifdef check and call of check_power_status ops with a new helper function, hda_call_check_power_status(). Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.h')
-rw-r--r--sound/pci/hda/hda_codec.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index 62c70224010..ebf8eb02e3c 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -989,6 +989,18 @@ int snd_hda_suspend(struct hda_bus *bus);
int snd_hda_resume(struct hda_bus *bus);
#endif
+#ifdef CONFIG_SND_HDA_POWER_SAVE
+static inline
+int hda_call_check_power_status(struct hda_codec *codec, hda_nid_t nid)
+{
+ if (codec->patch_ops.check_power_status)
+ return codec->patch_ops.check_power_status(codec, nid);
+ return 0;
+}
+#else
+#define hda_call_check_power_status(codec, nid) 0
+#endif
+
/*
* get widget information
*/