summaryrefslogtreecommitdiff
path: root/drivers/media/i2c/adv7604.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2022-08-24 08:57:26 +0200
committerMauro Carvalho Chehab <mchehab@kernel.org>2022-08-30 07:37:02 +0200
commit05c480f4d0ba438e6d37a1660d81cc7eb670e26b (patch)
treea6fe625a0122ce9336c216f5b3a6857e4ad57106 /drivers/media/i2c/adv7604.c
parent107ca18cad69162fd2750c4616fa1cc02b15394d (diff)
media: media/cec: use CEC_MAX_MSG_SIZE instead of hardcoded 16
Use the proper define for the maximum CEC message length instead of hardcoding it. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/i2c/adv7604.c')
-rw-r--r--drivers/media/i2c/adv7604.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
index 497419a5cfdd..815fe108281f 100644
--- a/drivers/media/i2c/adv7604.c
+++ b/drivers/media/i2c/adv7604.c
@@ -2047,8 +2047,8 @@ static void adv76xx_cec_isr(struct v4l2_subdev *sd, bool *handled)
struct cec_msg msg;
msg.len = cec_read(sd, 0x25) & 0x1f;
- if (msg.len > 16)
- msg.len = 16;
+ if (msg.len > CEC_MAX_MSG_SIZE)
+ msg.len = CEC_MAX_MSG_SIZE;
if (msg.len) {
u8 i;