From: Bartosz Golaszewski Date: Fri, 23 Jun 2017 10:37:21 +0000 (+0200) Subject: core: event: use correct flags when requesting events X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=47aedf5a4388822b3e595955653c16e95809d3be;p=qemu-gpiodev%2Flibgpiod.git core: event: use correct flags when requesting events We must use the GPIOEVENT_REQUEST_* flags, not GPIOEVENT_EVENT_* since the latter are only meaningful when receiving event info. Signed-off-by: Bartosz Golaszewski --- diff --git a/src/lib/core.c b/src/lib/core.c index 1d46a04..680f5c1 100644 --- a/src/lib/core.c +++ b/src/lib/core.c @@ -822,9 +822,9 @@ int gpiod_line_event_request(struct gpiod_line *line, req->handleflags |= GPIOHANDLE_REQUEST_ACTIVE_LOW; if (config->event_type == GPIOD_EVENT_RISING_EDGE) - req->eventflags |= GPIOEVENT_EVENT_RISING_EDGE; + req->eventflags |= GPIOEVENT_REQUEST_RISING_EDGE; else if (config->event_type == GPIOD_EVENT_FALLING_EDGE) - req->eventflags |= GPIOEVENT_EVENT_FALLING_EDGE; + req->eventflags |= GPIOEVENT_REQUEST_FALLING_EDGE; else if (config->event_type == GPIOD_EVENT_BOTH_EDGES) req->eventflags |= GPIOEVENT_REQUEST_BOTH_EDGES;