summaryrefslogtreecommitdiffstats
path: root/drivers/media/cec/platform
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/cec/platform
parentmedia: MAINTAINERS: change tc358743 maintainer (diff)
downloadlinux-05c480f4d0ba438e6d37a1660d81cc7eb670e26b.tar.xz
linux-05c480f4d0ba438e6d37a1660d81cc7eb670e26b.zip
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/cec/platform')
-rw-r--r--drivers/media/cec/platform/sti/stih-cec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/cec/platform/sti/stih-cec.c b/drivers/media/cec/platform/sti/stih-cec.c
index abf8e8bcbb34..4edbdd09535d 100644
--- a/drivers/media/cec/platform/sti/stih-cec.c
+++ b/drivers/media/cec/platform/sti/stih-cec.c
@@ -256,8 +256,8 @@ static void stih_rx_done(struct stih_cec *cec, u32 status)
if (!msg.len)
return;
- if (msg.len > 16)
- msg.len = 16;
+ if (msg.len > CEC_MAX_MSG_SIZE)
+ msg.len = CEC_MAX_MSG_SIZE;
for (i = 0; i < msg.len; i++)
msg.msg[i] = readl(cec->regs + CEC_RX_DATA_BASE + i);