hc
2024-05-16 8d2a02b24d66aa359e83eebc1ed3c0f85367a1cb
kernel/drivers/clocksource/timer-integrator-ap.c
....@@ -1,21 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Integrator/AP timer driver
34 * Copyright (C) 2000-2003 Deep Blue Solutions Ltd
45 * Copyright (c) 2014, Linaro Limited
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation; either version 2 of the License, or
9
- * (at your option) any later version.
10
- *
11
- * This program is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU General Public License for more details.
15
- *
16
- * You should have received a copy of the GNU General Public License
17
- * along with this program; if not, write to the Free Software
18
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
196 */
207
218 #include <linux/clk.h>
....@@ -136,13 +123,6 @@
136123 .rating = 300,
137124 };
138125
139
-static struct irqaction integrator_timer_irq = {
140
- .name = "timer",
141
- .flags = IRQF_TIMER | IRQF_IRQPOLL,
142
- .handler = integrator_timer_interrupt,
143
- .dev_id = &integrator_clockevent,
144
-};
145
-
146126 static int integrator_clockevent_init(unsigned long inrate,
147127 void __iomem *base, int irq)
148128 {
....@@ -162,7 +142,9 @@
162142 timer_reload = rate / HZ;
163143 writel(ctrl, clkevt_base + TIMER_CTRL);
164144
165
- ret = setup_irq(irq, &integrator_timer_irq);
145
+ ret = request_irq(irq, integrator_timer_interrupt,
146
+ IRQF_TIMER | IRQF_IRQPOLL, "timer",
147
+ &integrator_clockevent);
166148 if (ret)
167149 return ret;
168150
....@@ -189,7 +171,7 @@
189171
190172 clk = of_clk_get(node, 0);
191173 if (IS_ERR(clk)) {
192
- pr_err("No clock for %s\n", node->name);
174
+ pr_err("No clock for %pOFn\n", node);
193175 return PTR_ERR(clk);
194176 }
195177 clk_prepare_enable(clk);