Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935061AbcJQPTm (ORCPT ); Mon, 17 Oct 2016 11:19:42 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33959 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934780AbcJQPTd (ORCPT ); Mon, 17 Oct 2016 11:19:33 -0400 From: Wei Yongjun To: Paul Burton , Miguel Ojeda Sandonis , Ralf Baechle Cc: Wei Yongjun , linux-kernel@vger.kernel.org Subject: [PATCH -next] auxdisplay: img-ascii-lcd: use setup_timer instead of init_timer and data fields Date: Mon, 17 Oct 2016 15:19:27 +0000 Message-Id: <1476717567-19377-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 866 Lines: 24 From: Wei Yongjun Use setup_timer function instead of initializing timer with the function and data fields Signed-off-by: Wei Yongjun --- 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);