[Skiboot] [PATCH 04/12] FSP/LED: Validate before creating led node
Vasant Hegde
hegdevasant at linux.vnet.ibm.com
Mon Apr 6 17:04:46 AEST 2015
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 at linux.vnet.ibm.com>
---
hw/fsp/fsp-leds.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
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 */
More information about the Skiboot
mailing list