diff options
author | Christian Lamparter <chunkeey@gmail.com> | 2020-08-30 04:42:54 +0200 |
---|---|---|
committer | Christian Lamparter <chunkeey@gmail.com> | 2020-09-05 23:24:46 +0200 |
commit | a487e67cbc12025345f4af55f60af54f1d087005 (patch) | |
tree | a8b1aabe3abf50919e9049f45fd0a5735489d4bc /package/base-files | |
parent | 04e0e4167e1a66bc3b744634d65fb52d4a6954fe (diff) | |
download | upstream-a487e67cbc12025345f4af55f60af54f1d087005.tar.gz upstream-a487e67cbc12025345f4af55f60af54f1d087005.tar.bz2 upstream-a487e67cbc12025345f4af55f60af54f1d087005.zip |
base-files: support label-property-less in get_dt_leds
The LED's "label" property has been deprecated in upstream by:
|commit c5d18dd6b64e09dd6984bda9bdd55160af537a8c
|Author: Jacek Anaszewski <jacek.anaszewski@gmail.com>
|Date: Sun Jun 9 20:19:04 2019 +0200
|
| dt-bindings: leds: Add properties for LED name construction
|
| Introduce dedicated properties for conveying information about
| LED function and color. Mark old "label" property as deprecated.
|
| Additionally function-enumerator property is being provided
| for the cases when neither function nor color can be used
| for LED differentiation.
in order to be somewhat prepared, this patch adds a fallback
as a last resort to make the current led code work by falling
back to the node-name as the "label".
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Diffstat (limited to 'package/base-files')
-rw-r--r-- | package/base-files/Makefile | 2 | ||||
-rw-r--r-- | package/base-files/files/lib/functions/leds.sh | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 7eb3ac1868..2419849a44 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/version.mk include $(INCLUDE_DIR)/feeds.mk PKG_NAME:=base-files -PKG_RELEASE:=227 +PKG_RELEASE:=228 PKG_FLAGS:=nonshared PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/ diff --git a/package/base-files/files/lib/functions/leds.sh b/package/base-files/files/lib/functions/leds.sh index 43b2fe02ed..14baeb37b4 100644 --- a/package/base-files/files/lib/functions/leds.sh +++ b/package/base-files/files/lib/functions/leds.sh @@ -18,7 +18,8 @@ get_dt_led() { [ -n "$ledpath" ] && \ label=$(cat "$ledpath/label" 2>/dev/null) || \ - label=$(cat "$ledpath/chan-name" 2>/dev/null) + label=$(cat "$ledpath/chan-name" 2>/dev/null) || \ + label=$(basename "$ledpath") echo "$label" } |