Skip to content

Commit 6cff482

Browse files
committed
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu
Pull m68knommu update from Greg Ungerer: "Only a single commit, to remove all use of the obsolete setup_irq() calls within the m68knommu architecture code" * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu: m68k: Replace setup_irq() by request_irq()
2 parents eab4002 + ba00076 commit 6cff482

File tree

4 files changed

+44
-48
lines changed

4 files changed

+44
-48
lines changed

arch/m68k/68000/timers.c

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,6 @@ static irqreturn_t hw_tick(int irq, void *dummy)
6868

6969
/***************************************************************************/
7070

71-
static struct irqaction m68328_timer_irq = {
72-
.name = "timer",
73-
.flags = IRQF_TIMER,
74-
.handler = hw_tick,
75-
};
76-
77-
/***************************************************************************/
78-
7971
static u64 m68328_read_clk(struct clocksource *cs)
8072
{
8173
unsigned long flags;
@@ -102,11 +94,17 @@ static struct clocksource m68328_clk = {
10294

10395
void hw_timer_init(irq_handler_t handler)
10496
{
97+
int ret;
98+
10599
/* disable timer 1 */
106100
TCTL = 0;
107101

108102
/* set ISR */
109-
setup_irq(TMR_IRQ_NUM, &m68328_timer_irq);
103+
ret = request_irq(TMR_IRQ_NUM, hw_tick, IRQF_TIMER, "timer", NULL);
104+
if (ret) {
105+
pr_err("Failed to request irq %d (timer): %pe\n", TMR_IRQ_NUM,
106+
ERR_PTR(ret));
107+
}
110108

111109
/* Restart mode, Enable int, Set clock source */
112110
TCTL = TCTL_OM | TCTL_IRQEN | CLOCK_SOURCE;

arch/m68k/coldfire/pit.c

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,6 @@ static irqreturn_t pit_tick(int irq, void *dummy)
111111

112112
/***************************************************************************/
113113

114-
static struct irqaction pit_irq = {
115-
.name = "timer",
116-
.flags = IRQF_TIMER,
117-
.handler = pit_tick,
118-
};
119-
120-
/***************************************************************************/
121-
122114
static u64 pit_read_clk(struct clocksource *cs)
123115
{
124116
unsigned long flags;
@@ -146,6 +138,8 @@ static struct clocksource pit_clk = {
146138

147139
void hw_timer_init(irq_handler_t handler)
148140
{
141+
int ret;
142+
149143
cf_pit_clockevent.cpumask = cpumask_of(smp_processor_id());
150144
cf_pit_clockevent.mult = div_sc(FREQ, NSEC_PER_SEC, 32);
151145
cf_pit_clockevent.max_delta_ns =
@@ -156,7 +150,11 @@ void hw_timer_init(irq_handler_t handler)
156150
cf_pit_clockevent.min_delta_ticks = 0x3f;
157151
clockevents_register_device(&cf_pit_clockevent);
158152

159-
setup_irq(MCF_IRQ_PIT1, &pit_irq);
153+
ret = request_irq(MCF_IRQ_PIT1, pit_tick, IRQF_TIMER, "timer", NULL);
154+
if (ret) {
155+
pr_err("Failed to request irq %d (timer): %pe\n", MCF_IRQ_PIT1,
156+
ERR_PTR(ret));
157+
}
160158

161159
clocksource_register_hz(&pit_clk, FREQ);
162160
}

arch/m68k/coldfire/sltimers.c

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,19 @@ irqreturn_t mcfslt_profile_tick(int irq, void *dummy)
5050
return IRQ_HANDLED;
5151
}
5252

53-
static struct irqaction mcfslt_profile_irq = {
54-
.name = "profile timer",
55-
.flags = IRQF_TIMER,
56-
.handler = mcfslt_profile_tick,
57-
};
58-
5953
void mcfslt_profile_init(void)
6054
{
55+
int ret;
56+
6157
printk(KERN_INFO "PROFILE: lodging TIMER 1 @ %dHz as profile timer\n",
6258
PROFILEHZ);
6359

64-
setup_irq(MCF_IRQ_PROFILER, &mcfslt_profile_irq);
60+
ret = request_irq(MCF_IRQ_PROFILER, mcfslt_profile_tick, IRQF_TIMER,
61+
"profile timer", NULL);
62+
if (ret) {
63+
pr_err("Failed to request irq %d (profile timer): %pe\n",
64+
MCF_IRQ_PROFILER, ERR_PTR(ret));
65+
}
6566

6667
/* Set up TIMER 2 as high speed profile clock */
6768
__raw_writel(MCF_BUSCLK / PROFILEHZ - 1, PA(MCFSLT_STCNT));
@@ -92,12 +93,6 @@ static irqreturn_t mcfslt_tick(int irq, void *dummy)
9293
return timer_interrupt(irq, dummy);
9394
}
9495

95-
static struct irqaction mcfslt_timer_irq = {
96-
.name = "timer",
97-
.flags = IRQF_TIMER,
98-
.handler = mcfslt_tick,
99-
};
100-
10196
static u64 mcfslt_read_clk(struct clocksource *cs)
10297
{
10398
unsigned long flags;
@@ -126,6 +121,8 @@ static struct clocksource mcfslt_clk = {
126121

127122
void hw_timer_init(irq_handler_t handler)
128123
{
124+
int r;
125+
129126
mcfslt_cycles_per_jiffy = MCF_BUSCLK / HZ;
130127
/*
131128
* The coldfire slice timer (SLT) runs from STCNT to 0 included,
@@ -140,7 +137,11 @@ void hw_timer_init(irq_handler_t handler)
140137
mcfslt_cnt = mcfslt_cycles_per_jiffy;
141138

142139
timer_interrupt = handler;
143-
setup_irq(MCF_IRQ_TIMER, &mcfslt_timer_irq);
140+
r = request_irq(MCF_IRQ_TIMER, mcfslt_tick, IRQF_TIMER, "timer", NULL);
141+
if (r) {
142+
pr_err("Failed to request irq %d (timer): %pe\n", MCF_IRQ_TIMER,
143+
ERR_PTR(r));
144+
}
144145

145146
clocksource_register_hz(&mcfslt_clk, MCF_BUSCLK);
146147

arch/m68k/coldfire/timers.c

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,6 @@ static irqreturn_t mcftmr_tick(int irq, void *dummy)
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 @@ static struct clocksource mcftmr_clk = {
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 @@ void hw_timer_init(irq_handler_t handler)
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 @@ irqreturn_t coldfire_profile_tick(int irq, void *dummy)
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 @@ void coldfire_profile_init(void)
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
/***************************************************************************/

0 commit comments

Comments
 (0)