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: 8584cb82f1
("leds: Add suuport for MAX8997-LED driver")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
This commit is contained in:
parent
dd08ac2e5f
commit
7a5de56db9
1 changed files with 1 additions and 1 deletions
|
@ -268,7 +268,7 @@ static int max8997_led_probe(struct platform_device *pdev)
|
|||
mode = pdata->led_pdata->mode[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)
|
||||
brightness = led->cdev.max_brightness;
|
||||
|
|
Loading…
Reference in a new issue