From: Michael Gernoth Date: Sun, 21 Aug 2011 13:52:43 +0000 (+0200) Subject: only set hw_debounce_time when hw_debounce is active X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/ms2-fixes/commitdiff_plain/70f5583bed4af417abe2d5ec5aa78bd4c7d7b80b only set hw_debounce_time when hw_debounce is active --- diff --git a/MS2Debounce/assets/debounce.ko b/MS2Debounce/assets/debounce.ko index 12c2cfe..fd7f406 100644 Binary files a/MS2Debounce/assets/debounce.ko and b/MS2Debounce/assets/debounce.ko differ diff --git a/debounce.c b/debounce.c index be78a44..45b0140 100644 --- a/debounce.c +++ b/debounce.c @@ -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); }