提交 27228b2e 编写于 作者: M Mike Frysinger 提交者: Bryan Wu

Blackfin arch: unify check_gpio() to reduce arch differences

Signed-off-by: NMike Frysinger <vapier.adi@gmail.com>
Signed-off-by: NBryan Wu <cooloney@kernel.org>
上级 588ba819
......@@ -216,24 +216,18 @@ static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PROG0_INT
#endif
#endif /* CONFIG_PM */
#if defined(BF548_FAMILY)
inline int check_gpio(unsigned gpio)
{
#if defined(BF548_FAMILY)
if (gpio == GPIO_PB15 || gpio == GPIO_PC14 || gpio == GPIO_PC15
|| gpio == GPIO_PH14 || gpio == GPIO_PH15
|| gpio == GPIO_PJ14 || gpio == GPIO_PJ15
|| gpio >= MAX_BLACKFIN_GPIOS)
|| gpio == GPIO_PJ14 || gpio == GPIO_PJ15)
return -EINVAL;
return 0;
}
#else
inline int check_gpio(unsigned gpio)
{
#endif
if (gpio >= MAX_BLACKFIN_GPIOS)
return -EINVAL;
return 0;
}
#endif
static void gpio_error(unsigned gpio)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册