X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/546b5ed544503182a9b3e981bc11feebd6042b21..57a811ea667a96731d9eb49ef553c79dc7ee9eb4:/target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/gpio.h diff --git a/target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/gpio.h b/target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/gpio.h index 347727001..6354d68cf 100644 --- a/target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/gpio.h +++ b/target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/gpio.h @@ -18,6 +18,7 @@ #include +extern unsigned long ar71xx_gpio_count; extern void __ar71xx_gpio_set_value(unsigned gpio, int value); extern int __ar71xx_gpio_get_value(unsigned gpio); @@ -33,7 +34,7 @@ static inline int irq_to_gpio(unsigned irq) static inline int gpio_get_value(unsigned gpio) { - if (gpio < AR71XX_GPIO_COUNT) + if (gpio < ar71xx_gpio_count) return __ar71xx_gpio_get_value(gpio); return __gpio_get_value(gpio); @@ -41,7 +42,7 @@ static inline int gpio_get_value(unsigned gpio) static inline void gpio_set_value(unsigned gpio, int value) { - if (gpio < AR71XX_GPIO_COUNT) + if (gpio < ar71xx_gpio_count) __ar71xx_gpio_set_value(gpio, value); else __gpio_set_value(gpio, value);