From ac5bbf21bf38b3f5eaa8cb1e17f7513dc354afda Mon Sep 17 00:00:00 2001 From: Uwe Kleine-König Date: Thu, 6 Mar 2008 16:21:42 +0100 Subject: [ARM] 4851/1: ns9xxx: fix size of gpiores MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- arch/arm/mach-ns9xxx/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-ns9xxx/gpio.c') diff --git a/arch/arm/mach-ns9xxx/gpio.c b/arch/arm/mach-ns9xxx/gpio.c index b2230213b98..5286e9fc1d3 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) { -- cgit