summaryrefslogtreecommitdiff
path: root/drivers/media/pci
diff options
context:
space:
mode:
authorXu Wang <vulab@iscas.ac.cn>2020-11-13 08:21:11 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2020-12-03 07:37:07 +0100
commitca1cfc3fa2d32960bbf55e5c4785151b7034feb0 (patch)
tree5cce73179fc6a1b149c5d3e1084cf132ad5c0003 /drivers/media/pci
parent5cc794be382bba529677352a1f5fd0be08208915 (diff)
media: cx88: use ARRAY_SIZE
Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element Signed-off-by: Xu Wang <vulab@iscas.ac.cn> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/pci')
-rw-r--r--drivers/media/pci/cx88/cx88-mpeg.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/pci/cx88/cx88-mpeg.c b/drivers/media/pci/cx88/cx88-mpeg.c
index a57c991b165b..a3edb548afde 100644
--- a/drivers/media/pci/cx88/cx88-mpeg.c
+++ b/drivers/media/pci/cx88/cx88-mpeg.c
@@ -524,8 +524,7 @@ static int cx8802_request_acquire(struct cx8802_driver *drv)
core->last_analog_input = core->input;
core->input = 0;
for (i = 0;
- i < (sizeof(core->board.input) /
- sizeof(struct cx88_input));
+ i < ARRAY_SIZE(core->board.input);
i++) {
if (core->board.input[i].type == CX88_VMUX_DVB) {
core->input = i;