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 04/10] drivers: tty: max3100: use setup_timer() helper.
Date: Fri, 22 Sep 2017 13:56:46 +0530 [thread overview]
Message-ID: <1506068812-8496-5-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/max3100.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/serial/max3100.c b/drivers/tty/serial/max3100.c
index ace8264..b6b3453 100644
--- a/drivers/tty/serial/max3100.c
+++ b/drivers/tty/serial/max3100.c
@@ -787,9 +787,8 @@ static int max3100_probe(struct spi_device *spi)
max3100s[i]->poll_time = 1;
max3100s[i]->max3100_hw_suspend = pdata->max3100_hw_suspend;
max3100s[i]->minor = i;
- init_timer(&max3100s[i]->timer);
- max3100s[i]->timer.function = max3100_timeout;
- max3100s[i]->timer.data = (unsigned long) max3100s[i];
+ setup_timer(&max3100s[i]->timer, max3100_timeout,
+ (unsigned long)max3100s[i]);
dev_dbg(&spi->dev, "%s: adding port %d\n", __func__, i);
max3100s[i]->port.irq = max3100s[i]->irq;
--
2.7.4
next prev 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 ` Allen Pais [this message]
2017-09-22 8:26 ` [PATCH 05/10] drivers: tty: pnx8xxx: " Allen Pais
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-5-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).