small update to adapt app to new module interface
[ms2-fixes] / debounce.c
index a5138c3..029ff91 100644 (file)
@@ -5,17 +5,12 @@
 
 #define PREFIX "debounce: "
 
-static int debounce_delay = 15;
-
 static unsigned old_flags = 0;
 ktime_t old_debounce_delay;
 ktime_t old_settle_time;
 ktime_t old_poll_time;
 static struct gpio_event_matrix_info *gpio_evmi = NULL;
 
-module_param(debounce_delay, int, S_IRUSR | S_IRGRP | S_IROTH);
-MODULE_PARM_DESC(debounce_delay, "debouncing delay (ms), default: 15");
-
 static int find_ms2_dev(struct device *dev, void *data)
 {
        if (!strncmp((char*)data, dev_name(dev), strlen((char*)data))) {
@@ -38,7 +33,6 @@ static void set_debounce_delay(long delay)
        if (gpio_evmi->debounce_delay.tv.nsec != delay * NSEC_PER_MSEC) {
                printk(KERN_INFO PREFIX "Changing debounce_delay\n");
                gpio_evmi->debounce_delay.tv.nsec = delay * NSEC_PER_MSEC;
-               debounce_delay = delay;
                printk(KERN_INFO PREFIX "debounce_delay: %u\n", gpio_evmi->debounce_delay.tv.nsec);
        }
 
@@ -334,8 +328,6 @@ static int __init debounce_init(void)
        old_poll_time = gpio_evmi->poll_time;
        old_flags = gpio_evmi->flags;
 
-       set_debounce_delay(debounce_delay);
-
        printk(KERN_INFO PREFIX "flags: 0x%x\n", gpio_evmi->flags);
 
        return 0;
Impressum, Datenschutz