led: Use STATUS_LED_ON and STATUS_LED_OFF when calling __led_set
This fixes the gpio_led driver which needs to compare againt a STATUS_LED_ON to enable a led. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
This commit is contained in:
parent
920178d381
commit
af73034c6b
@ -110,13 +110,15 @@ int do_led (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
|
|||||||
if (led_commands[i].on)
|
if (led_commands[i].on)
|
||||||
led_commands[i].on();
|
led_commands[i].on();
|
||||||
else
|
else
|
||||||
__led_set(led_commands[i].mask, 1);
|
__led_set(led_commands[i].mask,
|
||||||
|
STATUS_LED_ON);
|
||||||
break;
|
break;
|
||||||
case LED_OFF:
|
case LED_OFF:
|
||||||
if (led_commands[i].off)
|
if (led_commands[i].off)
|
||||||
led_commands[i].off();
|
led_commands[i].off();
|
||||||
else
|
else
|
||||||
__led_set(led_commands[i].mask, 0);
|
__led_set(led_commands[i].mask,
|
||||||
|
STATUS_LED_OFF);
|
||||||
break;
|
break;
|
||||||
case LED_TOGGLE:
|
case LED_TOGGLE:
|
||||||
if (led_commands[i].toggle)
|
if (led_commands[i].toggle)
|
||||||
|
Loading…
Reference in New Issue
Block a user