Title: [5988] trunk/arch/blackfin/kernel/bfin_gpio.c: Task [#4274] reset POLAR setting when acquiring a gpio for the first time
Revision
5988
Author
hennerich
Date
2009-01-09 08:02:48 -0600 (Fri, 09 Jan 2009)

Log Message

Task [#4274] reset POLAR setting when acquiring a gpio for the first time

Modified Paths

Diff

Modified: trunk/arch/blackfin/kernel/bfin_gpio.c (5987 => 5988)


--- trunk/arch/blackfin/kernel/bfin_gpio.c	2009-01-09 13:21:47 UTC (rev 5987)
+++ trunk/arch/blackfin/kernel/bfin_gpio.c	2009-01-09 14:02:48 UTC (rev 5988)
@@ -1053,9 +1053,15 @@
 		local_irq_restore_hw(flags);
 		return -EBUSY;
 	}
-	if (unlikely(reserved_gpio_irq_map[gpio_bank(gpio)] & gpio_bit(gpio)))
+	if (unlikely(reserved_gpio_irq_map[gpio_bank(gpio)] & gpio_bit(gpio))) {
 		printk(KERN_NOTICE "bfin-gpio: GPIO %d is already reserved as gpio-irq!"
 		       " (Documentation/blackfin/bfin-gpio-notes.txt)\n", gpio);
+	}
+#ifndef BF548_FAMILY
+	else {	/* Reset POLAR setting when acquiring a gpio for the first time */
+		set_gpio_polar(gpio, 0);
+	}
+#endif
 
 	reserved_gpio_map[gpio_bank(gpio)] |= gpio_bit(gpio);
 	set_label(gpio, label);
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
http://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to