summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_jack.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-09-11 14:06:53 +0200
committerTakashi Iwai <tiwai@suse.de>2014-09-11 14:14:21 +0200
commit62f949bf6bf6ceb44872c44ef3913a96d93fb5d4 (patch)
tree6fb4df39d050165aa24243b80c4dc763d6b8e8c9 /sound/pci/hda/hda_jack.h
parent998052b74574699bdd1e451b6556e4d7667a7a4e (diff)
downloadlwn-62f949bf6bf6ceb44872c44ef3913a96d93fb5d4.tar.gz
lwn-62f949bf6bf6ceb44872c44ef3913a96d93fb5d4.zip
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/hda_jack.h')
-rw-r--r--sound/pci/hda/hda_jack.h22
1 files changed, 1 insertions, 21 deletions
diff --git a/sound/pci/hda/hda_jack.h b/sound/pci/hda/hda_jack.h
index 46e1ea83ce3c..c1abc7324d68 100644
--- a/sound/pci/hda/hda_jack.h
+++ b/sound/pci/hda/hda_jack.h
@@ -19,7 +19,6 @@ typedef void (*hda_jack_callback) (struct hda_codec *, struct hda_jack_tbl *);
struct hda_jack_tbl {
hda_nid_t nid;
- unsigned char action; /* event action (0 = none) */
unsigned char tag; /* unsol event tag */
unsigned int private_data; /* arbitrary data */
hda_jack_callback callback;
@@ -47,29 +46,10 @@ struct hda_jack_tbl *
snd_hda_jack_tbl_new(struct hda_codec *codec, hda_nid_t nid);
void snd_hda_jack_tbl_clear(struct hda_codec *codec);
-/**
- * snd_hda_jack_get_action - get jack-tbl entry for the tag
- *
- * Call this from the unsol event handler to get the assigned action for the
- * event. This will mark the dirty flag for the later reporting, too.
- */
-static inline unsigned char
-snd_hda_jack_get_action(struct hda_codec *codec, unsigned int tag)
-{
- struct hda_jack_tbl *jack = snd_hda_jack_tbl_get_from_tag(codec, tag);
- if (jack) {
- jack->jack_dirty = 1;
- return jack->action;
- }
- return 0;
-}
-
void snd_hda_jack_set_dirty_all(struct hda_codec *codec);
-int snd_hda_jack_detect_enable(struct hda_codec *codec, hda_nid_t nid,
- unsigned char action);
+int snd_hda_jack_detect_enable(struct hda_codec *codec, hda_nid_t nid);
int snd_hda_jack_detect_enable_callback(struct hda_codec *codec, hda_nid_t nid,
- unsigned char action,
hda_jack_callback cb);
int snd_hda_jack_set_gating_jack(struct hda_codec *codec, hda_nid_t gated_nid,