OSDN Git Service

brcmfmac: use setup_timer() helper
authorAllen Pais <allen.lkml@gmail.com>
Thu, 21 Sep 2017 12:43:06 +0000 (18:13 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Mon, 25 Sep 2017 08:21:19 +0000 (11:21 +0300)
Use setup_timer function instead of initializing timer with the
function and data fields.

Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/broadcom/brcm80211/brcmfmac/sdio.c

index 613caca..5adce0e 100644 (file)
@@ -4144,10 +4144,8 @@ struct brcmf_sdio *brcmf_sdio_probe(struct brcmf_sdio_dev *sdiodev)
        init_waitqueue_head(&bus->dcmd_resp_wait);
 
        /* Set up the watchdog timer */
-       init_timer(&bus->timer);
-       bus->timer.data = (unsigned long)bus;
-       bus->timer.function = brcmf_sdio_watchdog;
-
+       setup_timer(&bus->timer, brcmf_sdio_watchdog,
+                   (unsigned long)bus);
        /* Initialize watchdog thread */
        init_completion(&bus->watchdog_wait);
        bus->watchdog_tsk = kthread_run(brcmf_sdio_watchdog_thread,