Fix the build error for the wrong code when CONFIG_SPL_LED is enabled.
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
#include <dm.h>
#include <hang.h>
#include <init.h>
+#include <led.h>
#include <log.h>
#include <syscon.h>
#include <asm/io.h>
}
#ifdef CONFIG_SPL_BUILD
+DECLARE_GLOBAL_DATA_PTR;
static int setup_led(void)
{
#ifdef CONFIG_SPL_LED
debug("%s: get=%d\n", __func__, ret);
return ret;
}
- ret = led_set_on(dev, 1);
+ ret = led_set_state(dev, LEDST_ON);
if (ret)
return ret;
#endif