summaryrefslogtreecommitdiff
path: root/common/motion_sense.c
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2016-08-30 10:21:35 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-09-01 22:55:43 -0700
commit54f4612764e07e5e3ccd8a4af04ee83a46454612 (patch)
tree657a4ce3f05de0759ee8344661450bf0dc73b304 /common/motion_sense.c
parent5a01bd89baedea18305742078f32adfe84f8ff9f (diff)
downloadchrome-ec-54f4612764e07e5e3ccd8a4af04ee83a46454612.tar.gz
motion: Remove redundant set_range.
No need to do set_range in motion_sense_shutdown(), already done at init. Besides, this is an error if the sensor is not powered in S5. BUG=b:27849483 BRANCH=cyan, minnie, samus TEST=Check sensor range is set correctly. (cherry picked from commit 1018eac30db86dd1d78d5b84b7651edd6aca9225) Reviewed-on: https://chromium-review.googlesource.com/379097 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Change-Id: Id0b9c2e4988ffc8b55b21258f60b1efa26156dbb Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/379542
Diffstat (limited to 'common/motion_sense.c')
-rw-r--r--common/motion_sense.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/common/motion_sense.c b/common/motion_sense.c
index 33b5ca7eb6..df8360229e 100644
--- a/common/motion_sense.c
+++ b/common/motion_sense.c
@@ -451,12 +451,6 @@ static void motion_sense_shutdown(void)
}
motion_sense_switch_sensor_rate();
- for (i = 0; i < motion_sensor_count; i++) {
- sensor = &motion_sensors[i];
- if (sensor->state != SENSOR_INITIALIZED)
- continue;
- sensor->drv->set_range(sensor, sensor->default_range, 0);
- }
/* Forget activities set by the AP */
#ifdef CONFIG_GESTURE_DETECTION_MASK
mask = CONFIG_GESTURE_DETECTION_MASK;