Skip to content

Commit d1a128b

Browse files
tobluxKAGA-KOKO
authored andcommitted
genirq/irqdesc: Use str_enabled_disabled() helper in wakeup_show()
Remove hard-coded strings by using the str_enabled_disabled() helper function. Signed-off-by: Thorsten Blum <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent 2396eef commit d1a128b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/irq/irqdesc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/maple_tree.h>
1616
#include <linux/irqdomain.h>
1717
#include <linux/sysfs.h>
18+
#include <linux/string_choices.h>
1819

1920
#include "internals.h"
2021

@@ -320,8 +321,7 @@ static ssize_t wakeup_show(struct kobject *kobj,
320321
ssize_t ret = 0;
321322

322323
raw_spin_lock_irq(&desc->lock);
323-
ret = sprintf(buf, "%s\n",
324-
irqd_is_wakeup_set(&desc->irq_data) ? "enabled" : "disabled");
324+
ret = sprintf(buf, "%s\n", str_enabled_disabled(irqd_is_wakeup_set(&desc->irq_data)));
325325
raw_spin_unlock_irq(&desc->lock);
326326

327327
return ret;

0 commit comments

Comments
 (0)