diff options
author | Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org> | 2012-04-18 17:16:39 -0400 |
---|---|---|
committer | Jason Cooper <jason@lakedaemon.net> | 2012-05-14 23:11:47 -0400 |
commit | 92a486eabefadca1169fbf15d737feeaf2bda844 (patch) | |
tree | c54589a861f2fc468242f7e0d82bc090efabfd0b /arch | |
parent | ee24876949c49761e61befe7435293069ddb1f38 (diff) |
kirkwood/orion: fix orion_gpio_set_blink
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 <arnaud.patard@rtp-net.org>
Tested-By: Adam Baker <linux@baker-net.org.uk>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/plat-orion/gpio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c index 10d16088813..d3401e77ff3 100644 --- a/arch/arm/plat-orion/gpio.c +++ b/arch/arm/plat-orion/gpio.c | |||
@@ -289,8 +289,8 @@ void orion_gpio_set_blink(unsigned pin, int blink) | |||
289 | return; | 289 | return; |
290 | 290 | ||
291 | spin_lock_irqsave(&ochip->lock, flags); | 291 | spin_lock_irqsave(&ochip->lock, flags); |
292 | __set_level(ochip, pin, 0); | 292 | __set_level(ochip, pin & 31, 0); |
293 | __set_blinking(ochip, pin, blink); | 293 | __set_blinking(ochip, pin & 31, blink); |
294 | spin_unlock_irqrestore(&ochip->lock, flags); | 294 | spin_unlock_irqrestore(&ochip->lock, flags); |
295 | } | 295 | } |
296 | EXPORT_SYMBOL(orion_gpio_set_blink); | 296 | EXPORT_SYMBOL(orion_gpio_set_blink); |