diff options
Diffstat (limited to 'drivers/input/touchscreen/atmel-wm97xx.c')
-rw-r--r-- | drivers/input/touchscreen/atmel-wm97xx.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/input/touchscreen/atmel-wm97xx.c b/drivers/input/touchscreen/atmel-wm97xx.c index 8cf0b2be2df4..9140a43cfe20 100644 --- a/drivers/input/touchscreen/atmel-wm97xx.c +++ b/drivers/input/touchscreen/atmel-wm97xx.c @@ -208,9 +208,12 @@ static void atmel_wm97xx_acc_pen_up(struct wm97xx *wm) } } -static void atmel_wm97xx_pen_timer(unsigned long data) +static void atmel_wm97xx_pen_timer(struct timer_list *t) { - atmel_wm97xx_acc_pen_up((struct wm97xx *)data); + struct atmel_wm97xx *atmel_wm97xx = from_timer(atmel_wm97xx, t, + pen_timer); + + atmel_wm97xx_acc_pen_up(atmel_wm97xx->wm); } static int atmel_wm97xx_acc_startup(struct wm97xx *wm) @@ -348,8 +351,7 @@ static int __init atmel_wm97xx_probe(struct platform_device *pdev) atmel_wm97xx->gpio_pen = atmel_gpio_line; atmel_wm97xx->gpio_irq = gpio_to_irq(atmel_wm97xx->gpio_pen); - setup_timer(&atmel_wm97xx->pen_timer, atmel_wm97xx_pen_timer, - (unsigned long)wm); + timer_setup(&atmel_wm97xx->pen_timer, atmel_wm97xx_pen_timer, 0); ret = request_irq(atmel_wm97xx->ac97c_irq, atmel_wm97xx_channel_b_interrupt, |