lkml.org 
[lkml]   [2020]   [Apr]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 2/3] clocksource/drivers/mips-gic-timer: Replace setup_percpu_irq() by request_percpu_irq() variant
Recently all usages of setup_irq() was replaced by request_irq() as
allocators are ready by the time setup_irq() was invoked. Similarly
setup_percpu_irq() can be replaced by request_percpu_irq(). But in the
callers handled here __request_percpu_irq() has to be used as
request_percpu_irq() does not give the user a chance to pass the flags,
and IRQF_TIMER has to be passed here, so the variant
__request_percpu_irq() is used.

Signed-off-by: afzal mohammed <afzal.mohd.ma@gmail.com>
---
drivers/clocksource/mips-gic-timer.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/clocksource/mips-gic-timer.c b/drivers/clocksource/mips-gic-timer.c
index 37671a5d4ed9..e8e6bb6159f5 100644
--- a/drivers/clocksource/mips-gic-timer.c
+++ b/drivers/clocksource/mips-gic-timer.c
@@ -67,13 +67,6 @@ static irqreturn_t gic_compare_interrupt(int irq, void *dev_id)
return IRQ_HANDLED;
}

-static struct irqaction gic_compare_irqaction = {
- .handler = gic_compare_interrupt,
- .percpu_dev_id = &gic_clockevent_device,
- .flags = IRQF_PERCPU | IRQF_TIMER,
- .name = "timer",
-};
-
static void gic_clockevent_cpu_init(unsigned int cpu,
struct clock_event_device *cd)
{
@@ -137,7 +130,8 @@ static int gic_clockevent_init(void)
if (!gic_frequency)
return -ENXIO;

- ret = setup_percpu_irq(gic_timer_irq, &gic_compare_irqaction);
+ ret = __request_percpu_irq(gic_timer_irq, gic_compare_interrupt,
+ IRQF_TIMER, "timer", &gic_clockevent_device);
if (ret < 0) {
pr_err("IRQ %d setup failed (%d)\n", gic_timer_irq, ret);
return ret;
--
2.18.0
\
 
 \ /
  Last update: 2020-04-11 18:05    [W:0.941 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site