From 71c9cc6f3f9673b7aab927a915fb8ed15be520ac Mon Sep 17 00:00:00 2001 From: Gwendal Grignou Date: Sat, 20 Aug 2016 15:33:24 -0700 Subject: driver: l3gd20h: remove unnecessary test. rotate by identity matrix is fast. BRANCH=none BUG=none TEST=compile Change-Id: Ia9fccb81ebc4c0be7c9d80823b3c2f76aa2275d0 Signed-off-by: Gwendal Grignou Reviewed-on: https://chromium-review.googlesource.com/373723 Reviewed-by: Aseda Aboagye --- driver/gyro_l3gd20h.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/driver/gyro_l3gd20h.c b/driver/gyro_l3gd20h.c index 5d1fd3e1e0..0986080285 100644 --- a/driver/gyro_l3gd20h.c +++ b/driver/gyro_l3gd20h.c @@ -366,8 +366,7 @@ static int read(const struct motion_sensor_t *s, vector_3_t v) for (i = X; i <= Z; i++) v[i] = ((int16_t)((raw[i * 2 + 1] << 8) | raw[i * 2])); - if (s->rot_standard_ref) - rotate(v, *s->rot_standard_ref, v); + rotate(v, *s->rot_standard_ref, v); /* apply offset in the device coordinates */ range = get_range(s); -- cgit v1.2.1