bcm53xx: fix fallback code for picking status LED
authorRafał Miłecki <rafal@milecki.pl>
Tue, 27 Feb 2018 15:49:31 +0000 (16:49 +0100)
committerRafał Miłecki <rafal@milecki.pl>
Tue, 27 Feb 2018 15:52:25 +0000 (16:52 +0100)
Looking for a wrong LED file name was stopping this code from find any
LED. This affects devices with only a red/amber power LED.

Fixes: 3aaee1ba023ac ("bcm53xx: failsafe support")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
target/linux/bcm53xx/base-files/etc/diag.sh

index a8a560cd064b754c075c58ef22198d571d90ecd1..1a9332327ac30ece061308a44a13873863a6df55 100644 (file)
@@ -13,7 +13,7 @@ get_status_led() {
        fi;
 
        # Now just pick any power LED
-       status_led_file=$(find /sys/class/leds/ -name "*:power:*" | head -n1)
+       status_led_file=$(find /sys/class/leds/ -name "*:power" | head -n1)
        if [ -d "$status_led_file" ]; then
                status_led=$(basename $status_led_file)
                return