Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

leds: turris-omnia: fix checkpatch warning

Use kstrtoul instead of sscanf to satisfy checkpatch.

Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Pavel Machek <pavel@ucw.cz>

authored by

Marek Behún and committed by
Pavel Machek
fca050bb 5d47ce1d

+2 -2
+2 -2
drivers/leds/leds-turris-omnia.c
··· 174 174 { 175 175 struct i2c_client *client = to_i2c_client(dev); 176 176 struct omnia_leds *leds = i2c_get_clientdata(client); 177 - unsigned int brightness; 177 + unsigned long brightness; 178 178 int ret; 179 179 180 - if (sscanf(buf, "%u", &brightness) != 1) 180 + if (kstrtoul(buf, 10, &brightness)) 181 181 return -EINVAL; 182 182 183 183 if (brightness > 100)