aboutsummaryrefslogtreecommitdiff
path: root/src/accelerometers.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/accelerometers.c')
-rw-r--r--src/accelerometers.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/accelerometers.c b/src/accelerometers.c
index 582e664..2a657a3 100644
--- a/src/accelerometers.c
+++ b/src/accelerometers.c
@@ -39,7 +39,8 @@
#include "types.h"
#include "audio.h"
-struct input_event {
+struct input_event
+{
struct timeval time;
uint16_t type;
uint16_t code;
@@ -66,7 +67,8 @@ static FILE *accelerometer_freerunner_open_threshold(const char *mode)
}
/* Try 2.6.28+ method */
- fh = fopen("/sys/class/i2c-adapter/i2c-0/0-0073/lis302dl.2/threshold", mode);
+ fh = fopen("/sys/class/i2c-adapter/i2c-0/0-0073/lis302dl.2/threshold",
+ mode);
if ( fh != NULL ) {
return fh;
}
@@ -156,7 +158,8 @@ AccelHandle *accelerometer_open()
accel->type = ACCEL_UNKNOWN;
/* Determine accelerometer type */
- accel->fd = open("/dev/input/by-path/platform-hdaps-event-joystick", O_RDONLY, O_NONBLOCK);
+ accel->fd = open("/dev/input/by-path/platform-hdaps-event-joystick",
+ O_RDONLY, O_NONBLOCK);
if ( accel->fd != -1 ) {
accel->type = ACCEL_HDAPS;
printf("ThinkPad HDAPS detected\n");