mmc-host: wbsd: use setup_timer() helper.
authorAllen <allen.lkml@gmail.com>
Fri, 22 Sep 2017 12:07:23 +0000 (17:37 +0530)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 30 Oct 2017 10:45:53 +0000 (11:45 +0100)
Use setup_timer function instead of initializing timer with the
   function and data fields.

Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/wbsd.c

index 546aaf8d15078746f2d6e0f0859142d1aca3cd5c..499852d8f706cf0bb6490f96f5add56bff5e32ec 100644 (file)
@@ -1224,9 +1224,8 @@ static int wbsd_alloc_mmc(struct device *dev)
        /*
         * Set up timers
         */
-       init_timer(&host->ignore_timer);
-       host->ignore_timer.data = (unsigned long)host;
-       host->ignore_timer.function = wbsd_reset_ignore;
+       setup_timer(&host->ignore_timer, wbsd_reset_ignore,
+                   (unsigned long)host);
 
        /*
         * Maximum number of segments. Worst case is one sector per segment