mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [tip: timers/cleanups] wifi: rt2x00: Switch to use hrtimer_setup()
@ 2025-02-18 10:06 tip-bot2 for Nam Cao
  0 siblings, 0 replies; only message in thread
From: tip-bot2 for Nam Cao @ 2025-02-18 10:06 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: Nam Cao, Thomas Gleixner, x86, linux-kernel

The following commit has been merged into the timers/cleanups branch of tip:

Commit-ID:     1528fd734e7b8fabea014234fc3f35d811f2f6f7
Gitweb:        https://git.kernel.org/tip/1528fd734e7b8fabea014234fc3f35d811f2f6f7
Author:        Nam Cao <namcao@linutronix.de>
AuthorDate:    Wed, 05 Feb 2025 11:43:41 +01:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 18 Feb 2025 10:35:47 +01:00

wifi: rt2x00: Switch to use hrtimer_setup()

hrtimer_setup() takes the callback function pointer as argument and
initializes the timer completely. This new function replaces
hrtimer_init().

However, converting this driver is not obvious: the driver calls
hrtimer_init() in rt2x00dev.c, then set the hrtimer's callback function in
rt2800mmio.c and rt2800usb.c. Therefore, switching to the new function is
not a simple one-for-one replacement.

With the lack of hardware to verify any non-trivial changes, keep it simple
and calls hrtimer_setup() with hrtimer_dummy_timeout() as callback function
pointer.

Signed-off-by: Nam Cao <namcao@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/f086be77528edf0dfb455af4cb984b863084a455.1738746872.git.namcao@linutronix.de

---
 drivers/net/wireless/ralink/rt2x00/rt2x00dev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
index 9e7d9db..432ddfa 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
@@ -1391,8 +1391,8 @@ int rt2x00lib_probe_dev(struct rt2x00_dev *rt2x00dev)
 	mutex_init(&rt2x00dev->conf_mutex);
 	INIT_LIST_HEAD(&rt2x00dev->bar_list);
 	spin_lock_init(&rt2x00dev->bar_list_lock);
-	hrtimer_init(&rt2x00dev->txstatus_timer, CLOCK_MONOTONIC,
-		     HRTIMER_MODE_REL);
+	hrtimer_setup(&rt2x00dev->txstatus_timer, hrtimer_dummy_timeout, CLOCK_MONOTONIC,
+		      HRTIMER_MODE_REL);
 
 	set_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags);
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-02-18 10:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-18 10:06 [tip: timers/cleanups] wifi: rt2x00: Switch to use hrtimer_setup() tip-bot2 for Nam Cao

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®