From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752009AbdIVI1W (ORCPT ); Fri, 22 Sep 2017 04:27:22 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:37748 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751970AbdIVI1R (ORCPT ); Fri, 22 Sep 2017 04:27:17 -0400 X-Google-Smtp-Source: AOwi7QDCovA5xKxBA3QxgcpsJQHMUV3X8DQGXB4Tvk+NVyF9jTTV6pyVOo4C+tyC08HP9gNJA7iF7A== From: Allen Pais To: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, jslaby@suse.com, Allen Pais Subject: [PATCH 05/10] drivers: tty: pnx8xxx: use setup_timer() helper. Date: Fri, 22 Sep 2017 13:56:47 +0530 Message-Id: <1506068812-8496-6-git-send-email-allen.lkml@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1506068812-8496-1-git-send-email-allen.lkml@gmail.com> References: <1506068812-8496-1-git-send-email-allen.lkml@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use setup_timer function instead of initializing timer with the function and data fields. Signed-off-by: Allen Pais --- drivers/tty/serial/pnx8xxx_uart.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/pnx8xxx_uart.c b/drivers/tty/serial/pnx8xxx_uart.c index dab2668..a05508a 100644 --- a/drivers/tty/serial/pnx8xxx_uart.c +++ b/drivers/tty/serial/pnx8xxx_uart.c @@ -666,9 +666,8 @@ static void __init pnx8xxx_init_ports(void) first = 0; for (i = 0; i < NR_PORTS; i++) { - init_timer(&pnx8xxx_ports[i].timer); - pnx8xxx_ports[i].timer.function = pnx8xxx_timeout; - pnx8xxx_ports[i].timer.data = (unsigned long)&pnx8xxx_ports[i]; + setup_timer(&pnx8xxx_ports[i].timer, pnx8xxx_timeout, + (unsigned long)&pnx8xxx_ports[i]); pnx8xxx_ports[i].port.ops = &pnx8xxx_pops; } } -- 2.7.4