summaryrefslogtreecommitdiff
path: root/include/asm-generic/gpio.h
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2016-04-05 10:56:47 (GMT)
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2016-04-05 10:56:47 (GMT)
commit6ea7e3873e52902af9ee8c0837450fdb69d54140 (patch)
treeb291dad174446387a166763cfbf3dd351148ecbe /include/asm-generic/gpio.h
parent5ddfe0858ea7848c5d4efe3f4319e7543522e0ee (diff)
parentf55532a0c0b8bb6148f4e07853b876ef73bc69ca (diff)
downloadlinux-6ea7e3873e52902af9ee8c0837450fdb69d54140.tar.xz
Merge branch 'fixes-base' into fixes
Diffstat (limited to 'include/asm-generic/gpio.h')
-rw-r--r--include/asm-generic/gpio.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index 40ec143..8ca627d 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -26,8 +26,12 @@
*/
#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