aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/blackfin/kernel/bfin_gpio.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/blackfin/kernel/bfin_gpio.c b/arch/blackfin/kernel/bfin_gpio.c
index 96090268e007..3e698d651f17 100644
--- a/arch/blackfin/kernel/bfin_gpio.c
+++ b/arch/blackfin/kernel/bfin_gpio.c
@@ -881,13 +881,13 @@ int peripheral_request(unsigned short per, const char *label)
881 if (!(per & P_DEFINED)) 881 if (!(per & P_DEFINED))
882 return -ENODEV; 882 return -ENODEV;
883 883
884 if (check_gpio(ident))
885 return -EINVAL;
886
887 local_irq_save(flags); 884 local_irq_save(flags);
888 885
889 /* Can't do GPIO and peripheral at the same time */ 886 /* If a pin can be muxed as either GPIO or peripheral, make
890 if (unlikely(reserved_gpio_map[gpio_bank(ident)] & gpio_bit(ident))) { 887 * sure it is not already a GPIO pin when we request it.
888 */
889 if (unlikely(!check_gpio(ident) &&
890 reserved_gpio_map[gpio_bank(ident)] & gpio_bit(ident))) {
891 dump_stack(); 891 dump_stack();
892 printk(KERN_ERR 892 printk(KERN_ERR
893 "%s: Peripheral %d is already reserved as GPIO by %s !\n", 893 "%s: Peripheral %d is already reserved as GPIO by %s !\n",