projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ALSA: pcm: Fix missing fixup call in compat hw_refine ioctl
[platform/kernel/linux-starfive.git]
/
sound
/
core
/
jack.c
diff --git
a/sound/core/jack.c
b/sound/core/jack.c
index
88493cc
..
03d155e
100644
(file)
--- a/
sound/core/jack.c
+++ b/
sound/core/jack.c
@@
-654,6
+654,7
@@
void snd_jack_report(struct snd_jack *jack, int status)
struct snd_jack_kctl *jack_kctl;
unsigned int mask_bits = 0;
#ifdef CONFIG_SND_JACK_INPUT_DEV
struct snd_jack_kctl *jack_kctl;
unsigned int mask_bits = 0;
#ifdef CONFIG_SND_JACK_INPUT_DEV
+ struct input_dev *idev;
int i;
#endif
int i;
#endif
@@
-670,17
+671,15
@@
void snd_jack_report(struct snd_jack *jack, int status)
status & jack_kctl->mask_bits);
#ifdef CONFIG_SND_JACK_INPUT_DEV
status & jack_kctl->mask_bits);
#ifdef CONFIG_SND_JACK_INPUT_DEV
- mutex_lock(&jack->input_dev_lock);
- if (!jack->input_dev) {
- mutex_unlock(&jack->input_dev_lock);
+ idev = input_get_device(jack->input_dev);
+ if (!idev)
return;
return;
- }
for (i = 0; i < ARRAY_SIZE(jack->key); i++) {
int testbit = ((SND_JACK_BTN_0 >> i) & ~mask_bits);
if (jack->type & testbit)
for (i = 0; i < ARRAY_SIZE(jack->key); i++) {
int testbit = ((SND_JACK_BTN_0 >> i) & ~mask_bits);
if (jack->type & testbit)
- input_report_key(
jack->input_
dev, jack->key[i],
+ input_report_key(
i
dev, jack->key[i],
status & testbit);
}
status & testbit);
}
@@
-688,13
+687,13
@@
void snd_jack_report(struct snd_jack *jack, int status)
int testbit = ((1 << i) & ~mask_bits);
if (jack->type & testbit)
int testbit = ((1 << i) & ~mask_bits);
if (jack->type & testbit)
- input_report_switch(
jack->input_
dev,
+ input_report_switch(
i
dev,
jack_switch_types[i],
status & testbit);
}
jack_switch_types[i],
status & testbit);
}
- input_sync(
jack->input_
dev);
-
mutex_unlock(&jack->input_dev_lock
);
+ input_sync(
i
dev);
+
input_put_device(idev
);
#endif /* CONFIG_SND_JACK_INPUT_DEV */
}
EXPORT_SYMBOL(snd_jack_report);
#endif /* CONFIG_SND_JACK_INPUT_DEV */
}
EXPORT_SYMBOL(snd_jack_report);