hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/m68k/coldfire/timers.c
....@@ -82,14 +82,6 @@
8282
8383 /***************************************************************************/
8484
85
-static struct irqaction mcftmr_timer_irq = {
86
- .name = "timer",
87
- .flags = IRQF_TIMER,
88
- .handler = mcftmr_tick,
89
-};
90
-
91
-/***************************************************************************/
92
-
9385 static u64 mcftmr_read_clk(struct clocksource *cs)
9486 {
9587 unsigned long flags;
....@@ -118,6 +110,8 @@
118110
119111 void hw_timer_init(irq_handler_t handler)
120112 {
113
+ int r;
114
+
121115 __raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR));
122116 mcftmr_cycles_per_jiffy = FREQ / HZ;
123117 /*
....@@ -134,7 +128,11 @@
134128
135129 timer_interrupt = handler;
136130 init_timer_irq();
137
- setup_irq(MCF_IRQ_TIMER, &mcftmr_timer_irq);
131
+ r = request_irq(MCF_IRQ_TIMER, mcftmr_tick, IRQF_TIMER, "timer", NULL);
132
+ if (r) {
133
+ pr_err("Failed to request irq %d (timer): %pe\n", MCF_IRQ_TIMER,
134
+ ERR_PTR(r));
135
+ }
138136
139137 #ifdef CONFIG_HIGHPROFILE
140138 coldfire_profile_init();
....@@ -170,14 +168,10 @@
170168
171169 /***************************************************************************/
172170
173
-static struct irqaction coldfire_profile_irq = {
174
- .name = "profile timer",
175
- .flags = IRQF_TIMER,
176
- .handler = coldfire_profile_tick,
177
-};
178
-
179171 void coldfire_profile_init(void)
180172 {
173
+ int ret;
174
+
181175 printk(KERN_INFO "PROFILE: lodging TIMER2 @ %dHz as profile timer\n",
182176 PROFILEHZ);
183177
....@@ -188,7 +182,12 @@
188182 __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 |
189183 MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, PA(MCFTIMER_TMR));
190184
191
- setup_irq(MCF_IRQ_PROFILER, &coldfire_profile_irq);
185
+ ret = request_irq(MCF_IRQ_PROFILER, coldfire_profile_tick, IRQF_TIMER,
186
+ "profile timer", NULL);
187
+ if (ret) {
188
+ pr_err("Failed to request irq %d (profile timer): %pe\n",
189
+ MCF_IRQ_PROFILER, ERR_PTR(ret));
190
+ }
192191 }
193192
194193 /***************************************************************************/