treewide: access device tree from userspace via /proc/
[openwrt/openwrt.git] / target / linux / ipq806x / base-files / lib / ipq806x.sh
index a8b909ac04870740d75de1a5a8c8b144a9e7fd95..2a08a19b80c8b0c24d1017cc39b52536205bb963 100644 (file)
@@ -17,6 +17,9 @@ ipq806x_board_detect() {
        *"AP148")
                name="ap148"
                ;;
+       *"4040")
+               name="fritz4040"
+               ;;
        *"C2600")
                name="c2600"
                ;;
@@ -69,7 +72,7 @@ ipq806x_board_name() {
 ipq806x_get_dt_led() {
        local label
        local ledpath
-       local basepath="/sys/firmware/devicetree/base"
+       local basepath="/proc/device-tree/base"
        local nodepath="$basepath/aliases/led-$1"
 
        [ -f "$nodepath" ] && ledpath=$(cat "$nodepath")