Skip to content

Commit cb37719

Browse files
pengjunhao5Commit Bot
authored andcommitted
Coachz: MotionSensor: Avoid redefine gesture function list_activites
This commit is for motion sensor combine(BMI160 & BMI260),Avoid redefine gesture function `list_activites`. BUG=b:195908820 TEST=make -j BOARD=coachz Verify build on SIT board BRANCH=Trogdor Signed-off-by: pengjunhao5 <[email protected]> Reviewed-by: tongjian <[email protected]> Reviewed-by: yudengwu <[email protected]> Change-Id: If31442d0c00745d124b20188b4e5fad8a9a1d173 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3133188 Reviewed-by: Jian Tong <[email protected]> Reviewed-by: Wai-Hong Tam <[email protected]> Reviewed-by: Keith Short <[email protected]> Reviewed-by: Daisuke Nojiri <[email protected]> Commit-Queue: Keith Short <[email protected]>
1 parent 05c483f commit cb37719

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

driver/accelgyro_bmi160.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -322,10 +322,11 @@ static int perform_calib(struct motion_sensor_t *s, int enable)
322322
* Defined even if host interface is not defined, to enable double tap even
323323
* when the host does not deal with gesture.
324324
*/
325-
int manage_activity(const struct motion_sensor_t *s,
326-
enum motionsensor_activity activity,
327-
int enable,
328-
const struct ec_motion_sense_activity *param)
325+
#ifdef CONFIG_GESTURE_HOST_DETECTION
326+
static int manage_activity(const struct motion_sensor_t *s,
327+
enum motionsensor_activity activity,
328+
int enable,
329+
const struct ec_motion_sense_activity *param)
329330
{
330331
int ret;
331332
struct bmi_drv_data_t *data = BMI_GET_DATA(s);
@@ -385,10 +386,9 @@ int manage_activity(const struct motion_sensor_t *s,
385386
return ret;
386387
}
387388

388-
#ifdef CONFIG_GESTURE_HOST_DETECTION
389-
int list_activities(const struct motion_sensor_t *s,
390-
uint32_t *enabled,
391-
uint32_t *disabled)
389+
static int list_activities(const struct motion_sensor_t *s,
390+
uint32_t *enabled,
391+
uint32_t *disabled)
392392
{
393393
struct bmi_drv_data_t *data = BMI_GET_DATA(s);
394394
*enabled = data->enabled_activities;

driver/accelgyro_bmi260.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,9 @@ static int perform_calib(struct motion_sensor_t *s, int enable)
283283
}
284284

285285
#ifdef CONFIG_GESTURE_HOST_DETECTION
286-
int list_activities(const struct motion_sensor_t *s,
287-
uint32_t *enabled,
288-
uint32_t *disabled)
286+
static int list_activities(const struct motion_sensor_t *s,
287+
uint32_t *enabled,
288+
uint32_t *disabled)
289289
{
290290
struct bmi_drv_data_t *data = BMI_GET_DATA(s);
291291
*enabled = data->enabled_activities;

0 commit comments

Comments
 (0)