treewide: access device tree from userspace via /proc/
authorMathias Kresin <dev@kresin.me>
Wed, 10 May 2017 08:44:18 +0000 (10:44 +0200)
committerMathias Kresin <dev@kresin.me>
Fri, 26 May 2017 06:04:15 +0000 (08:04 +0200)
Access the device tree via /proc/device-tree/ is the documented way to
access the properties. Everything else might not work in future.

Signed-off-by: Mathias Kresin <dev@kresin.me>
target/linux/ipq806x/base-files/lib/ipq806x.sh
target/linux/lantiq/base-files/lib/functions/lantiq.sh

index 348a3a8..2a08a19 100644 (file)
@@ -72,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")
index d9758f5..6459e30 100644 (file)
@@ -3,7 +3,7 @@
 lantiq_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")