Skip to content

Commit

Permalink
Blackfin arch: unify check_gpio() to reduce arch differences
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
  • Loading branch information
Mike Frysinger authored and Bryan Wu committed Oct 28, 2008
1 parent 588ba81 commit 27228b2
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions arch/blackfin/kernel/bfin_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 27228b2

Please sign in to comment.