summaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel/bfin_gpio.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier.adi@gmail.com>2008-10-28 15:45:42 +0800
committerBryan Wu <cooloney@kernel.org>2008-10-28 15:45:42 +0800
commit27228b2e4c1726a376b32f8b12242718ebf5b8a4 (patch)
tree9625f0ad9a0ab0d1468fd46ef474d20400aa78fd /arch/blackfin/kernel/bfin_gpio.c
parent588ba8199e06e4d558114093d0b5812920035c72 (diff)
downloadop-kernel-dev-27228b2e4c1726a376b32f8b12242718ebf5b8a4.zip
op-kernel-dev-27228b2e4c1726a376b32f8b12242718ebf5b8a4.tar.gz
Blackfin arch: unify check_gpio() to reduce arch differences
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Diffstat (limited to 'arch/blackfin/kernel/bfin_gpio.c')
-rw-r--r--arch/blackfin/kernel/bfin_gpio.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c
index 5556e13..a808baf 100644
--- a/arch/blackfin/kernel/bfin_gpio.c
+++ b/arch/blackfin/kernel/bfin_gpio.c
@@ -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)
{
OpenPOWER on IntegriCloud