Skip to content

Commit

Permalink
kirkwood/orion: fix orion_gpio_set_blink
Browse files Browse the repository at this point in the history
gpio registers are for 32 gpios. Given that orion_gpio_set_blink is called
directly and not through gpiolib, it needs to make sure that the pin value
given to the internal functions are between 0 and 31.

Signed-off-by: Arnaud Patard <[email protected]>
Tested-By: Adam Baker <[email protected]>
Signed-off-by: Jason Cooper <[email protected]>
  • Loading branch information
thertp authored and Jason Cooper committed May 15, 2012
1 parent ee24876 commit 92a486e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/plat-orion/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,8 @@ void orion_gpio_set_blink(unsigned pin, int blink)
return;

spin_lock_irqsave(&ochip->lock, flags);
__set_level(ochip, pin, 0);
__set_blinking(ochip, pin, blink);
__set_level(ochip, pin & 31, 0);
__set_blinking(ochip, pin & 31, blink);
spin_unlock_irqrestore(&ochip->lock, flags);
}
EXPORT_SYMBOL(orion_gpio_set_blink);
Expand Down

0 comments on commit 92a486e

Please sign in to comment.