lantiq: use aliases device tree node for leds
[openwrt/openwrt.git] / target / linux / lantiq / base-files / lib / functions / lantiq.sh
index 456e54bb3f9d3381acf2c0f3f9e5de5eb9a69ce6..e4eb4d723f19d147c36f2d7b2ef818b55e8b5f7f 100644 (file)
@@ -32,7 +32,7 @@ lantiq_get_dt_led() {
        local label
        local ledpath
        local basepath="/sys/firmware/devicetree/base"
-       local nodepath="$basepath/chosen/leds/$1"
+       local nodepath="$basepath/aliases/led-$1"
 
        [ -f "$nodepath" ] && ledpath=$(cat "$nodepath")
        [ -n "$ledpath" ] && label=$(cat "$basepath$ledpath/label")