Commit fca050bb authored by Marek Behún's avatar Marek Behún Committed by Pavel Machek

leds: turris-omnia: fix checkpatch warning

Use kstrtoul instead of sscanf to satisfy checkpatch.
Signed-off-by: default avatarMarek Behún <kabel@kernel.org>
Signed-off-by: default avatarPavel Machek <pavel@ucw.cz>
parent 5d47ce1d
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment