Commit f3925032 authored by Thomas Gleixner's avatar Thomas Gleixner

pinctrl: nomadik: Use irq_has_action()

Let the core code do the fiddling with irq_desc.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20201210194044.065003856@linutronix.de
parent 9c6508b9
...@@ -948,8 +948,8 @@ static void nmk_gpio_dbg_show_one(struct seq_file *s, ...@@ -948,8 +948,8 @@ static void nmk_gpio_dbg_show_one(struct seq_file *s,
(mode < 0) ? "unknown" : modes[mode]); (mode < 0) ? "unknown" : modes[mode]);
} else { } else {
int irq = chip->to_irq(chip, offset); int irq = chip->to_irq(chip, offset);
struct irq_desc *desc = irq_to_desc(irq);
const int pullidx = pull ? 1 : 0; const int pullidx = pull ? 1 : 0;
bool wake;
int val; int val;
static const char * const pulls[] = { static const char * const pulls[] = {
"none ", "none ",
...@@ -969,8 +969,9 @@ static void nmk_gpio_dbg_show_one(struct seq_file *s, ...@@ -969,8 +969,9 @@ static void nmk_gpio_dbg_show_one(struct seq_file *s,
* This races with request_irq(), set_irq_type(), * This races with request_irq(), set_irq_type(),
* and set_irq_wake() ... but those are "rare". * and set_irq_wake() ... but those are "rare".
*/ */
if (irq > 0 && desc && desc->action) { if (irq > 0 && irq_has_action(irq)) {
char *trigger; char *trigger;
bool wake;
if (nmk_chip->edge_rising & BIT(offset)) if (nmk_chip->edge_rising & BIT(offset))
trigger = "edge-rising"; trigger = "edge-rising";
...@@ -979,10 +980,10 @@ static void nmk_gpio_dbg_show_one(struct seq_file *s, ...@@ -979,10 +980,10 @@ static void nmk_gpio_dbg_show_one(struct seq_file *s,
else else
trigger = "edge-undefined"; trigger = "edge-undefined";
wake = !!(nmk_chip->real_wake & BIT(offset));
seq_printf(s, " irq-%d %s%s", seq_printf(s, " irq-%d %s%s",
irq, trigger, irq, trigger, wake ? " wakeup" : "");
irqd_is_wakeup_set(&desc->irq_data)
? " wakeup" : "");
} }
} }
clk_disable(nmk_chip->clk); clk_disable(nmk_chip->clk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment