From: Xu Wang Date: Fri, 13 Nov 2020 07:21:11 +0000 (+0100) Subject: media: cx88: use ARRAY_SIZE X-Git-Tag: v5.15~2256^2~150 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ca1cfc3fa2d32960bbf55e5c4785151b7034feb0;p=platform%2Fkernel%2Flinux-starfive.git media: cx88: use ARRAY_SIZE Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element Signed-off-by: Xu Wang Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/pci/cx88/cx88-mpeg.c b/drivers/media/pci/cx88/cx88-mpeg.c index a57c991..a3edb54 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;