zd1211rw: stop using deprecated get_seconds()
authorArnd Bergmann <arnd@arndb.de>
Mon, 18 Jun 2018 15:11:15 +0000 (17:11 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Wed, 27 Jun 2018 16:10:21 +0000 (19:10 +0300)
The get_seconds() function is deprecated because of the y2038 overflow.
In zd1211rw we don't even care about the absolute value, so this is
not a problem, but it's equally trivial to change to the non-deprecated
ktime_get_seconds().

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/zydas/zd1211rw/zd_chip.c

index 07b94eda96041070ba01063683dcdcf7295e8de5..dd6a86b899eb471bf13a1350ea10205e855cce34 100644 (file)
@@ -1341,7 +1341,7 @@ int zd_chip_control_leds(struct zd_chip *chip, enum led_status status)
        case ZD_LED_SCANNING:
                ioreqs[0].value = FW_LINK_OFF;
                ioreqs[1].value = v[1] & ~other_led;
-               if (get_seconds() % 3 == 0) {
+               if ((u32)ktime_get_seconds() % 3 == 0) {
                        ioreqs[1].value &= ~chip->link_led;
                } else {
                        ioreqs[1].value |= chip->link_led;