mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-27 18:25:05 +00:00
motion: fix manage_activity interface
Declare optional parameters are const structure. These parameters, when used, are just read by the sensor driver. BRANCH=smaug BUG=None TEST=compile Change-Id: I8f2a9291e1908922831fb5e2a524bb6edd0e0f65 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/306696 Reviewed-by: Alec Berg <alecaberg@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
f750ce8a18
commit
fcfd32f04a
@@ -1119,7 +1119,7 @@ static int host_cmd_motion_sense(struct host_cmd_handler_args *args)
|
||||
ret = sensor->drv->manage_activity(sensor,
|
||||
in->set_activity.activity,
|
||||
in->set_activity.enable,
|
||||
NULL);
|
||||
&in->set_activity);
|
||||
}
|
||||
if (ret != EC_RES_SUCCESS)
|
||||
return ret;
|
||||
|
||||
@@ -661,7 +661,7 @@ void normalize(const struct motion_sensor_t *s, vector_3_t v, uint8_t *data)
|
||||
int manage_activity(const struct motion_sensor_t *s,
|
||||
enum motionsensor_activity activity,
|
||||
int enable,
|
||||
struct ec_motion_sense_activity *param)
|
||||
const struct ec_motion_sense_activity *param)
|
||||
{
|
||||
int ret;
|
||||
struct bmi160_drv_data_t *data = BMI160_GET_DATA(s);
|
||||
|
||||
@@ -133,7 +133,7 @@ struct accelgyro_drv {
|
||||
int (*manage_activity)(const struct motion_sensor_t *s,
|
||||
enum motionsensor_activity activity,
|
||||
int enable,
|
||||
struct ec_motion_sense_activity *data);
|
||||
const struct ec_motion_sense_activity *data);
|
||||
/**
|
||||
* List activities managed by the sensors.
|
||||
* @s Pointer to sensor data.
|
||||
|
||||
Reference in New Issue
Block a user