The helper function uses abs.value for the axis code (to save a parameter).
Reset that to 0 before we write to the device
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
va_end(args);
while (--nabs >= 0) {
- rc = uinput_device_set_abs_bit(uidev, abs[nabs].value, &abs[nabs]);
+ int code;
+ struct input_absinfo a;
+
+ code = abs[nabs].value;
+ a = abs[nabs];
+ a.value = 0;
+
+ rc = uinput_device_set_abs_bit(uidev, code, &a);
ck_assert_msg(rc == 0, "for abs field %d\n", nabs);
}