diff mbox series

[2/4] zd1211rw: stop using deprecated get_seconds()

Message ID 20180618151142.1214422-2-arnd@arndb.de
State Accepted
Commit 71e140b57151425829f87a0aaaa87636860dd7d2
Headers show
Series [1/4] cfg80211: track time using boottime | expand

Commit Message

Arnd Bergmann June 18, 2018, 3:11 p.m. UTC
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>

---
 drivers/net/wireless/zydas/zd1211rw/zd_chip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.9.0

Comments

Kalle Valo June 27, 2018, 4:10 p.m. UTC | #1
Arnd Bergmann <arnd@arndb.de> wrote:

> 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>


2 patches applied to wireless-drivers-next.git, thanks.

71e140b57151 zd1211rw: stop using deprecated get_seconds()
3cade2f3d98a ipw2x00: track time using boottime

-- 
https://patchwork.kernel.org/patch/10471961/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
diff mbox series

Patch

diff --git a/drivers/net/wireless/zydas/zd1211rw/zd_chip.c b/drivers/net/wireless/zydas/zd1211rw/zd_chip.c
index 07b94eda9604..dd6a86b899eb 100644
--- a/drivers/net/wireless/zydas/zd1211rw/zd_chip.c
+++ b/drivers/net/wireless/zydas/zd1211rw/zd_chip.c
@@ -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;