mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
ALSA: hda - fix unused Realtek function when PM is not enabled
[ Upstream commitc3d9ca93f1] When CONFIG_PM is not enabled, alc_shutup() is not needed, so move it inside the #ifdef CONFIG_PM guard. Also drop some contiguous #endif / #ifdef CONFIG_PM for simplicity. Fixes this build warning: sound/pci/hda/patch_realtek.c:886:20: warning: unused function 'alc_shutup' Fixes:08c189f2c5("ALSA: hda - Use generic parser codes for Realtek driver") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/r/20220430193318.29024-1-rdunlap@infradead.org Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
84b6e3d589
commit
636184fd1b
|
|
@ -932,6 +932,9 @@ static int alc_init(struct hda_codec *codec)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#define alc_free snd_hda_gen_free
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static inline void alc_shutup(struct hda_codec *codec)
|
||||
{
|
||||
struct alc_spec *spec = codec->spec;
|
||||
|
|
@ -945,9 +948,6 @@ static inline void alc_shutup(struct hda_codec *codec)
|
|||
alc_shutup_pins(codec);
|
||||
}
|
||||
|
||||
#define alc_free snd_hda_gen_free
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static void alc_power_eapd(struct hda_codec *codec)
|
||||
{
|
||||
alc_auto_setup_eapd(codec, false);
|
||||
|
|
@ -961,9 +961,7 @@ static int alc_suspend(struct hda_codec *codec)
|
|||
spec->power_hook(codec);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static int alc_resume(struct hda_codec *codec)
|
||||
{
|
||||
struct alc_spec *spec = codec->spec;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user