aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_via.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-09-11 08:06:53 -0400
committerTakashi Iwai <tiwai@suse.de>2014-09-11 08:14:21 -0400
commit62f949bf6bf6ceb44872c44ef3913a96d93fb5d4 (patch)
tree6fb4df39d050165aa24243b80c4dc763d6b8e8c9 /sound/pci/hda/patch_via.c
parent998052b74574699bdd1e451b6556e4d7667a7a4e (diff)
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>
Diffstat (limited to 'sound/pci/hda/patch_via.c')
-rw-r--r--sound/pci/hda/patch_via.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index 778166259b3e..2a8be5a5da15 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -592,8 +592,6 @@ static void via_jack_powerstate_event(struct hda_codec *codec, struct hda_jack_t
592 set_widgets_power_state(codec); 592 set_widgets_power_state(codec);
593} 593}
594 594
595#define VIA_JACK_EVENT (HDA_GEN_LAST_EVENT + 1)
596
597static void via_set_jack_unsol_events(struct hda_codec *codec) 595static void via_set_jack_unsol_events(struct hda_codec *codec)
598{ 596{
599 struct via_spec *spec = codec->spec; 597 struct via_spec *spec = codec->spec;
@@ -610,7 +608,6 @@ static void via_set_jack_unsol_events(struct hda_codec *codec)
610 if (pin && !snd_hda_jack_tbl_get(codec, pin) && 608 if (pin && !snd_hda_jack_tbl_get(codec, pin) &&
611 is_jack_detectable(codec, pin)) 609 is_jack_detectable(codec, pin))
612 snd_hda_jack_detect_enable_callback(codec, pin, 610 snd_hda_jack_detect_enable_callback(codec, pin,
613 VIA_JACK_EVENT,
614 via_jack_powerstate_event); 611 via_jack_powerstate_event);
615 } 612 }
616 613
@@ -619,7 +616,6 @@ static void via_set_jack_unsol_events(struct hda_codec *codec)
619 if (pin && !snd_hda_jack_tbl_get(codec, pin) && 616 if (pin && !snd_hda_jack_tbl_get(codec, pin) &&
620 is_jack_detectable(codec, pin)) 617 is_jack_detectable(codec, pin))
621 snd_hda_jack_detect_enable_callback(codec, pin, 618 snd_hda_jack_detect_enable_callback(codec, pin,
622 VIA_JACK_EVENT,
623 via_jack_powerstate_event); 619 via_jack_powerstate_event);
624 } 620 }
625} 621}