aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2021-08-17 18:27:04 -0700
committerTakashi Iwai <tiwai@suse.de>2021-08-18 07:51:02 +0200
commitf8b32a6daf35f54f6260df7446e4069af64f0fcc (patch)
tree5cf4a30747a230a5005d1c1588ea1cc667495348 /sound/pci
parentALSA: hda: Drop workaround for a hang at shutdown again (diff)
downloadlinux-dev-f8b32a6daf35f54f6260df7446e4069af64f0fcc.tar.xz
linux-dev-f8b32a6daf35f54f6260df7446e4069af64f0fcc.zip
ALSA: hda/sigmatel - Sink stac_shutup() into stac_suspend()
When CONFIG_PM is not set, there is an unused function warning: sound/pci/hda/patch_sigmatel.c:4383:13: warning: unused function 'stac_shutup' [-Wunused-function] static void stac_shutup(struct hda_codec *codec) ^ 1 warning generated. Sink the contents of stac_shutup() into stac_suspend() since stac_shutup() is only called in that one location now. Fixes: 327b34f2a97d ("ALSA: hda: Nuke unused reboot_notify callback") Signed-off-by: Nathan Chancellor <nathan@kernel.org> Link: https://lore.kernel.org/r/20210818012705.311963-1-nathan@kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/patch_sigmatel.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 3e00116db86e..61df4d33c48f 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -4380,18 +4380,6 @@ static int stac_init(struct hda_codec *codec)
return 0;
}
-static void stac_shutup(struct hda_codec *codec)
-{
- struct sigmatel_spec *spec = codec->spec;
-
- snd_hda_shutup_pins(codec);
-
- if (spec->eapd_mask)
- stac_gpio_set(codec, spec->gpio_mask,
- spec->gpio_dir, spec->gpio_data &
- ~spec->eapd_mask);
-}
-
#define stac_free snd_hda_gen_free
#ifdef CONFIG_SND_PROC_FS
@@ -4444,7 +4432,15 @@ static void stac927x_proc_hook(struct snd_info_buffer *buffer,
#ifdef CONFIG_PM
static int stac_suspend(struct hda_codec *codec)
{
- stac_shutup(codec);
+ struct sigmatel_spec *spec = codec->spec;
+
+ snd_hda_shutup_pins(codec);
+
+ if (spec->eapd_mask)
+ stac_gpio_set(codec, spec->gpio_mask,
+ spec->gpio_dir, spec->gpio_data &
+ ~spec->eapd_mask);
+
return 0;
}
#else