Commit 327b34f2 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: hda: Nuke unused reboot_notify callback

As reboot_notify callback is no longer used by the codec core, let's
get rid of the unused code.  Conexant codec needs a slight code change
as it used to call the reboot_notify at the codec removal, too.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=214045
Link: https://lore.kernel.org/r/20210813081230.4268-4-tiwai@suse.de


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent b98444ed
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -114,7 +114,6 @@ struct hda_codec_ops {
	int (*resume)(struct hda_codec *codec);
	int (*check_power_status)(struct hda_codec *codec, hda_nid_t nid);
#endif
	void (*reboot_notify)(struct hda_codec *codec);
	void (*stream_pm)(struct hda_codec *codec, hda_nid_t nid, bool on);
};

+0 −19
Original line number Diff line number Diff line
@@ -6000,24 +6000,6 @@ void snd_hda_gen_free(struct hda_codec *codec)
}
EXPORT_SYMBOL_GPL(snd_hda_gen_free);

/**
 * snd_hda_gen_reboot_notify - Make codec enter D3 before rebooting
 * @codec: the HDA codec
 *
 * This can be put as patch_ops reboot_notify function.
 */
void snd_hda_gen_reboot_notify(struct hda_codec *codec)
{
	/* Make the codec enter D3 to avoid spurious noises from the internal
	 * speaker during (and after) reboot
	 */
	snd_hda_codec_set_power_to_all(codec, codec->core.afg, AC_PWRST_D3);
	snd_hda_codec_write(codec, codec->core.afg, 0,
			    AC_VERB_SET_POWER_STATE, AC_PWRST_D3);
	msleep(10);
}
EXPORT_SYMBOL_GPL(snd_hda_gen_reboot_notify);

#ifdef CONFIG_PM
/**
 * snd_hda_gen_check_power_status - check the loopback power save state
@@ -6045,7 +6027,6 @@ static const struct hda_codec_ops generic_patch_ops = {
	.init = snd_hda_gen_init,
	.free = snd_hda_gen_free,
	.unsol_event = snd_hda_jack_unsol_event,
	.reboot_notify = snd_hda_gen_reboot_notify,
#ifdef CONFIG_PM
	.check_power_status = snd_hda_gen_check_power_status,
#endif
+0 −1
Original line number Diff line number Diff line
@@ -324,7 +324,6 @@ int snd_hda_gen_parse_auto_config(struct hda_codec *codec,
				  struct auto_pin_cfg *cfg);
int snd_hda_gen_build_controls(struct hda_codec *codec);
int snd_hda_gen_build_pcms(struct hda_codec *codec);
void snd_hda_gen_reboot_notify(struct hda_codec *codec);

/* standard jack event callbacks */
void snd_hda_gen_hp_automute(struct hda_codec *codec,
+0 −1
Original line number Diff line number Diff line
@@ -168,7 +168,6 @@ static const struct hda_codec_ops ad198x_auto_patch_ops = {
	.check_power_status = snd_hda_gen_check_power_status,
	.suspend = ad198x_suspend,
#endif
	.reboot_notify = ad198x_shutup,
};


+0 −6
Original line number Diff line number Diff line
@@ -9682,11 +9682,6 @@ static void dbpro_free(struct hda_codec *codec)
	kfree(codec->spec);
}

static void ca0132_reboot_notify(struct hda_codec *codec)
{
	codec->patch_ops.free(codec);
}

#ifdef CONFIG_PM
static int ca0132_suspend(struct hda_codec *codec)
{
@@ -9706,7 +9701,6 @@ static const struct hda_codec_ops ca0132_patch_ops = {
#ifdef CONFIG_PM
	.suspend = ca0132_suspend,
#endif
	.reboot_notify = ca0132_reboot_notify,
};

static const struct hda_codec_ops dbpro_patch_ops = {
Loading