core: use gpiod_line_event_get_fd() in gpiod_line_event_read()
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Mon, 16 Dec 2019 13:17:59 +0000 (14:17 +0100)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Tue, 17 Dec 2019 08:25:56 +0000 (09:25 +0100)
commitb5efbb148d34922e2744f35c2be7c8cc43efcfc9
treed53843e85a4d2f947f0b2c9ea5c9a4bb1bc3a047
parent4a7c45298235e1a4500c8a291dd241c863f72f52
core: use gpiod_line_event_get_fd() in gpiod_line_event_read()

We can drop the redundant line state check if we directly call
gpiod_line_event_get_fd() from gpiod_line_event_read(). As opposed
to line_get_fd() it checks if the line was requested for events.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
lib/core.c