The previous commit addressing the issue when requesting both types
of line events was braindead. Actually fix the bug this time: check
the event_type, not the eventflags.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
req->eventflags |= GPIOEVENT_EVENT_RISING_EDGE;
else if (config->event_type == GPIOD_EVENT_FALLING_EDGE)
req->eventflags |= GPIOEVENT_EVENT_FALLING_EDGE;
- else if (req->eventflags == GPIOD_EVENT_BOTH_EDGES)
+ else if (config->event_type == GPIOD_EVENT_BOTH_EDGES)
req->eventflags |= GPIOEVENT_REQUEST_BOTH_EDGES;
chip = gpiod_line_get_chip(line);