mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
ALSA: jack: Fix system reboots after plugging in a 3.5mm audio accessory
Bug: 315271234 Change-Id: I71faf06dd31fecda3c295dcde86acaafa8c88a9b Signed-off-by: changyan <changyan@google.com> Signed-off-by: Richard Raya <rdxzv.dev@gmail.com>
This commit is contained in:
parent
63c80abec4
commit
b2353212a8
@ -374,7 +374,8 @@ void snd_jack_report(struct snd_jack *jack, int status)
|
||||
status & jack_kctl->mask_bits);
|
||||
|
||||
#ifdef CONFIG_SND_JACK_INPUT_DEV
|
||||
if (!jack->input_dev)
|
||||
idev = input_get_device(jack->input_dev);
|
||||
if (!idev)
|
||||
return;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(jack->key); i++) {
|
||||
@ -393,7 +394,8 @@ void snd_jack_report(struct snd_jack *jack, int status)
|
||||
status & testbit);
|
||||
}
|
||||
|
||||
input_sync(jack->input_dev);
|
||||
input_sync(idev);
|
||||
input_put_device(idev);
|
||||
#endif /* CONFIG_SND_JACK_INPUT_DEV */
|
||||
}
|
||||
EXPORT_SYMBOL(snd_jack_report);
|
||||
|
Loading…
x
Reference in New Issue
Block a user