提交 fca050bb 编写于 作者: M Marek Behún 提交者: Pavel Machek

leds: turris-omnia: fix checkpatch warning

Use kstrtoul instead of sscanf to satisfy checkpatch.
Signed-off-by: NMarek Behún <kabel@kernel.org>
Signed-off-by: NPavel Machek <pavel@ucw.cz>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册