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: v2.6.25-rc6~29^2~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac5bbf21bf38b3f5eaa8cb1e17f7513dc354afda;p=linux-2.6 [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 b2230213b9..5286e9fc1d 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) {