Commit 82565a12 authored by stephen lu's avatar stephen lu Committed by Dmitry Torokhov

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: default avatarStephen Lu <lumotuwe@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 34445d4b
...@@ -419,9 +419,9 @@ static irqreturn_t gpio_keys_gpio_isr(int irq, void *dev_id) ...@@ -419,9 +419,9 @@ static irqreturn_t gpio_keys_gpio_isr(int irq, void *dev_id)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
static void gpio_keys_irq_timer(unsigned long _data) static void gpio_keys_irq_timer(struct timer_list *t)
{ {
struct gpio_button_data *bdata = (struct gpio_button_data *)_data; struct gpio_button_data *bdata = from_timer(bdata, t, release_timer);
struct input_dev *input = bdata->input; struct input_dev *input = bdata->input;
unsigned long flags; unsigned long flags;
...@@ -582,8 +582,7 @@ static int gpio_keys_setup_key(struct platform_device *pdev, ...@@ -582,8 +582,7 @@ static int gpio_keys_setup_key(struct platform_device *pdev,
} }
bdata->release_delay = button->debounce_interval; bdata->release_delay = button->debounce_interval;
setup_timer(&bdata->release_timer, timer_setup(&bdata->release_timer, gpio_keys_irq_timer, 0);
gpio_keys_irq_timer, (unsigned long)bdata);
isr = gpio_keys_irq_isr; isr = gpio_keys_irq_isr;
irqflags = 0; irqflags = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment