[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <173987198796.10177.7436957307001342420.tip-bot2@tip-bot2>
Date: Tue, 18 Feb 2025 09:46:27 -0000
From: "tip-bot2 for Nam Cao" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Nam Cao <namcao@...utronix.de>, Thomas Gleixner <tglx@...utronix.de>,
"Rafael J. Wysocki" <rafael@...nel.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: timers/cleanups] PM: runtime: Switch to use hrtimer_setup()
The following commit has been merged into the timers/cleanups branch of tip:
Commit-ID: efad91a9836e3c26194a18947e0af7f575c254fb
Gitweb: https://git.kernel.org/tip/efad91a9836e3c26194a18947e0af7f575c254fb
Author: Nam Cao <namcao@...utronix.de>
AuthorDate: Wed, 05 Feb 2025 11:39:12 +01:00
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Tue, 18 Feb 2025 10:32:34 +01:00
PM: runtime: Switch to use hrtimer_setup()
hrtimer_setup() takes the callback function pointer as argument and
initializes the timer completely.
Replace hrtimer_init() and the open coded initialization of
hrtimer::function with the new setup mechanism.
Patch was created by using Coccinelle.
Signed-off-by: Nam Cao <namcao@...utronix.de>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Acked-by: Rafael J. Wysocki <rafael@...nel.org>
Link: https://lore.kernel.org/all/8d1ce108b043896733ce08d3deea6e84941d499b.1738746821.git.namcao@linutronix.de
---
drivers/base/power/runtime.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c
index 2ee4584..425c43b 100644
--- a/drivers/base/power/runtime.c
+++ b/drivers/base/power/runtime.c
@@ -1764,8 +1764,8 @@ void pm_runtime_init(struct device *dev)
INIT_WORK(&dev->power.work, pm_runtime_work);
dev->power.timer_expires = 0;
- hrtimer_init(&dev->power.suspend_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
- dev->power.suspend_timer.function = pm_suspend_timer_fn;
+ hrtimer_setup(&dev->power.suspend_timer, pm_suspend_timer_fn, CLOCK_MONOTONIC,
+ HRTIMER_MODE_ABS);
init_waitqueue_head(&dev->power.wait_queue);
}
Powered by blists - more mailing lists