lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <a2978662428c4264097ce6318497ed03d901f4e4.1489061436.git.geliangtang@gmail.com>
Date:   Sat, 11 Mar 2017 08:46:57 +0800
From:   Geliang Tang <geliangtang@...il.com>
To:     Paul Burton <paul.burton@...tec.com>,
        Miguel Ojeda Sandonis <miguel.ojeda.sandonis@...il.com>
Cc:     Geliang Tang <geliangtang@...il.com>, linux-kernel@...r.kernel.org
Subject: [PATCH] auxdisplay: use setup_timer

Use setup_timer() instead of init_timer() to simplify the code.

Signed-off-by: Geliang Tang <geliangtang@...il.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);
 
-- 
2.9.3

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ