OSDN Git Service

init.sh: honor sensors.${ro_hardware}.so first
authorChih-Wei Huang <cwhuang@linux.org.tw>
Sat, 9 Jul 2016 15:23:31 +0000 (23:23 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Sat, 9 Jul 2016 15:23:31 +0000 (23:23 +0800)
A change suggested by Roman Petrovski.

init.sh

diff --git a/init.sh b/init.sh
index 6cdd1ba..35de206 100644 (file)
--- a/init.sh
+++ b/init.sh
@@ -171,6 +171,10 @@ function init_hal_power()
 
 function init_hal_sensors()
 {
+       # if we have sensor module for our hardware, use it
+       ro_hardware=$(getprop ro.hardware)
+       [ -f /system/lib/hw/sensors.${ro_hardware}.so ] && return 0
+
        local hal_sensors=kbd
        case "$(cat $DMIPATH/uevent)" in
                *Lucid-MWE*)