[Skiboot] [PATCH 07/15] FSP/LED: Validate before creating led node
Vasant Hegde
hegdevasant at linux.vnet.ibm.com
Fri Mar 20 23:08:22 AEDT 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.
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 63cfeae..e2a0ac1 100644
--- a/hw/fsp/fsp-leds.c
+++ b/hw/fsp/fsp-leds.c
@@ -1307,13 +1307,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