Commit 1c310074 authored by YueHaibing's avatar YueHaibing Committed by Jacek Anaszewski

leds: lt3593: Remove unneeded assignment in lt3593_led_probe

As the chip can't be queried for it's current state, the "keep" option
doesn't make sense. The only option in DT should be turn the LED on or
off at probe time. Also 'flags' is never used since introduction.
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Signed-off-by: default avatarJacek Anaszewski <jacek.anaszewski@gmail.com>
parent dd08e136
...@@ -66,7 +66,6 @@ static int lt3593_led_probe(struct platform_device *pdev) ...@@ -66,7 +66,6 @@ static int lt3593_led_probe(struct platform_device *pdev)
struct lt3593_led_data *led_data; struct lt3593_led_data *led_data;
struct fwnode_handle *child; struct fwnode_handle *child;
int ret, state = LEDS_GPIO_DEFSTATE_OFF; int ret, state = LEDS_GPIO_DEFSTATE_OFF;
enum gpiod_flags flags = GPIOD_OUT_LOW;
const char *tmp; const char *tmp;
if (!dev->of_node) if (!dev->of_node)
...@@ -99,13 +98,8 @@ static int lt3593_led_probe(struct platform_device *pdev) ...@@ -99,13 +98,8 @@ static int lt3593_led_probe(struct platform_device *pdev)
&led_data->cdev.default_trigger); &led_data->cdev.default_trigger);
if (!fwnode_property_read_string(child, "default-state", &tmp)) { if (!fwnode_property_read_string(child, "default-state", &tmp)) {
if (!strcmp(tmp, "keep")) { if (!strcmp(tmp, "on"))
state = LEDS_GPIO_DEFSTATE_KEEP;
flags = GPIOD_ASIS;
} else if (!strcmp(tmp, "on")) {
state = LEDS_GPIO_DEFSTATE_ON; state = LEDS_GPIO_DEFSTATE_ON;
flags = GPIOD_OUT_HIGH;
}
} }
led_data->cdev.name = led_data->name; led_data->cdev.name = led_data->name;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment