pinctrl: starfive: jhb100: use str_enable_disable()
Subsystems (2)
PATCH 1/1 pinctrl: starfive: jhb100: use str_enable_disable()
Replace the open coded ternary in the jhb100_irq_set_wake() function with the helper from string_choices.h. Gives same output.
Signed-off-by Aryan Sinha <[email protected]>
--- drivers/pinctrl/starfive/pinctrl-starfive-jhb100.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/pinctrl/starfive/pinctrl-starfive-jhb100.c +2 -1
@@ -20,6 +20,7 @@#include <linux/seq_file.h> #include <linux/spinlock.h> #include <linux/string.h> +#include <linux/string_choices.h> #include <linux/pinctrl/consumer.h> #include <linux/pinctrl/pinconf.h>
@@ -1152,7 +1153,7 @@ static int jhb100_irq_set_wake(struct irq_data *d, unsigned int enable) ret =disable_irq_wake (sfp->irq);if (ret)dev_err (sfp->dev,"failed to %s wake-up interrupt\n" , - enable ?"enable" :"disable" ); +str_enable_disable (enable));return ret; }
Signature · 1 line
2.46.0
Quoted 5 lines
Replace the open coded ternary in the
jhb100_irq_set_wake()function with the helper fromstring_choices.h. Gives same output.Signed-off-by Aryan Sinha <[email protected]>
Reviewed-by Changhuang Liang <[email protected]>
Best Regards,
Changhuang
Quoted 29 lines
--- drivers/pinctrl/starfive/pinctrl-starfive-jhb100.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/pinctrl/starfive/pinctrl-starfive-jhb100.c +2
-1@@ -20,6 +20,7 @@#include <linux/seq_file.h> #include <linux/spinlock.h> #include <linux/string.h> +#include <linux/string_choices.h> #include <linux/pinctrl/consumer.h> #include <linux/pinctrl/pinconf.h> @@ -1152,7 +1153,7 @@ static int jhb100_irq_set_wake(struct irq_data *d, unsigned int enable) ret =disable_irq_wake (sfp->irq);if (ret)dev_err (sfp->dev,"failed to %s wake-up interrupt\n" , - enable ?"enable" :"disable" ); +str_enable_disable (enable));return ret;}
--
2.46.0
Linus Walleij
maintainerQuoted 4 lines · Aryan Sinha
Replace the open coded ternary in the
jhb100_irq_set_wake()function with the helper fromstring_choices.h. Gives same output.Signed-off-by Aryan Sinha <[email protected]>
Patch applied!
Yours,
Linus Walleij