diff options
author | Furquan Shaikh <furquan@google.com> | 2018-11-16 15:05:44 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-11-27 04:29:10 -0800 |
commit | 9ba8fc3405d362ef503311560c21dcfcdfe67030 (patch) | |
tree | 7fa6dd277c2a0b1585c6a61f23b538ffb6e3ecb3 /common | |
parent | 434793f29c1515d0317ba3a64afd2ef1bfd2d0fd (diff) | |
download | chrome-ec-9ba8fc3405d362ef503311560c21dcfcdfe67030.tar.gz |
motion_lid: Get rid of return value for motion_lid_set_tablet_mode
motion_lid_set_tablet_mode accepts reliable as its input parameter and
returns back the param value without any change. Effectively, the
return value doesn't change anything. This change gets rid of the
return value for motion_lid_set_tablet_mode.
BUG=None
BRANCH=None
TEST=make -j buildall
Change-Id: I0f379d9148131d9dcb1d3f53a1db08d3ef72831f
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1341161
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/motion_lid.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/common/motion_lid.c b/common/motion_lid.c index 5d6f5ed8e7..87af23c435 100644 --- a/common/motion_lid.c +++ b/common/motion_lid.c @@ -165,7 +165,7 @@ __attribute__((weak)) int board_is_lid_angle_tablet_mode(void) */ #define TABLET_MODE_DEBOUNCE_COUNT 3 -static int motion_lid_set_tablet_mode(int reliable) +static void motion_lid_set_tablet_mode(int reliable) { static int tablet_mode_debounce_cnt = TABLET_MODE_DEBOUNCE_COUNT; const int current_mode = tablet_get_mode(); @@ -184,10 +184,10 @@ static int motion_lid_set_tablet_mode(int reliable) tablet_mode_debounce_cnt = TABLET_MODE_DEBOUNCE_COUNT; tablet_set_mode(new_mode); - return reliable; + return; } tablet_mode_debounce_cnt--; - return reliable; + return; } } @@ -200,7 +200,6 @@ static int motion_lid_set_tablet_mode(int reliable) if (((reliable == 0) && current_mode == 1) || ((reliable == 1) && (current_mode == new_mode))) tablet_mode_debounce_cnt = TABLET_MODE_DEBOUNCE_COUNT; - return reliable; } #endif /* CONFIG_LID_ANGLE_TABLET_MODE */ @@ -458,7 +457,7 @@ static int calculate_lid_angle(const intv3_t base, const intv3_t lid, *lid_angle = FP_TO_INT(last_lid_angle_fp + FLOAT_TO_FP(0.5)); if (board_is_lid_angle_tablet_mode()) - reliable = motion_lid_set_tablet_mode(reliable); + motion_lid_set_tablet_mode(reliable); #if defined(CONFIG_DPTF_MULTI_PROFILE) && \ defined(CONFIG_DPTF_MOTION_LID_NO_HALL_SENSOR) |