Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1737261

[PATCH 03/10] drivers: tty: vcc: use setup_timer() helper.

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Allen Pais <allen.lkml@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 03/10] drivers: tty: vcc: use setup_timer() helper.
Date Fri, 22 Sep 2017 10:30:02 +0200
Message-ID <usrvs-3Q3-7@gated-at.bofh.it> (permalink)
References <usrvs-3Q3-9@gated-at.bofh.it>
X-Original-To linux-serial@vger.kernel.org
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Zqls7BFgShs2SmSy+Jbkps9lhFSS8NyW12/fgVFnry8=; b=KhKOY9hI25LikW4jU74182eizB1PHmAJJNKkWbllsTO8Ko4Ib4h8J0LSyBtQBLr8iB 9hu6n5tC3DQtyOjw6DyVQhxRnVZMRTmqiHnbyZqDP9YymGa1V4auXzs2CnZUZj2QeQxt 5QmqWx5tXZXnSQ83uTr+l509H+ph494Qh3El/nXYx7Ho8Cok8IptbmDcM6FxW62G0Hy5 A1potWCDTqA75jStKqjuE2Hey8eTZG54d/bxtxM5+Da0y4oZpKFk6GB22jerodOnqp+N mHTNlFoxynbx/ZKpZBtsWfLt4VR3I0F0qC2z5hhw7MUFVD3jOY38yyL7e2qa8Zghtlnn sPkw==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Zqls7BFgShs2SmSy+Jbkps9lhFSS8NyW12/fgVFnry8=; b=Qi3X0KSZY93rA/fbNn3L4sB8fAzY2cW8aQdl0otv/ZZIBYRo7mvsEOPCCPjZd6UPsH bZHEYNbIRiJ8RGiDozKlIqwYV2e4ykIDJWvWeBmvi+yyNb9B46pwuEOEZURqJv/nMSUY sSOXXrDZ/w0WLWqbFInU9eVzCDcoVco1cSgmHo3iF0/sqiVv+PaPWaUDnNQtqHGo17Zd nCvDBYWLfObEU3/fBqhXJTQd+aoNrC6554fsyz85/wNn+nWDPA3m9ixHPcI9Pl//Dbt7 IBPTFvscYa6waA/u8EUN8uVwMqfCpJCVjMgCECuVszkpgJkNvLyfx3m6LFF/lsN5b6zn vlKA==
X-Gm-Message-State AHPjjUgC/B1cjrF3b/CKO1nYrRzeV06SYYljCZ+cB/rGoUzHgI8JHnD4 QujnG0OTLfWOnjamRb6malWRsLef
X-Google-SMTP-Source AOwi7QDSiLX/g6Xo2g010q43CRJ77HWAuEYF6J6CI0PKDXOF8/6pyVjcTIawvAYW6J5QYjHIwHdehQ==
X-Received by 10.99.122.90 with SMTP id j26mr8319490pgn.84.1506068830435; Fri, 22 Sep 2017 01:27:10 -0700 (PDT)
X-Mailer git-send-email 2.7.4
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 30
Organization linux.* mail to news gateway
X-Original-Cc linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org, jslaby@suse.com, Allen Pais <allen.lkml@gmail.com>
X-Original-Date Fri, 22 Sep 2017 13:56:45 +0530
X-Original-Message-ID <1506068812-8496-4-git-send-email-allen.lkml@gmail.com>
X-Original-References <1506068812-8496-1-git-send-email-allen.lkml@gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1737261

Show key headers only | View raw


    Use setup_timer function instead of initializing timer with the
    function and data fields.

Signed-off-by: Allen Pais <allen.lkml@gmail.com>
---
 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

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH 03/10] drivers: tty: vcc: use setup_timer() helper. Allen Pais <allen.lkml@gmail.com> - 2017-09-22 10:30 +0200

csiph-web