From: Bartosz Golaszewski Date: Mon, 2 Jan 2017 16:49:35 +0000 (+0100) Subject: core: remove gpiod_simple_set_value() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=cd0c1a75d710afe3469c26417f7970194a6b25c5;p=qemu-gpiodev%2Flibgpiod.git core: remove gpiod_simple_set_value() This has been removed from gpiod.h and doesn't even work. Remove the definition from core.c. Signed-off-by: Bartosz Golaszewski --- diff --git a/core.c b/core.c index 328188b..9f34dda 100644 --- a/core.c +++ b/core.c @@ -123,35 +123,6 @@ int gpiod_simple_get_value(const char *device, unsigned int offset) return value; } -int gpiod_simple_set_value(const char *device, unsigned int offset, int value) -{ - struct gpiod_chip *chip; - struct gpiod_line *line; - int status; - - chip = gpiod_chip_open_lookup(device); - if (!chip) - return -1; - - line = gpiod_chip_get_line(chip, offset); - if (!line) { - gpiod_chip_close(chip); - return -1; - } - - status = gpiod_line_request(line, libgpiod_consumer, - GPIOD_DIRECTION_OUT, value, 0); - if (status < 0) { - gpiod_chip_close(chip); - return -1; - } - - gpiod_line_release(line); - gpiod_chip_close(chip); - - return status; -} - struct gpiod_line { bool requested; struct gpiod_chip *chip;