Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934177AbdCKAsj (ORCPT ); Fri, 10 Mar 2017 19:48:39 -0500 Received: from mail-pg0-f66.google.com ([74.125.83.66]:35603 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932599AbdCKArV (ORCPT ); Fri, 10 Mar 2017 19:47:21 -0500 From: Geliang Tang To: Paul Burton , Miguel Ojeda Sandonis Cc: Geliang Tang , linux-kernel@vger.kernel.org Subject: [PATCH] auxdisplay: use setup_timer Date: Sat, 11 Mar 2017 08:46:57 +0800 Message-Id: X-Mailer: git-send-email 2.9.3 In-Reply-To: <3afa5498142ef68256023257dad37b9f8352e65e.1489060803.git.geliangtang@gmail.com> References: <3afa5498142ef68256023257dad37b9f8352e65e.1489060803.git.geliangtang@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 809 Lines: 24 Use setup_timer() instead of init_timer() to simplify the code. Signed-off-by: Geliang Tang --- 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