Skip to content

Commit 03002d1

Browse files
committed
ALSA: hda: realtek: Reduce CONFIG_PM dependencies
CONFIG_PM dependencies got reduced in HD-audio codec core driver, and now it's time to reduce in HD-audio realtek codec driver, too. Simply drop CONFIG_PM ifdefs. A superfluous __maybe_unused attribute was dropped as well. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20240506161359.6960-11-tiwai@suse.de
1 parent aa423b7 commit 03002d1

1 file changed

Lines changed: 1 addition & 15 deletions

File tree

sound/pci/hda/patch_realtek.c

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,7 @@ struct alc_spec {
109109

110110
/* hooks */
111111
void (*init_hook)(struct hda_codec *codec);
112-
#ifdef CONFIG_PM
113112
void (*power_hook)(struct hda_codec *codec);
114-
#endif
115113
void (*shutup)(struct hda_codec *codec);
116114

117115
int init_amp;
@@ -947,7 +945,6 @@ static int alc_init(struct hda_codec *codec)
947945

948946
#define alc_free snd_hda_gen_free
949947

950-
#ifdef CONFIG_PM
951948
static inline void alc_shutup(struct hda_codec *codec)
952949
{
953950
struct alc_spec *spec = codec->spec;
@@ -986,7 +983,6 @@ static int alc_resume(struct hda_codec *codec)
986983
hda_call_check_power_status(codec, 0x01);
987984
return 0;
988985
}
989-
#endif
990986

991987
/*
992988
*/
@@ -996,11 +992,9 @@ static const struct hda_codec_ops alc_patch_ops = {
996992
.init = alc_init,
997993
.free = alc_free,
998994
.unsol_event = snd_hda_jack_unsol_event,
999-
#ifdef CONFIG_PM
1000995
.resume = alc_resume,
1001996
.suspend = alc_suspend,
1002997
.check_power_status = snd_hda_gen_check_power_status,
1003-
#endif
1004998
};
1005999

10061000

@@ -4041,7 +4035,6 @@ static void alc5505_dsp_init(struct hda_codec *codec)
40414035
#define alc5505_dsp_resume(codec) alc5505_dsp_back_from_halt(codec)
40424036
#endif
40434037

4044-
#ifdef CONFIG_PM
40454038
static int alc269_suspend(struct hda_codec *codec)
40464039
{
40474040
struct alc_spec *spec = codec->spec;
@@ -4087,7 +4080,6 @@ static int alc269_resume(struct hda_codec *codec)
40874080

40884081
return 0;
40894082
}
4090-
#endif /* CONFIG_PM */
40914083

40924084
static void alc269_fixup_pincfg_no_hp_to_lineout(struct hda_codec *codec,
40934085
const struct hda_fixup *fix, int action)
@@ -7204,7 +7196,7 @@ static void alc287_alc1318_playback_pcm_hook(struct hda_pcm_stream *hinfo,
72047196
}
72057197
}
72067198

7207-
static void __maybe_unused alc287_s4_power_gpio3_default(struct hda_codec *codec)
7199+
static void alc287_s4_power_gpio3_default(struct hda_codec *codec)
72087200
{
72097201
if (is_s4_suspend(codec)) {
72107202
alc_write_coef_idx(codec, 0x10, 0x8806); /* Change MLK to GPIO3 */
@@ -7219,9 +7211,7 @@ static void alc287_fixup_lenovo_thinkpad_with_alc1318(struct hda_codec *codec,
72197211

72207212
if (action != HDA_FIXUP_ACT_PRE_PROBE)
72217213
return;
7222-
#ifdef CONFIG_PM
72237214
spec->power_hook = alc287_s4_power_gpio3_default;
7224-
#endif
72257215
spec->gen.pcm_playback_hook = alc287_alc1318_playback_pcm_hook;
72267216
}
72277217

@@ -11287,10 +11277,8 @@ static int patch_alc269(struct hda_codec *codec)
1128711277
codec->power_save_node = 0;
1128811278
spec->en_3kpull_low = true;
1128911279

11290-
#ifdef CONFIG_PM
1129111280
codec->patch_ops.suspend = alc269_suspend;
1129211281
codec->patch_ops.resume = alc269_resume;
11293-
#endif
1129411282
spec->shutup = alc_default_shutup;
1129511283
spec->init_hook = alc_default_init;
1129611284

@@ -11588,9 +11576,7 @@ static int patch_alc861(struct hda_codec *codec)
1158811576
if (has_cdefine_beep(codec))
1158911577
spec->gen.beep_nid = 0x23;
1159011578

11591-
#ifdef CONFIG_PM
1159211579
spec->power_hook = alc_power_eapd;
11593-
#endif
1159411580

1159511581
alc_pre_init(codec);
1159611582

0 commit comments

Comments
 (0)