summaryrefslogtreecommitdiffstats
path: root/sensors/cm36651_light.c
diff options
context:
space:
mode:
Diffstat (limited to 'sensors/cm36651_light.c')
-rw-r--r--sensors/cm36651_light.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sensors/cm36651_light.c b/sensors/cm36651_light.c
index 421a276..8d37b54 100644
--- a/sensors/cm36651_light.c
+++ b/sensors/cm36651_light.c
@@ -21,6 +21,7 @@
#include <fcntl.h>
#include <errno.h>
#include <math.h>
+#include <string.h>
#include <sys/types.h>
#include <linux/ioctl.h>
#include <linux/input.h>
@@ -65,7 +66,7 @@ int cm36651_light_init(struct smdk4x12_sensors_handlers *handlers,
goto error;
}
- snprintf(data->path_delay, PATH_MAX, "%s/light_poll_delay", path);
+ snprintf(data->path_delay, PATH_MAX, "%s/poll_delay", path);
handlers->poll_fd = input_fd;
handlers->data = (void *) data;
@@ -149,19 +150,19 @@ int cm36651_light_deactivate(struct smdk4x12_sensors_handlers *handlers)
return 0;
}
-int cm36651_light_set_delay(struct smdk4x12_sensors_handlers *handlers, long int delay)
+int cm36651_light_set_delay(struct smdk4x12_sensors_handlers *handlers, int64_t delay)
{
struct cm36651_light_data *data;
int rc;
- ALOGD("%s(%p, %ld)", __func__, handlers, delay);
+ ALOGD("%s(%p, %" PRId64 ")", __func__, handlers, delay);
if (handlers == NULL || handlers->data == NULL)
return -EINVAL;
data = (struct cm36651_light_data *) handlers->data;
- rc = sysfs_value_write(data->path_delay, (int) delay);
+ rc = sysfs_value_write(data->path_delay, delay);
if (rc < 0) {
ALOGE("%s: Unable to write sysfs value", __func__);
return -1;