core: rework line handle & event requests
authorBartosz Golaszewski <bartekgola@gmail.com>
Tue, 10 Jan 2017 11:24:29 +0000 (12:24 +0100)
committerBartosz Golaszewski <bartekgola@gmail.com>
Tue, 10 Jan 2017 11:38:05 +0000 (12:38 +0100)
commitc7aed742754d9d5d4a59868fa577dbba083dfea3
treed4cb8f05b208cc52e2e5a411133732897ed5cb0b
parentda5537a17264711ec79dddb566527e79f9e178da
core: rework line handle & event requests

In order to correctly handle bulk requests create a separate,
refcounted structure for handle data.

Put the handle and event fields of struct gpiod_line into a union as
they can't be shared.

Add relevant helpers and use them in appropriate places.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
core.c