[PATCH] auxdisplay: use setup_timer
From: Geliang Tang
Date: Fri Mar 10 2017 - 19:48:59 EST
Use setup_timer() instead of init_timer() to simplify the code.
Signed-off-by: Geliang Tang <geliangtang@xxxxxxxxx>
---
drivers/auxdisplay/img-ascii-lcd.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/auxdisplay/img-ascii-lcd.c b/drivers/auxdisplay/img-ascii-lcd.c
index bf43b5d..1f30b7e 100644
--- a/drivers/auxdisplay/img-ascii-lcd.c
+++ b/drivers/auxdisplay/img-ascii-lcd.c
@@ -393,9 +393,7 @@ static int img_ascii_lcd_probe(struct platform_device *pdev)
ctx->scroll_rate = HZ / 2;
/* initialise a timer for scrolling the message */
- init_timer(&ctx->timer);
- ctx->timer.function = img_ascii_lcd_scroll;
- ctx->timer.data = (unsigned long)ctx;
+ setup_timer(&ctx->timer, img_ascii_lcd_scroll, (unsigned long)ctx);
platform_set_drvdata(pdev, ctx);
--
2.9.3