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: http://review.tizen.org/git/?a=commitdiff_plain;h=ac5bbf21bf38b3f5eaa8cb1e17f7513dc354afda;p=profile%2Fivi%2Fkernel-x86-ivi.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 b223021..5286e9f 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) {