summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSue Chen <sue.chen@quanta.corp-partner.google.com>2020-12-09 10:38:26 +0800
committerCommit Bot <commit-bot@chromium.org>2020-12-14 03:52:59 +0000
commit6cc11c09ba937cc70cc3b9844d7c77b14a0912f8 (patch)
treec24f5c4aa7b7e9a02e08b0db3d514c255ea185e6
parent85ecd7589b4204e50240a90981fc18546d5e781e (diff)
downloadchrome-ec-6cc11c09ba937cc70cc3b9844d7c77b14a0912f8.tar.gz
driver: fix build error in accelgyro_icm426xx.c
Remove const attribute in icm426xx_set_range and icm426xx_init. Remove struct accelgyro_saved_data_t *data in icm426xx_set_range for no used. BUG=none BRANCH=none TEST=change the base motionsensor in Ezkinil and build the code successfully. The motion function is workable on Ezkinil DUT with the ICM chip. Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com> Change-Id: I183bdd9de2d148466e5ba57ba6917108b04ce332 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2581160 Reviewed-by: Edward Hill <ecgh@chromium.org>
-rw-r--r--driver/accelgyro_icm426xx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/driver/accelgyro_icm426xx.c b/driver/accelgyro_icm426xx.c
index 4f231fdcac..0bea3de575 100644
--- a/driver/accelgyro_icm426xx.c
+++ b/driver/accelgyro_icm426xx.c
@@ -450,10 +450,9 @@ out_unlock:
return ret;
}
-static int icm426xx_set_range(const struct motion_sensor_t *s, int range,
+static int icm426xx_set_range(struct motion_sensor_t *s, int range,
int rnd)
{
- struct accelgyro_saved_data_t *data = ICM_GET_SAVED_DATA(s);
int reg, ret, reg_val;
int newrange;
@@ -859,7 +858,7 @@ static int icm426xx_init_config(const struct motion_sensor_t *s)
return icm_field_update8(s, ICM426XX_REG_INTF_CONFIG0, mask, val);
}
-static int icm426xx_init(const struct motion_sensor_t *s)
+static int icm426xx_init(struct motion_sensor_t *s)
{
struct icm_drv_data_t *st = ICM_GET_DATA(s);
struct accelgyro_saved_data_t *saved_data = ICM_GET_SAVED_DATA(s);