diff options
author | stephen lu <lumotuwe@gmail.com> | 2017-10-23 17:43:53 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-10-23 19:31:53 -0400 |
commit | 82565a120544b2bdfaf602d9f5e7b9ab9a342ae8 (patch) | |
tree | 8dbb4ba0f2e5b51ab0ce0246643bb2a4ea2188be | |
parent | 34445d4b3814b22a225819566f85516f3b04808f (diff) |
Input: gpio-keys - convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.
Signed-off-by: Stephen Lu <lumotuwe@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r-- | drivers/input/keyboard/gpio_keys.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index e9f0ebf3267a..87e613dc33b8 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c | |||
@@ -419,9 +419,9 @@ static irqreturn_t gpio_keys_gpio_isr(int irq, void *dev_id) | |||
419 | return IRQ_HANDLED; | 419 | return IRQ_HANDLED; |
420 | } | 420 | } |
421 | 421 | ||
422 | static void gpio_keys_irq_timer(unsigned long _data) | 422 | static void gpio_keys_irq_timer(struct timer_list *t) |
423 | { | 423 | { |
424 | struct gpio_button_data *bdata = (struct gpio_button_data *)_data; | 424 | struct gpio_button_data *bdata = from_timer(bdata, t, release_timer); |
425 | struct input_dev *input = bdata->input; | 425 | struct input_dev *input = bdata->input; |
426 | unsigned long flags; | 426 | unsigned long flags; |
427 | 427 | ||
@@ -582,8 +582,7 @@ static int gpio_keys_setup_key(struct platform_device *pdev, | |||
582 | } | 582 | } |
583 | 583 | ||
584 | bdata->release_delay = button->debounce_interval; | 584 | bdata->release_delay = button->debounce_interval; |
585 | setup_timer(&bdata->release_timer, | 585 | timer_setup(&bdata->release_timer, gpio_keys_irq_timer, 0); |
586 | gpio_keys_irq_timer, (unsigned long)bdata); | ||
587 | 586 | ||
588 | isr = gpio_keys_irq_isr; | 587 | isr = gpio_keys_irq_isr; |
589 | irqflags = 0; | 588 | irqflags = 0; |