diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-02-19 16:51:17 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-02-19 21:41:18 +0100 |
commit | 364aa716f43c991052cbb4fa05e3754bacccb95c (patch) | |
tree | 1fdf59c3151ebf48a433c9dd4a6cb2bfee9c0193 /sound/pci/hda/hda_priv.h | |
parent | 922c88a8368a61ee93653d4a2888a7f4ce263102 (diff) | |
download | lwn-364aa716f43c991052cbb4fa05e3754bacccb95c.tar.gz lwn-364aa716f43c991052cbb4fa05e3754bacccb95c.zip |
ALSA: hda - Introduce azx_has_pm_runtime() macro
For making the debugging of runtime PM easier, introduce
azx_has_pm_runtime() and use it in all places checking the runtime pm
driver capability.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_priv.h')
-rw-r--r-- | sound/pci/hda/hda_priv.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_priv.h b/sound/pci/hda/hda_priv.h index daf458299753..a7b4a25c571c 100644 --- a/sound/pci/hda/hda_priv.h +++ b/sound/pci/hda/hda_priv.h @@ -403,4 +403,7 @@ struct azx { #define azx_sd_readb(chip, dev, reg) \ ((chip)->ops->reg_readb((dev)->sd_addr + AZX_REG_##reg)) +#define azx_has_pm_runtime(chip) \ + (!AZX_DCAPS_PM_RUNTIME || ((chip)->driver_caps & AZX_DCAPS_PM_RUNTIME)) + #endif /* __SOUND_HDA_PRIV_H */ |