Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1502090 > unrolled thread

[PATCH -next] auxdisplay: img-ascii-lcd: use setup_timer instead of init_timer and data fields

Started byWei Yongjun <weiyj.lk@gmail.com>
First post2016-10-17 17:20 +0200
Last post2016-10-17 17:20 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH -next] auxdisplay: img-ascii-lcd: use setup_timer instead of init_timer and data fields Wei Yongjun <weiyj.lk@gmail.com> - 2016-10-17 17:20 +0200

#1502090 — [PATCH -next] auxdisplay: img-ascii-lcd: use setup_timer instead of init_timer and data fields

FromWei Yongjun <weiyj.lk@gmail.com>
Date2016-10-17 17:20 +0200
Subject[PATCH -next] auxdisplay: img-ascii-lcd: use setup_timer instead of init_timer and data fields
Message-ID<sthRM-59n-23@gated-at.bofh.it>
From: Wei Yongjun <weiyongjun1@huawei.com>

Use setup_timer function instead of initializing timer with the function
and data fields

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 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);

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web