We're incorrectly passing the boolean active_low argument to
gpiod_line_request_both_edges_events_flags() as flags. Add the same
conversion as in the other simple API routines.
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
gpiod_event_cb callback, void *cbdata)
{
struct gpiod_line_event event;
+ int status, evtype, flags;
struct gpiod_chip *chip;
struct gpiod_line *line;
- int status, evtype;
chip = gpiod_chip_open_lookup(device);
if (!chip)
return -1;
}
+ flags = active_low ? GPIOD_REQUEST_ACTIVE_LOW : 0;
+
status = gpiod_line_request_both_edges_events_flags(line, consumer,
- active_low);
+ flags);
if (status < 0) {
gpiod_chip_close(chip);
return -1;