lantiq: use aliases device tree node for leds

The chosen node is clearly the wrong place for aliases.

Signed-off-by: Mathias Kresin <dev@kresin.me>
This commit is contained in:
Mathias Kresin
2016-10-04 20:34:03 +02:00
parent 8b639410d1
commit e07c80dfc8
36 changed files with 274 additions and 282 deletions

View 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")