aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2020-08-17 14:25:36 +0200
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2020-08-17 14:25:36 +0200
commitdb3112262c84813e0d2d095be020c5ca0ae32e93 (patch)
treee4dfaf4c222087b5f3f5f5d27a00544f150a62a8
parent263ec7b08128c721912f3407cce696f364ab1178 (diff)
cec-follower: CEC_MSG_STANDBY can just call enter_standby()
The existing helper function enter_standby() already does what the code in 'case CEC_MSG_STANDBY' does. So replace that code with a simple call to enter_standby() to avoid duplicate code. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
-rw-r--r--utils/cec-follower/cec-processing.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/utils/cec-follower/cec-processing.cpp b/utils/cec-follower/cec-processing.cpp
index b3316753..074e245d 100644
--- a/utils/cec-follower/cec-processing.cpp
+++ b/utils/cec-follower/cec-processing.cpp
@@ -289,13 +289,7 @@ static void processMsg(struct node *node, struct cec_msg &msg, unsigned me)
/* Standby */
case CEC_MSG_STANDBY:
- if (node->state.power_status == CEC_OP_POWER_STATUS_ON ||
- node->state.power_status == CEC_OP_POWER_STATUS_TO_ON) {
- node->state.old_power_status = node->state.power_status;
- node->state.power_status = CEC_OP_POWER_STATUS_STANDBY;
- node->state.power_status_changed_time = time(NULL);
- dev_info("Changing state to standby\n");
- }
+ enter_standby(node);
return;

Privacy Policy