core: remove gpiod_simple_set_value()
authorBartosz Golaszewski <bartekgola@gmail.com>
Mon, 2 Jan 2017 16:49:35 +0000 (17:49 +0100)
committerBartosz Golaszewski <bartekgola@gmail.com>
Mon, 2 Jan 2017 16:49:35 +0000 (17:49 +0100)
This has been removed from gpiod.h and doesn't even work. Remove the
definition from core.c.

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

diff --git a/core.c b/core.c
index 328188b783aa68aaa3dbd6e00ca0376ad64aa9d2..9f34dda922ea53af823920bc0de9d6ada57d00b9 100644 (file)
--- 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;