diff options
author | Simon Shields <keepcalm444@gmail.com> | 2016-03-06 10:29:23 +1100 |
---|---|---|
committer | Simon Shields <keepcalm444@gmail.com> | 2016-03-06 10:29:23 +1100 |
commit | c6f16d5c1fc1a803cba6674cc0d67156c222efec (patch) | |
tree | 04da82779d65b6d76cf85fc95049a08d4cea91be | |
parent | 2e3a8c5b3a2e9f091e3f7c75bd4c3cdd8f5ebd17 (diff) | |
download | device_samsung_i9300-c6f16d5c1fc1a803cba6674cc0d67156c222efec.zip device_samsung_i9300-c6f16d5c1fc1a803cba6674cc0d67156c222efec.tar.gz device_samsung_i9300-c6f16d5c1fc1a803cba6674cc0d67156c222efec.tar.bz2 |
i9300: libsensors: fix a couple of poll_delay derps
Change-Id: I6a6e307588e1d9a0c56895d4dc6a1702066b6059
-rw-r--r-- | libsensors/AccelSensor.cpp | 2 | ||||
-rw-r--r-- | libsensors/ProximitySensor.cpp | 14 |
2 files changed, 3 insertions, 13 deletions
diff --git a/libsensors/AccelSensor.cpp b/libsensors/AccelSensor.cpp index 1a5510c..fddb2cd 100644 --- a/libsensors/AccelSensor.cpp +++ b/libsensors/AccelSensor.cpp @@ -107,7 +107,7 @@ int AccelSensor::setDelay(int32_t handle, int64_t ns) ns = 10000000; // Minimum on stock } - strcpy(&input_sysfs_path[input_sysfs_path_len], "acc_poll_delay"); + strcpy(&input_sysfs_path[input_sysfs_path_len], "poll_delay"); fd = open(input_sysfs_path, O_RDWR); if (fd >= 0) { char buf[80]; diff --git a/libsensors/ProximitySensor.cpp b/libsensors/ProximitySensor.cpp index 2ba56c1..9e5d7d1 100644 --- a/libsensors/ProximitySensor.cpp +++ b/libsensors/ProximitySensor.cpp @@ -73,18 +73,8 @@ int ProximitySensor::setInitialState() { int ProximitySensor::setDelay(int32_t handle, int64_t ns) { - int fd; - - strcpy(&input_sysfs_path[input_sysfs_path_len], "prox_poll_delay"); - fd = open(input_sysfs_path, O_RDWR); - if (fd >= 0) { - char buf[80]; - sprintf(buf, "%lld", ns); - write(fd, buf, strlen(buf)+1); - close(fd); - return 0; - } - return -1; + // unsupported + return 0; } int ProximitySensor::enable(int32_t handle, int en) { |