Skip to contentSkip to conversation

brcmfmac: btcoex: replace init_timer with setup_timer

PATCH In review Xie Qirong 2 participants 2 messages May 3, 2017

Subsystems (3)
lore
Share & tools
lore

Xie Qirong

author
#0 lore raw

PATCH 1/1 brcmfmac: btcoex: replace init_timer with setup_timer

---

setup_timer.cocci suggested the following improvement:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c:383:1-11: Use setup_timer function for function on line 384.

Patch was compile checked with: x86_64_defconfig + CONFIG_BRCMFMAC=y + CONFIG_BRCMFMAC_USB=y + CONFIG_BRCMFMAC_PCIE=y + CONFIG_BRCM_TRACING=y + CONFIG_BRCMDBG=y

Kernel version: next-20170502 (localversion-next is next-20170502)

 drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c +1 -3
index 14a70d4..3559fb5 100644
@@ -380,9 +380,7 @@ int brcmf_btcoex_attach(struct brcmf_cfg80211_info *cfg)
 	/* Set up timer for BT  */
 	btci->timer_on = false;
 	btci->timeout = BRCMF_BTCOEX_OPPR_WIN_TIME;
-	init_timer(&btci->timer);
-	btci->timer.data = (ulong)btci;
-	btci->timer.function = brcmf_btcoex_timerfunc;
+	setup_timer(&btci->timer, brcmf_btcoex_timerfunc, (ulong)btci);
 	btci->cfg = cfg;
 	btci->saved_regs_part1 = false;
 	btci->saved_regs_part2 = false;
Signature · 1 line
2.9.3
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Xie Qirong

---

setup_timer.cocci suggested the following improvement:
drivers/net/wireless/broadcom/brcm80211/brcmfmac/btcoex.c:383:1-11: Use setup_timer function for function on line 384.

Move the text above before your sign-off so it will end up in the git commit message.

When done you may also add my acknowledgement, ie.:

Regards,
Arend