提交 92a486ea 编写于 作者: A Arnaud Patard (Rtp) 提交者: Jason Cooper

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: NArnaud Patard <arnaud.patard@rtp-net.org>
Tested-By: NAdam Baker <linux@baker-net.org.uk>
Signed-off-by: NJason Cooper <jason@lakedaemon.net>
上级 ee248769
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册