[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <3dc739e1317de4a63223dd89ce7734bc2bd1ed57.1729865740.git.namcao@linutronix.de>
Date: Mon, 28 Oct 2024 08:35:50 +0100
From: Nam Cao <namcao@...utronix.de>
To: Anna-Maria Behnsen <anna-maria@...utronix.de>,
Frederic Weisbecker <frederic@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>,
Miguel Ojeda <ojeda@...nel.org>,
Kees Cook <kees@...nel.org>,
linux-kernel@...r.kernel.org
Cc: Nam Cao <namcao@...utronix.de>,
Kalle Valo <kvalo@...nel.org>
Subject: [PATCH 06/12] wifi: rt2x00: Switch to use hrtimer_update_function()
There is a new helper function hrtimer_update_function() to change the
hrtimer's callback function, which also performs additional runtime check
that it is safe to change the callback.
Use the helper function instead of accessing 'function' directly.
Signed-off-by: Nam Cao <namcao@...utronix.de>
---
Cc: Kalle Valo <kvalo@...nel.org>
---
drivers/net/wireless/ralink/rt2x00/rt2800mmio.c | 2 +-
drivers/net/wireless/ralink/rt2x00/rt2800usb.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800mmio.c b/drivers/net/wireless/ralink/rt2x00/rt2800mmio.c
index 5323acff962a..45775ecdf221 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2800mmio.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800mmio.c
@@ -842,7 +842,7 @@ int rt2800mmio_probe_hw(struct rt2x00_dev *rt2x00dev)
/*
* Set txstatus timer function.
*/
- rt2x00dev->txstatus_timer.function = rt2800mmio_tx_sta_fifo_timeout;
+ hrtimer_update_function(&rt2x00dev->txstatus_timer, rt2800mmio_tx_sta_fifo_timeout);
/*
* Overwrite TX done handler
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800usb.c b/drivers/net/wireless/ralink/rt2x00/rt2800usb.c
index 160bef79acdb..b51a23300ba2 100644
--- a/drivers/net/wireless/ralink/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800usb.c
@@ -618,7 +618,7 @@ static int rt2800usb_probe_hw(struct rt2x00_dev *rt2x00dev)
/*
* Set txstatus timer function.
*/
- rt2x00dev->txstatus_timer.function = rt2800usb_tx_sta_fifo_timeout;
+ hrtimer_update_function(&rt2x00dev->txstatus_timer, rt2800usb_tx_sta_fifo_timeout);
/*
* Overwrite TX done handler
--
2.39.5
Powered by blists - more mailing lists