]> git.baikalelectronics.ru Git - kernel.git/commit
Input: adc-joystick - fix ordering in adc_joystick_probe()
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 2 Aug 2022 17:00:00 +0000 (10:00 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 2 Aug 2022 17:01:16 +0000 (10:01 -0700)
commit37c6911e51355577109e5c09c8700cc2c5ab627a
tree449d6e73cfa8c696ac1b3c44dcea3777f84e5636
parent627987f93d0f91c06f1847e8a700370d99d63147
Input: adc-joystick - fix ordering in adc_joystick_probe()

We should register the IIO buffer before we register the input device,
because as soon as the device is registered input handlers may attach to
it, resulting in a call to adc_joystick_open() which makes use of the said
buffer.

Acked-by: Artur Rojek <contact@artur-rojek.eu>
Link: https://lore.kernel.org/r/YskFh4NHnlcryMkk@google.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/joystick/adc-joystick.c