summaryrefslogtreecommitdiff
path: root/recipes/mdev/mdev-1.2.1/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/mdev/mdev-1.2.1/firmware')
-rw-r--r--recipes/mdev/mdev-1.2.1/firmware14
1 files changed, 14 insertions, 0 deletions
diff --git a/recipes/mdev/mdev-1.2.1/firmware b/recipes/mdev/mdev-1.2.1/firmware
new file mode 100644
index 0000000000..c88d3fbe22
--- /dev/null
+++ b/recipes/mdev/mdev-1.2.1/firmware
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+firmwaredir=/lib/firmware
+
+if test "$SUBSYSTEM" = "firmware" -a "$ACTION" = "add"; then
+ if test -f $firmwaredir/$FIRMWARE; then
+ echo 1 > /sys/$DEVPATH/loading
+ cat $firmwaredir/$FIRMWARE > /sys/$DEVPATH/data
+ echo 0 > /sys/$DEVPATH/loading
+ else
+ echo -1 > /sys/$DEVPATH/loading
+ fi
+fi
+