]> git.etc.gen.nz Git - sapphire-remote.git/blob - debian/patches/move_rmmod.diff
Import v7.2
[sapphire-remote.git] / debian / patches / move_rmmod.diff
1 By leaving hid_topseed running, we can see what devices it had
2 bound, then move them over to sapphire.
3
4 I was running into a problem where after unloading hid_topseed,
5 when I loaded sapphire the remote wasn't being registered
6 with sapphire until I unplugged it and plugged it back it.
7 --- a/sapphire_startup.sh
8 +++ b/sapphire_startup.sh
9 @@ -8,8 +8,9 @@
10  #
11  TOPSEED=/sys/bus/hid/drivers/topseed
12  SAPPHIRE=/sys/bus/hid/drivers/sapphire
13 -rmmod hid-topseed      &>/dev/null
14  modprobe sapphire      &>/dev/null
15 +
16 +# Move any devices bound to hid-topseed over to sapphire.
17  if [ -d $SAPPHIRE -a -e $TOPSEED/unbind ]; then
18         cd $TOPSEED
19         for dev in [0-9]*[-0-9A-F] ; do
20 @@ -19,6 +20,8 @@
21                 fi
22         done
23  fi
24 +
25 +rmmod hid-topseed      &>/dev/null
26  #
27  # Ubuntu/Mint kernels (and likely others too) don't like it
28  # when we unload and reload the sapphire driver.