Merge tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[linux-2.6-block.git] / include / asm-generic / gpio.h
index 40ec1433f05de25d15cedaeaf2388b2cc8d0298c..8ca627dcea11096b992135679571fa44bba0ee32 100644 (file)
  */
 
 #ifndef ARCH_NR_GPIOS
+#if defined(CONFIG_ARCH_NR_GPIO) && CONFIG_ARCH_NR_GPIO > 0
+#define ARCH_NR_GPIOS CONFIG_ARCH_NR_GPIO
+#else
 #define ARCH_NR_GPIOS          512
 #endif
+#endif
 
 /*
  * "valid" GPIO numbers are nonnegative and may be passed to