brcmfmac: use msecs_to_jiffies for time conversion
authorNicholas Mc Guire <hofrat@osadl.org>
Fri, 6 Feb 2015 10:26:45 +0000 (05:26 -0500)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 26 Feb 2015 13:01:30 +0000 (15:01 +0200)
This is only an API consolidation and should make things more readable
it replaces var * HZ / 1000 by msecs_to_jiffies(var).

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/brcm80211/brcmfmac/sdio.c

index faec35c899ec1fb50b67041dd1539d39319902eb..314ab03918679bf9b8238f50494220ddfa083f82 100644 (file)
@@ -3971,7 +3971,7 @@ brcmf_sdio_watchdog(unsigned long data)
                /* Reschedule the watchdog */
                if (bus->wd_timer_valid)
                        mod_timer(&bus->timer,
-                                 jiffies + BRCMF_WD_POLL_MS * HZ / 1000);
+                                 jiffies + msecs_to_jiffies(BRCMF_WD_POLL_MS));
        }
 }
 
@@ -4290,13 +4290,13 @@ void brcmf_sdio_wd_timer(struct brcmf_sdio *bus, uint wdtick)
                           dynamically changed or in the first instance
                         */
                        bus->timer.expires =
-                               jiffies + BRCMF_WD_POLL_MS * HZ / 1000;
+                               jiffies + msecs_to_jiffies(BRCMF_WD_POLL_MS);
                        add_timer(&bus->timer);
 
                } else {
                        /* Re arm the timer, at last watchdog period */
                        mod_timer(&bus->timer,
-                               jiffies + BRCMF_WD_POLL_MS * HZ / 1000);
+                               jiffies + msecs_to_jiffies(BRCMF_WD_POLL_MS));
                }
 
                bus->wd_timer_valid = true;