浏览代码

[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 <Uwe.Kleine-Koenig@digi.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Uwe Kleine-König 17 年之前
父节点
当前提交
ac5bbf21bf
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      arch/arm/mach-ns9xxx/gpio.c

+ 1 - 1
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)
 {