]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
scsi: gdth: Convert timers to use timer_setup()
authorKees Cook <keescook@chromium.org>
Thu, 12 Oct 2017 00:17:42 +0000 (17:17 -0700)
committerKees Cook <keescook@chromium.org>
Fri, 27 Oct 2017 09:22:00 +0000 (02:22 -0700)
In preparation for unconditionally passing the struct timer_list pointer to
all timer callbacks, switch to using the new timer_setup() and from_timer()
to pass the timer pointer explicitly.

Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/gdth.c

index a4473356a9dc2a4fcfd1f4d34d3096ba50797b5f..c35f05c4c6bbbbb5e029201dc36564f322bb451a 100644 (file)
@@ -3705,7 +3705,7 @@ static void gdth_log_event(gdth_evt_data *dvr, char *buffer)
 #ifdef GDTH_STATISTICS
 static u8      gdth_timer_running;
 
-static void gdth_timeout(unsigned long data)
+static void gdth_timeout(struct timer_list *unused)
 {
     u32 i;
     Scsi_Cmnd *nscp;
@@ -3743,8 +3743,6 @@ static void gdth_timer_init(void)
        gdth_timer_running = 1;
        TRACE2(("gdth_detect(): Initializing timer !\n"));
        gdth_timer.expires = jiffies + HZ;
-       gdth_timer.data = 0L;
-       gdth_timer.function = gdth_timeout;
        add_timer(&gdth_timer);
 }
 #else
@@ -5165,7 +5163,7 @@ static int __init gdth_init(void)
        /* initializations */
        gdth_polling = TRUE;
        gdth_clear_events();
-       init_timer(&gdth_timer);
+       timer_setup(&gdth_timer, gdth_timeout, 0);
 
        /* As default we do not probe for EISA or ISA controllers */
        if (probe_eisa_isa) {