mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Allen Pais <allen.lkml@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: ed.cashin@acm.org, Allen Pais <allen.lkml@gmail.com>
Subject: [PATCH 1/5] block: amiflop: use setup_timer() helper.
Date: Fri, 22 Sep 2017 16:46:35 +0530	[thread overview]
Message-ID: <1506078999-4723-2-git-send-email-allen.lkml@gmail.com> (raw)
In-Reply-To: <1506078999-4723-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/block/amiflop.c | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)

diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c
index 49908c7..c4b1cba 100644
--- a/drivers/block/amiflop.c
+++ b/drivers/block/amiflop.c
@@ -1792,27 +1792,19 @@ static int __init amiga_floppy_probe(struct platform_device *pdev)
 				floppy_find, NULL, NULL);
 
 	/* initialize variables */
-	init_timer(&motor_on_timer);
+	setup_timer(&motor_on_timer, motor_on_callback, 0);
 	motor_on_timer.expires = 0;
-	motor_on_timer.data = 0;
-	motor_on_timer.function = motor_on_callback;
 	for (i = 0; i < FD_MAX_UNITS; i++) {
-		init_timer(&motor_off_timer[i]);
+		setup_timer(&motor_off_timer[i], fd_motor_off, i | 0x80000000);
 		motor_off_timer[i].expires = 0;
-		motor_off_timer[i].data = i|0x80000000;
-		motor_off_timer[i].function = fd_motor_off;
-		init_timer(&flush_track_timer[i]);
+		setup_timer(&flush_track_timer[i], flush_track_callback, i);
 		flush_track_timer[i].expires = 0;
-		flush_track_timer[i].data = i;
-		flush_track_timer[i].function = flush_track_callback;
 
 		unit[i].track = -1;
 	}
 
-	init_timer(&post_write_timer);
+	setup_timer(&post_write_timer, post_write, 0);
 	post_write_timer.expires = 0;
-	post_write_timer.data = 0;
-	post_write_timer.function = post_write;
   
 	for (i = 0; i < 128; i++)
 		mfmdecode[i]=255;
-- 
2.7.4

  reply	other threads:[~2017-09-22 11:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-22 11:16 [PATCH 0/5] use setup_timer() helper function Allen Pais
2017-09-22 11:16 ` Allen Pais [this message]
2017-09-22 11:16 ` [PATCH 2/5] block: aoe: use setup_timer() helper Allen Pais
2017-09-22 11:16 ` [PATCH 3/5] " Allen Pais
2017-09-22 11:16 ` [PATCH 4/5] block: umem: " Allen Pais
2017-09-22 11:16 ` [PATCH 5/5] block: DAC960: " 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=1506078999-4723-2-git-send-email-allen.lkml@gmail.com \
    --to=allen.lkml@gmail.com \
    --cc=ed.cashin@acm.org \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®