diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2016-08-30 10:21:35 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2016-09-01 04:29:51 +0000 |
commit | 1018eac30db86dd1d78d5b84b7651edd6aca9225 (patch) | |
tree | f406c96fa5ca1f200407e43474c59dcbb57dc06b | |
parent | 90fcd6be2b5d2104301efef295113d7816e14042 (diff) | |
download | chrome-ec-1018eac30db86dd1d78d5b84b7651edd6aca9225.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.
Change-Id: Id0b9c2e4988ffc8b55b21258f60b1efa26156dbb
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/379097
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r-- | common/motion_sense.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/common/motion_sense.c b/common/motion_sense.c index da9e10d7e5..25ebf77847 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; |