From: Uwe Kleine-König Date: Thu, 6 Mar 2008 15:21:42 +0000 (+0100) Subject: [ARM] 4851/1: ns9xxx: fix size of gpiores X-Git-Tag: firefly_0821_release~22011^2~3 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ac5bbf21bf38b3f5eaa8cb1e17f7513dc354afda;p=firefly-linux-kernel-4.4.55.git [ARM] 4851/1: ns9xxx: fix size of gpiores GPIO_MAX is the number of the last gpio, not the number of gpios. So the bitmap must provide GPIO_MAX + 1 bits. Signed-off-by: Uwe Kleine-König Signed-off-by: Russell King --- diff --git a/arch/arm/mach-ns9xxx/gpio.c b/arch/arm/mach-ns9xxx/gpio.c index b2230213b983..5286e9fc1d30 100644 --- a/arch/arm/mach-ns9xxx/gpio.c +++ b/arch/arm/mach-ns9xxx/gpio.c @@ -31,7 +31,7 @@ static spinlock_t gpio_lock = __SPIN_LOCK_UNLOCKED(gpio_lock); /* only access gpiores with atomic ops */ -static DECLARE_BITMAP(gpiores, GPIO_MAX); +static DECLARE_BITMAP(gpiores, GPIO_MAX + 1); static inline int ns9xxx_valid_gpio(unsigned gpio) {