Skip to content

Commit

Permalink
Revert "Revert "ALSA: jack: Fix mutex call in snd_jack_report()""
Browse files Browse the repository at this point in the history
This reverts commit d472698.
  • Loading branch information
Royna2544 committed Oct 10, 2023
1 parent d263edb commit 3729671
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sound/core/jack.c
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,7 @@ void snd_jack_report(struct snd_jack *jack, int status)
{
struct snd_jack_kctl *jack_kctl;
#ifdef CONFIG_SND_JACK_INPUT_DEV
struct input_dev *idev;
int i;
#endif

Expand All @@ -384,14 +385,14 @@ void snd_jack_report(struct snd_jack *jack, int status)
int testbit = SND_JACK_BTN_0 >> i;

if (jack->type & testbit)
input_report_key(jack->input_dev, jack->key[i],
input_report_key(idev, jack->key[i],
status & testbit);
}

for (i = 0; i < ARRAY_SIZE(jack_switch_types); i++) {
int testbit = 1 << i;
if (jack->type & testbit)
input_report_switch(jack->input_dev,
input_report_switch(idev,
jack_switch_types[i],
status & testbit);
}
Expand Down

0 comments on commit 3729671

Please sign in to comment.