From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751986AbdIVI3W (ORCPT ); Fri, 22 Sep 2017 04:29:22 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:36408 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751940AbdIVI1L (ORCPT ); Fri, 22 Sep 2017 04:27:11 -0400 X-Google-Smtp-Source: AOwi7QDSiLX/g6Xo2g010q43CRJ77HWAuEYF6J6CI0PKDXOF8/6pyVjcTIawvAYW6J5QYjHIwHdehQ== 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 03/10] drivers: tty: vcc: use setup_timer() helper. Date: Fri, 22 Sep 2017 13:56:45 +0530 Message-Id: <1506068812-8496-4-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/vcc.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/tty/vcc.c b/drivers/tty/vcc.c index ef01d24..954b190 100644 --- a/drivers/tty/vcc.c +++ b/drivers/tty/vcc.c @@ -645,13 +645,8 @@ static int vcc_probe(struct vio_dev *vdev, const struct vio_device_id *id) if (rv) goto free_domain; - init_timer(&port->rx_timer); - port->rx_timer.function = vcc_rx_timer; - port->rx_timer.data = port->index; - - init_timer(&port->tx_timer); - port->tx_timer.function = vcc_tx_timer; - port->tx_timer.data = port->index; + setup_timer(&port->rx_timer, vcc_rx_timer, port->index); + setup_timer(&port->tx_timer, vcc_tx_timer, port->index); dev_set_drvdata(&vdev->dev, port); -- 2.7.4