From 1f36d1adc9f4d8e5fef14b4876d6bf38d2262baf Mon Sep 17 00:00:00 2001 From: Mark Date: Sun, 27 Dec 2015 10:26:02 +0000 Subject: [PATCH] Update gpio device path to work with the latest raspbian --- src/gpio-admin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gpio-admin.c b/src/gpio-admin.c index 38569bb..faea863 100644 --- a/src/gpio-admin.c +++ b/src/gpio-admin.c @@ -27,7 +27,7 @@ static void usage_error(char **argv) { static void allow_access_by_user(unsigned int pin, const char *filename) { char path[PATH_MAX]; - int size = snprintf(path, PATH_MAX, "/sys/devices/virtual/gpio/gpio%u/%s", pin, filename); + int size = snprintf(path, PATH_MAX, "/sys/class/gpio/gpio%u/%s", pin, filename); if (size >= PATH_MAX) { error(7, 0, "path of GPIO pin is too long!");