]> www.infradead.org Git - users/jedix/linux-maple.git/commit
Input: adc-joystick - fix optional value handling
authorJohn Keeping <jkeeping@inmusicbrands.com>
Wed, 31 Jul 2024 09:33:09 +0000 (10:33 +0100)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 31 Jul 2024 17:20:43 +0000 (10:20 -0700)
commit684890a0185dabf5920c43b639133adc4c2632cf
treec3156da0fd385f8323f8359b83c181672c85d720
parentda897484557b34a54fabb81f6c223c19a69e546d
Input: adc-joystick - fix optional value handling

The abs-fuzz and abs-flat properties are documented as optional.  When
these are absent, fwnode_property_read_u32() will leave the input
unchanged, meaning that an axis either picks up the value for the
previous axis or an uninitialized value.

Explicitly set these values to zero when they are unspecified to match
the documented behaviour in the device tree bindings.

Signed-off-by: John Keeping <jkeeping@inmusicbrands.com>
Link: https://lore.kernel.org/r/20240731093310.3696919-1-jkeeping@inmusicbrands.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/joystick/adc-joystick.c