linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Allen Pais <allen.lkml@gmail.com>
To: linux-serial@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org,
	jslaby@suse.com, Allen Pais <allen.lkml@gmail.com>
Subject: [PATCH 05/10] drivers: tty: pnx8xxx: use setup_timer() helper.
Date: Fri, 22 Sep 2017 13:56:47 +0530	[thread overview]
Message-ID: <1506068812-8496-6-git-send-email-allen.lkml@gmail.com> (raw)
In-Reply-To: <1506068812-8496-1-git-send-email-allen.lkml@gmail.com>

    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/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

  parent reply	other threads:[~2017-09-22  8:26 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-22  8:26 [PATCH 00/10] use setup_timer() helper function Allen Pais
2017-09-22  8:26 ` [PATCH 01/10] drivers: tty: mux: use setup_timer() helper Allen Pais
2017-09-22  8:26 ` [PATCH 02/10] drivers:tty: imx: " Allen Pais
2017-09-22  9:05   ` Uwe Kleine-König
2017-09-22  8:26 ` [PATCH 03/10] drivers: tty: vcc: " Allen Pais
2017-09-22  8:26 ` [PATCH 04/10] drivers: tty: max3100: " Allen Pais
2017-09-22  8:26 ` Allen Pais [this message]
2017-09-22  8:26 ` [PATCH 06/10] drivers: tty: 8250: " Allen Pais
2017-09-22  8:26 ` [PATCH 07/10] drivers: tty: sa1100: " Allen Pais
2017-09-22  8:26 ` [PATCH 08/10] drivers: tty: n_gsm: " Allen Pais
2017-09-22  8:26 ` [PATCH 09/10] drivers: tty: sn_console: " Allen Pais
2017-09-22  8:26 ` [PATCH 10/10] drivers: tty: ifx6x60: " Allen Pais

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1506068812-8496-6-git-send-email-allen.lkml@gmail.com \
    --to=allen.lkml@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).