Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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()

+44 -48
+7 -9
arch/m68k/68000/timers.c
··· 68 68 69 69 /***************************************************************************/ 70 70 71 - static struct irqaction m68328_timer_irq = { 72 - .name = "timer", 73 - .flags = IRQF_TIMER, 74 - .handler = hw_tick, 75 - }; 76 - 77 - /***************************************************************************/ 78 - 79 71 static u64 m68328_read_clk(struct clocksource *cs) 80 72 { 81 73 unsigned long flags; ··· 94 102 95 103 void hw_timer_init(irq_handler_t handler) 96 104 { 105 + int ret; 106 + 97 107 /* disable timer 1 */ 98 108 TCTL = 0; 99 109 100 110 /* set ISR */ 101 - setup_irq(TMR_IRQ_NUM, &m68328_timer_irq); 111 + ret = request_irq(TMR_IRQ_NUM, hw_tick, IRQF_TIMER, "timer", NULL); 112 + if (ret) { 113 + pr_err("Failed to request irq %d (timer): %pe\n", TMR_IRQ_NUM, 114 + ERR_PTR(ret)); 115 + } 102 116 103 117 /* Restart mode, Enable int, Set clock source */ 104 118 TCTL = TCTL_OM | TCTL_IRQEN | CLOCK_SOURCE;
+7 -9
arch/m68k/coldfire/pit.c
··· 111 111 112 112 /***************************************************************************/ 113 113 114 - static struct irqaction pit_irq = { 115 - .name = "timer", 116 - .flags = IRQF_TIMER, 117 - .handler = pit_tick, 118 - }; 119 - 120 - /***************************************************************************/ 121 - 122 114 static u64 pit_read_clk(struct clocksource *cs) 123 115 { 124 116 unsigned long flags; ··· 138 146 139 147 void hw_timer_init(irq_handler_t handler) 140 148 { 149 + int ret; 150 + 141 151 cf_pit_clockevent.cpumask = cpumask_of(smp_processor_id()); 142 152 cf_pit_clockevent.mult = div_sc(FREQ, NSEC_PER_SEC, 32); 143 153 cf_pit_clockevent.max_delta_ns = ··· 150 156 cf_pit_clockevent.min_delta_ticks = 0x3f; 151 157 clockevents_register_device(&cf_pit_clockevent); 152 158 153 - setup_irq(MCF_IRQ_PIT1, &pit_irq); 159 + ret = request_irq(MCF_IRQ_PIT1, pit_tick, IRQF_TIMER, "timer", NULL); 160 + if (ret) { 161 + pr_err("Failed to request irq %d (timer): %pe\n", MCF_IRQ_PIT1, 162 + ERR_PTR(ret)); 163 + } 154 164 155 165 clocksource_register_hz(&pit_clk, FREQ); 156 166 }
+15 -14
arch/m68k/coldfire/sltimers.c
··· 50 50 return IRQ_HANDLED; 51 51 } 52 52 53 - static struct irqaction mcfslt_profile_irq = { 54 - .name = "profile timer", 55 - .flags = IRQF_TIMER, 56 - .handler = mcfslt_profile_tick, 57 - }; 58 - 59 53 void mcfslt_profile_init(void) 60 54 { 55 + int ret; 56 + 61 57 printk(KERN_INFO "PROFILE: lodging TIMER 1 @ %dHz as profile timer\n", 62 58 PROFILEHZ); 63 59 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 + } 65 66 66 67 /* Set up TIMER 2 as high speed profile clock */ 67 68 __raw_writel(MCF_BUSCLK / PROFILEHZ - 1, PA(MCFSLT_STCNT)); ··· 93 92 return timer_interrupt(irq, dummy); 94 93 } 95 94 96 - static struct irqaction mcfslt_timer_irq = { 97 - .name = "timer", 98 - .flags = IRQF_TIMER, 99 - .handler = mcfslt_tick, 100 - }; 101 - 102 95 static u64 mcfslt_read_clk(struct clocksource *cs) 103 96 { 104 97 unsigned long flags; ··· 121 126 122 127 void hw_timer_init(irq_handler_t handler) 123 128 { 129 + int r; 130 + 124 131 mcfslt_cycles_per_jiffy = MCF_BUSCLK / HZ; 125 132 /* 126 133 * The coldfire slice timer (SLT) runs from STCNT to 0 included, ··· 137 140 mcfslt_cnt = mcfslt_cycles_per_jiffy; 138 141 139 142 timer_interrupt = handler; 140 - setup_irq(MCF_IRQ_TIMER, &mcfslt_timer_irq); 143 + r = request_irq(MCF_IRQ_TIMER, mcfslt_tick, IRQF_TIMER, "timer", NULL); 144 + if (r) { 145 + pr_err("Failed to request irq %d (timer): %pe\n", MCF_IRQ_TIMER, 146 + ERR_PTR(r)); 147 + } 141 148 142 149 clocksource_register_hz(&mcfslt_clk, MCF_BUSCLK); 143 150
+15 -16
arch/m68k/coldfire/timers.c
··· 82 82 83 83 /***************************************************************************/ 84 84 85 - static struct irqaction mcftmr_timer_irq = { 86 - .name = "timer", 87 - .flags = IRQF_TIMER, 88 - .handler = mcftmr_tick, 89 - }; 90 - 91 - /***************************************************************************/ 92 - 93 85 static u64 mcftmr_read_clk(struct clocksource *cs) 94 86 { 95 87 unsigned long flags; ··· 110 118 111 119 void hw_timer_init(irq_handler_t handler) 112 120 { 121 + int r; 122 + 113 123 __raw_writew(MCFTIMER_TMR_DISABLE, TA(MCFTIMER_TMR)); 114 124 mcftmr_cycles_per_jiffy = FREQ / HZ; 115 125 /* ··· 128 134 129 135 timer_interrupt = handler; 130 136 init_timer_irq(); 131 - setup_irq(MCF_IRQ_TIMER, &mcftmr_timer_irq); 137 + r = request_irq(MCF_IRQ_TIMER, mcftmr_tick, IRQF_TIMER, "timer", NULL); 138 + if (r) { 139 + pr_err("Failed to request irq %d (timer): %pe\n", MCF_IRQ_TIMER, 140 + ERR_PTR(r)); 141 + } 132 142 133 143 #ifdef CONFIG_HIGHPROFILE 134 144 coldfire_profile_init(); ··· 168 170 169 171 /***************************************************************************/ 170 172 171 - static struct irqaction coldfire_profile_irq = { 172 - .name = "profile timer", 173 - .flags = IRQF_TIMER, 174 - .handler = coldfire_profile_tick, 175 - }; 176 - 177 173 void coldfire_profile_init(void) 178 174 { 175 + int ret; 176 + 179 177 printk(KERN_INFO "PROFILE: lodging TIMER2 @ %dHz as profile timer\n", 180 178 PROFILEHZ); 181 179 ··· 182 188 __raw_writew(MCFTIMER_TMR_ENORI | MCFTIMER_TMR_CLK16 | 183 189 MCFTIMER_TMR_RESTART | MCFTIMER_TMR_ENABLE, PA(MCFTIMER_TMR)); 184 190 185 - setup_irq(MCF_IRQ_PROFILER, &coldfire_profile_irq); 191 + ret = request_irq(MCF_IRQ_PROFILER, coldfire_profile_tick, IRQF_TIMER, 192 + "profile timer", NULL); 193 + if (ret) { 194 + pr_err("Failed to request irq %d (profile timer): %pe\n", 195 + MCF_IRQ_PROFILER, ERR_PTR(ret)); 196 + } 186 197 } 187 198 188 199 /***************************************************************************/