]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
genirq/irqdesc: Use str_enabled_disabled() helper in wakeup_show()
authorThorsten Blum <thorsten.blum@linux.dev>
Sat, 26 Oct 2024 15:40:29 +0000 (17:40 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Sun, 27 Oct 2024 09:42:09 +0000 (10:42 +0100)
Remove hard-coded strings by using the str_enabled_disabled() helper
function.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20241026154029.158977-2-thorsten.blum@linux.dev
kernel/irq/irqdesc.c

index 479cf1caa610fdc91d82e548a3a2a672346fdbaa..0253e77fcd9a6629aa8d80be31d0f4f8279cd915 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/maple_tree.h>
 #include <linux/irqdomain.h>
 #include <linux/sysfs.h>
+#include <linux/string_choices.h>
 
 #include "internals.h"
 
@@ -320,8 +321,7 @@ static ssize_t wakeup_show(struct kobject *kobj,
        ssize_t ret = 0;
 
        raw_spin_lock_irq(&desc->lock);
-       ret = sprintf(buf, "%s\n",
-                     irqd_is_wakeup_set(&desc->irq_data) ? "enabled" : "disabled");
+       ret = sprintf(buf, "%s\n", str_enabled_disabled(irqd_is_wakeup_set(&desc->irq_data)));
        raw_spin_unlock_irq(&desc->lock);
 
        return ret;