Commit 27228b2e authored by Mike Frysinger's avatar Mike Frysinger Committed by Bryan Wu

Blackfin arch: unify check_gpio() to reduce arch differences

Signed-off-by: default avatarMike Frysinger <vapier.adi@gmail.com>
Signed-off-by: default avatarBryan Wu <cooloney@kernel.org>
parent 588ba819
...@@ -216,24 +216,18 @@ static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PROG0_INT ...@@ -216,24 +216,18 @@ static unsigned int sic_iwr_irqs[gpio_bank(MAX_BLACKFIN_GPIOS)] = {IRQ_PROG0_INT
#endif #endif
#endif /* CONFIG_PM */ #endif /* CONFIG_PM */
#if defined(BF548_FAMILY)
inline int check_gpio(unsigned gpio) inline int check_gpio(unsigned gpio)
{ {
#if defined(BF548_FAMILY)
if (gpio == GPIO_PB15 || gpio == GPIO_PC14 || gpio == GPIO_PC15 if (gpio == GPIO_PB15 || gpio == GPIO_PC14 || gpio == GPIO_PC15
|| gpio == GPIO_PH14 || gpio == GPIO_PH15 || gpio == GPIO_PH14 || gpio == GPIO_PH15
|| gpio == GPIO_PJ14 || gpio == GPIO_PJ15 || gpio == GPIO_PJ14 || gpio == GPIO_PJ15)
|| gpio >= MAX_BLACKFIN_GPIOS)
return -EINVAL; return -EINVAL;
return 0; #endif
}
#else
inline int check_gpio(unsigned gpio)
{
if (gpio >= MAX_BLACKFIN_GPIOS) if (gpio >= MAX_BLACKFIN_GPIOS)
return -EINVAL; return -EINVAL;
return 0; return 0;
} }
#endif
static void gpio_error(unsigned gpio) static void gpio_error(unsigned gpio)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment