summaryrefslogtreecommitdiffstats
path: root/libsensors/input.c
diff options
context:
space:
mode:
Diffstat (limited to 'libsensors/input.c')
-rw-r--r--libsensors/input.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libsensors/input.c b/libsensors/input.c
index f1e5283..5a58b45 100644
--- a/libsensors/input.c
+++ b/libsensors/input.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 Paul Kocialkowski
+ * Copyright (C) 2013 Paul Kocialkowski <contact@paulk.fr>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -25,10 +25,10 @@
#include <linux/input.h>
#include <linux/uinput.h>
-#define LOG_TAG "exynos_sensors"
+#define LOG_TAG "smdk4x12_sensors"
#include <utils/Log.h>
-#include "exynos_sensors.h"
+#include "smdk4x12_sensors.h"
void input_event_set(struct input_event *event, int type, int code, int value)
{
@@ -276,12 +276,12 @@ complete:
return rc;
}
-int sysfs_string_read(char *path, char *buffer, int length)
+int sysfs_string_read(char *path, char *buffer, size_t length)
{
int fd = -1;
int rc;
- if (path == NULL || buffer == NULL || length <= 0)
+ if (path == NULL || buffer == NULL || length == 0)
return -1;
fd = open(path, O_RDONLY);
@@ -305,12 +305,12 @@ complete:
return rc;
}
-int sysfs_string_write(char *path, char *buffer, int length)
+int sysfs_string_write(char *path, char *buffer, size_t length)
{
int fd = -1;
int rc;
- if (path == NULL || buffer == NULL || length <= 0)
+ if (path == NULL || buffer == NULL || length == 0)
return -1;
fd = open(path, O_WRONLY);