diff options
| author | Nam Cao <[email protected]> | 2025-02-05 10:46:07 +0000 |
|---|---|---|
| committer | Thomas Gleixner <[email protected]> | 2025-02-18 10:19:04 +0000 |
| commit | 5f8401cf7b3af468b29770d31cc993c2b6e5f027 (patch) | |
| tree | b35be16b6ab3b5a62fcf602bfe719d18e057c150 /drivers/perf/arm-ccn.c | |
| parent | power: reset: ltc2952-poweroff: Switch to use hrtimer_setup() (diff) | |
| download | kernel-5f8401cf7b3af468b29770d31cc993c2b6e5f027.tar.gz kernel-5f8401cf7b3af468b29770d31cc993c2b6e5f027.zip | |
drivers: perf: 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 <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Acked-by: Zack Rusin <[email protected]>
Link: https://lore.kernel.org/all/471ea3b829d14a4b4c3c7814dbe1ed13b15d47b8.1738746904.git.namcao@linutronix.de
Diffstat (limited to 'drivers/perf/arm-ccn.c')
| -rw-r--r-- | drivers/perf/arm-ccn.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/perf/arm-ccn.c b/drivers/perf/arm-ccn.c index d5fcea3d4328..1a0d0e1a2263 100644 --- a/drivers/perf/arm-ccn.c +++ b/drivers/perf/arm-ccn.c @@ -1273,9 +1273,8 @@ static int arm_ccn_pmu_init(struct arm_ccn *ccn) /* No overflow interrupt? Have to use a timer instead. */ if (!ccn->irq) { dev_info(ccn->dev, "No access to interrupts, using timer.\n"); - hrtimer_init(&ccn->dt.hrtimer, CLOCK_MONOTONIC, - HRTIMER_MODE_REL); - ccn->dt.hrtimer.function = arm_ccn_pmu_timer_handler; + hrtimer_setup(&ccn->dt.hrtimer, arm_ccn_pmu_timer_handler, CLOCK_MONOTONIC, + HRTIMER_MODE_REL); } /* Pick one CPU which we will use to collect data from CCN... */ |
