From: Arnaud Patard (Rtp) Date: Wed, 18 Apr 2012 21:16:39 +0000 (+0200) Subject: kirkwood/orion: fix orion_gpio_set_blink X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=92a486eabefadca1169fbf15d737feeaf2bda844;p=deliverable%2Flinux.git 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 Tested-By: Adam Baker Signed-off-by: Jason Cooper --- diff --git a/arch/arm/plat-orion/gpio.c b/arch/arm/plat-orion/gpio.c index 10d160888133..d3401e77ff3d 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) 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);