[PATCH] cec: zero counters in cec_received_msg()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Make sure the TX counters are zeroed in the cec_msg struct.
Non-zero TX counters make no sense when a message is received,
and applications should not see non-zero values here.

Signed-off-by: Hans Verkuil <hansverk@xxxxxxxxx>
---
This sits on top of my earlier cec pull request that moves cec to the mainline.
---
 drivers/media/cec/cec-adap.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/media/cec/cec-adap.c b/drivers/media/cec/cec-adap.c
index ed76d70..d9c6f2c 100644
--- a/drivers/media/cec/cec-adap.c
+++ b/drivers/media/cec/cec-adap.c
@@ -874,6 +874,10 @@ void cec_received_msg(struct cec_adapter *adap, struct cec_msg *msg)
 	msg->sequence = msg->reply = msg->timeout = 0;
 	msg->tx_status = 0;
 	msg->tx_ts = 0;
+	msg->tx_arb_lost_cnt = 0;
+	msg->tx_nack_cnt = 0;
+	msg->tx_low_drive_cnt = 0;
+	msg->tx_error_cnt = 0;
 	msg->flags = 0;
 	memset(msg->msg + msg->len, 0, sizeof(msg->msg) - msg->len);

--
2.7.0

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux