diff options
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/firmware_class/hotplug-script | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Documentation/firmware_class/hotplug-script b/Documentation/firmware_class/hotplug-script index 1990130f2ab1..8143a950b607 100644 --- a/Documentation/firmware_class/hotplug-script +++ b/Documentation/firmware_class/hotplug-script | |||
@@ -6,11 +6,12 @@ | |||
6 | 6 | ||
7 | HOTPLUG_FW_DIR=/usr/lib/hotplug/firmware/ | 7 | HOTPLUG_FW_DIR=/usr/lib/hotplug/firmware/ |
8 | 8 | ||
9 | echo 1 > /sys/$DEVPATH/loading | 9 | if [ "$SUBSYSTEM" == "firmware" -a "$ACTION" == "add" ]; then |
10 | cat $HOTPLUG_FW_DIR/$FIRMWARE > /sys/$DEVPATH/data | 10 | if [ -f $HOTPLUG_FW_DIR/$FIRMWARE ]; then |
11 | echo 0 > /sys/$DEVPATH/loading | 11 | echo 1 > /sys/$DEVPATH/loading |
12 | 12 | cat $HOTPLUG_FW_DIR/$FIRMWARE > /sys/$DEVPATH/data | |
13 | # To cancel the load in case of error: | 13 | echo 0 > /sys/$DEVPATH/loading |
14 | # | 14 | else |
15 | # echo -1 > /sys/$DEVPATH/loading | 15 | echo -1 > /sys/$DEVPATH/loading |
16 | # | 16 | fi |
17 | fi | ||