|
From: <ge...@op...> - 2018-04-26 16:25:56
|
This is an automated email from Gerrit. Paul Fertser (fer...@gm...) just uploaded a new patch set to Gerrit, which you can find at http://openocd.zylin.com/4502 -- gerrit commit 7c7f564810b0c6092df0e68adc04abbfff8ad3e5 Author: Paul Fertser <fer...@gm...> Date: Thu Apr 26 19:21:30 2018 +0300 jtag: drivers: sysfsgpio: lift upper gpio number limit Recent Linux maps GPIOs from 1023 downwards so do not limit the number to 1000. This should fix #183. Change-Id: I6d4f493b670be9ed9b82759f0fb686a9faddbbf5 Signed-off-by: Paul Fertser <fer...@gm...> diff --git a/src/jtag/drivers/sysfsgpio.c b/src/jtag/drivers/sysfsgpio.c index 5a4651d..91be43c 100644 --- a/src/jtag/drivers/sysfsgpio.c +++ b/src/jtag/drivers/sysfsgpio.c @@ -62,7 +62,7 @@ */ static int is_gpio_valid(int gpio) { - return gpio >= 0 && gpio < 1000; + return gpio >= 0 && gpio < 10000; } /* @@ -89,7 +89,7 @@ static int open_write_close(const char *name, const char *valstr) */ static void unexport_sysfs_gpio(int gpio) { - char gpiostr[4]; + char gpiostr[5]; if (!is_gpio_valid(gpio)) return; @@ -113,7 +113,7 @@ static void unexport_sysfs_gpio(int gpio) static int setup_sysfs_gpio(int gpio, int is_output, int init_high) { char buf[40]; - char gpiostr[4]; + char gpiostr[5]; int ret; if (!is_gpio_valid(gpio)) -- |