mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2026-01-03 11:30:24 +01:00
pad: don't warn about failure to initialize the LEDs on litest devices
We don't init the required /sysfs files, so let's not spew a lot of warnings during the test suite. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
cbe9a3bfc3
commit
df18c6b1aa
1 changed files with 12 additions and 1 deletions
|
|
@ -193,6 +193,13 @@ pad_group_new_basic(struct pad_dispatch *pad,
|
|||
return group;
|
||||
}
|
||||
|
||||
static inline bool
|
||||
is_litest_device(struct evdev_device *device)
|
||||
{
|
||||
return !!udev_device_get_property_value(device->udev_device,
|
||||
"LIBINPUT_TEST_DEVICE");
|
||||
}
|
||||
|
||||
static inline struct pad_led_group *
|
||||
pad_group_new(struct pad_dispatch *pad,
|
||||
unsigned int group_index,
|
||||
|
|
@ -228,7 +235,11 @@ pad_group_new(struct pad_dispatch *pad,
|
|||
return group;
|
||||
|
||||
error:
|
||||
log_error(libinput, "Unable to init LED group: %s\n", strerror(errno));
|
||||
if (!is_litest_device(pad->device))
|
||||
log_error(libinput,
|
||||
"%s: unable to init LED group: %s\n",
|
||||
pad->device->devname,
|
||||
strerror(errno));
|
||||
pad_led_group_destroy(&group->base);
|
||||
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue