diff options
author | Marek BehĂșn <kabel@kernel.org> | 2020-10-30 03:39:04 +0100 |
---|---|---|
committer | Pavel Machek <pavel@ucw.cz> | 2020-11-25 13:25:27 +0100 |
commit | fca050bb3c81dc7e6df9b1d02f3007cbec0dd898 (patch) | |
tree | 1547c9ccc7a3e64e51020acd8d8d387cf7f8c6f9 /drivers/leds | |
parent | leds: turris-omnia: wrap to 80 columns (diff) | |
download | linux-fca050bb3c81dc7e6df9b1d02f3007cbec0dd898.tar.xz linux-fca050bb3c81dc7e6df9b1d02f3007cbec0dd898.zip |
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>
Diffstat (limited to 'drivers/leds')
-rw-r--r-- | drivers/leds/leds-turris-omnia.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/leds/leds-turris-omnia.c b/drivers/leds/leds-turris-omnia.c index 096ed7b81957..c0b4e1e0e945 100644 --- a/drivers/leds/leds-turris-omnia.c +++ b/drivers/leds/leds-turris-omnia.c @@ -174,10 +174,10 @@ static ssize_t brightness_store(struct device *dev, struct device_attribute *a, { struct i2c_client *client = to_i2c_client(dev); struct omnia_leds *leds = i2c_get_clientdata(client); - unsigned int brightness; + unsigned long brightness; int ret; - if (sscanf(buf, "%u", &brightness) != 1) + if (kstrtoul(buf, 10, &brightness)) return -EINVAL; if (brightness > 100) |