Skip to content

Commit

Permalink
[ARM] 4851/1: ns9xxx: fix size of gpiores
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Uwe Kleine-König authored and Russell King committed Mar 8, 2008
1 parent 5853e74 commit ac5bbf2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/mach-ns9xxx/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit ac5bbf2

Please sign in to comment.