summaryrefslogtreecommitdiff
path: root/drivers/leds
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2018-07-02 19:50:37 +0300
committerJacek Anaszewski <jacek.anaszewski@gmail.com>2018-07-03 23:12:41 +0300
commit7a5de56db902ea632a0ff0c2b47481d278db645f (patch)
tree1e7c95168e3114499983cf7a7b3bc5286bbd96b9 /drivers/leds
parentdd08ac2e5fbc867c5793c3fc0404ef16390b5206 (diff)
downloadlinux-7a5de56db902ea632a0ff0c2b47481d278db645f.tar.xz
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: 8584cb82f151 ("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>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/leds-max8997.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/leds/leds-max8997.c b/drivers/leds/leds-max8997.c
index 4edf74f1d6d4..8c019c28f9f5 100644
--- a/drivers/leds/leds-max8997.c
+++ b/drivers/leds/leds-max8997.c
@@ -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;