only set hw_debounce_time when hw_debounce is active
authorMichael Gernoth <michael@gernoth.net>
Sun, 21 Aug 2011 13:52:43 +0000 (15:52 +0200)
committerMichael Gernoth <michael@gernoth.net>
Sun, 21 Aug 2011 13:52:43 +0000 (15:52 +0200)
MS2Debounce/assets/debounce.ko
debounce.c

index 12c2cfe..fd7f406 100644 (file)
Binary files a/MS2Debounce/assets/debounce.ko and b/MS2Debounce/assets/debounce.ko differ
index be78a44..45b0140 100644 (file)
@@ -38,7 +38,7 @@ static void hw_debounce_set(int enable, int time) {
                        omap_set_gpio_debounce(gpio, enable);
                }
 
-               if (time != -1) {
+               if ((time != -1) && hw_debounce) {
                        printk(KERN_INFO PREFIX "Setting hardware debounce time for GPIO %d to %d (%dus)\n", gpio, time, (time+1)*31);
                        omap_set_gpio_debounce_time(gpio, time);
                }
Impressum, Datenschutz