lkml.org 
[lkml]   [2017]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] auxdisplay: img-ascii-lcd: Use setup_timer API
Date
Use setup_timer API instead of structure assignment.

Signed-off-by: Himanshu Jha <himanshujha199640@gmail.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 25306fa..ea6875e 100644
--- a/drivers/auxdisplay/img-ascii-lcd.c
+++ b/drivers/auxdisplay/img-ascii-lcd.c
@@ -395,9 +395,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.7.4
\
 
 \ /
  Last update: 2017-10-01 19:06    [W:0.037 / U:2.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site