summaryrefslogtreecommitdiff
path: root/recipes/mdev/mdev-1.2.1/firmware
blob: c88d3fbe22eefbdc6a0c99fbed18f7531c6aa45e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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