ALSA: hda - Get rid of action field from struct hda_jack_tbl
The action value assigned to each hda_jack_tbl entry is mostly superfluous. The actually used values are either the widget NID or a value specific to the callback. The former case can be simply replaced by a reference to widget NID itself. The only place doing the latter is STAC/IDT codec driver for the powermap handling. But, the code doesn't need to check the action field at all -- the function jack_update_power() is called either with a specific pin or with NULL. So the check of jack->action can be removed completely there, too. Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
@@ -592,8 +592,6 @@ static void via_jack_powerstate_event(struct hda_codec *codec, struct hda_jack_t
|
||||
set_widgets_power_state(codec);
|
||||
}
|
||||
|
||||
#define VIA_JACK_EVENT (HDA_GEN_LAST_EVENT + 1)
|
||||
|
||||
static void via_set_jack_unsol_events(struct hda_codec *codec)
|
||||
{
|
||||
struct via_spec *spec = codec->spec;
|
||||
@@ -610,7 +608,6 @@ static void via_set_jack_unsol_events(struct hda_codec *codec)
|
||||
if (pin && !snd_hda_jack_tbl_get(codec, pin) &&
|
||||
is_jack_detectable(codec, pin))
|
||||
snd_hda_jack_detect_enable_callback(codec, pin,
|
||||
VIA_JACK_EVENT,
|
||||
via_jack_powerstate_event);
|
||||
}
|
||||
|
||||
@@ -619,7 +616,6 @@ static void via_set_jack_unsol_events(struct hda_codec *codec)
|
||||
if (pin && !snd_hda_jack_tbl_get(codec, pin) &&
|
||||
is_jack_detectable(codec, pin))
|
||||
snd_hda_jack_detect_enable_callback(codec, pin,
|
||||
VIA_JACK_EVENT,
|
||||
via_jack_powerstate_event);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user