mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 06:04:14 +08:00
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>
This commit is contained in:
parent
5d47ce1d81
commit
fca050bb3c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user