Skip to content

Commit f392503

Browse files
committed
pinctrl: nomadik: Use irq_has_action()
Let the core code do the fiddling with irq_desc. Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 9c6508b commit f392503

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

drivers/pinctrl/nomadik/pinctrl-nomadik.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -948,8 +948,8 @@ static void nmk_gpio_dbg_show_one(struct seq_file *s,
948948
(mode < 0) ? "unknown" : modes[mode]);
949949
} else {
950950
int irq = chip->to_irq(chip, offset);
951-
struct irq_desc *desc = irq_to_desc(irq);
952951
const int pullidx = pull ? 1 : 0;
952+
bool wake;
953953
int val;
954954
static const char * const pulls[] = {
955955
"none ",
@@ -969,8 +969,9 @@ static void nmk_gpio_dbg_show_one(struct seq_file *s,
969969
* This races with request_irq(), set_irq_type(),
970970
* and set_irq_wake() ... but those are "rare".
971971
*/
972-
if (irq > 0 && desc && desc->action) {
972+
if (irq > 0 && irq_has_action(irq)) {
973973
char *trigger;
974+
bool wake;
974975

975976
if (nmk_chip->edge_rising & BIT(offset))
976977
trigger = "edge-rising";
@@ -979,10 +980,10 @@ static void nmk_gpio_dbg_show_one(struct seq_file *s,
979980
else
980981
trigger = "edge-undefined";
981982

983+
wake = !!(nmk_chip->real_wake & BIT(offset));
984+
982985
seq_printf(s, " irq-%d %s%s",
983-
irq, trigger,
984-
irqd_is_wakeup_set(&desc->irq_data)
985-
? " wakeup" : "");
986+
irq, trigger, wake ? " wakeup" : "");
986987
}
987988
}
988989
clk_disable(nmk_chip->clk);

0 commit comments

Comments
 (0)