leds: trigger: gpio: Convert to use kstrtox()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 3 Nov 2023 19:53:08 +0000 (21:53 +0200)
committerLee Jones <lee@kernel.org>
Wed, 13 Dec 2023 11:28:37 +0000 (11:28 +0000)
commit7d6766f5377686b871ab52c564327718ece233ad
treee2a999c93fcab3c39f318821e26e3707ffa576d0
parent9bbd6b7209cf1e26390975b7617a29901c8990a1
leds: trigger: gpio: Convert to use kstrtox()

sscanf() is a heavy one and moreover requires additional boundary checks.
Convert driver to use kstrtou8() in gpio_trig_inverted_store().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20231103195310.948327-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/leds/trigger/ledtrig-gpio.c