summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2016-08-20 15:33:24 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-08-24 17:40:29 -0700
commit71c9cc6f3f9673b7aab927a915fb8ed15be520ac (patch)
tree56fd0719c795b420f4c2547fe2f4d12a5fe88e54
parent3218e8954274982836d6bef49076b237ca980959 (diff)
downloadchrome-ec-71c9cc6f3f9673b7aab927a915fb8ed15be520ac.tar.gz
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 <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/373723 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r--driver/gyro_l3gd20h.c3
1 files changed, 1 insertions, 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);