Message ID | 20150406083035.24643.98358.stgit@localhost.localdomain |
---|---|
State | Accepted |
Headers | show |
diff --git a/hw/fsp/fsp-leds.c b/hw/fsp/fsp-leds.c index d25376d..a932016 100644 --- a/hw/fsp/fsp-leds.c +++ b/hw/fsp/fsp-leds.c @@ -1306,13 +1306,14 @@ void create_led_device_nodes(void) return; } - /* LED parent node */ - pled = dt_new(opal_node, DT_PROPERTY_LED_NODE); + /* Get LED node */ + pled = dt_find_by_path(opal_node, DT_PROPERTY_LED_NODE); if (!pled) { prlog(PR_WARNING, PREFIX - "Parent device node creation failed\n"); + "Parent device node not available\n"); return; } + dt_add_property_strings(pled, "compatible", DT_PROPERTY_LED_COMPATIBLE); /* LED child nodes */
We get SAI indicator via HDAT. So we have to create led node while parsing HDAT itself. Lets get led node from device tree. Note that LED DT creation fails until next commit...which creates LED device tree node. Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com> --- hw/fsp/fsp-leds.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)