提交 7a5de56d 编写于 作者: C Colin Ian King 提交者: Jacek Anaszewski

leds: max8997: use mode when calling max8997_led_set_mode

Variable mode is assigned to pdata->led_pdata->mode[led->id] and yet
is not being used when calling function max8997_led_set_mode. Fix
this by using mode when calling max8997_led_set_mode.

Cleans up clang warning:
warning: variable 'mode' set but not used [-Wunused-but-set-variable]

Fixes: 8584cb82 ("leds: Add suuport for MAX8997-LED driver")
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Signed-off-by: NJacek Anaszewski <jacek.anaszewski@gmail.com>
上级 dd08ac2e
...@@ -268,7 +268,7 @@ static int max8997_led_probe(struct platform_device *pdev) ...@@ -268,7 +268,7 @@ static int max8997_led_probe(struct platform_device *pdev)
mode = pdata->led_pdata->mode[led->id]; mode = pdata->led_pdata->mode[led->id];
brightness = pdata->led_pdata->brightness[led->id]; brightness = pdata->led_pdata->brightness[led->id];
max8997_led_set_mode(led, pdata->led_pdata->mode[led->id]); max8997_led_set_mode(led, mode);
if (brightness > led->cdev.max_brightness) if (brightness > led->cdev.max_brightness)
brightness = led->cdev.max_brightness; brightness = led->cdev.max_brightness;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册