media: mxl5005s: Make array RegAddr static const
authorColin Ian King <colin.i.king@gmail.com>
Wed, 5 Oct 2022 16:06:03 +0000 (17:06 +0100)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Mon, 24 Oct 2022 17:03:53 +0000 (19:03 +0200)
Don't populate the read-only array RegAddr on the stack but instead
make it static const. Also makes the object code a little smaller.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/tuners/mxl5005s.c

index ab4c43df9d180bc1752b2cfee623c354166c38d9..3a509038c8dfbb36e8871968633d5fc0627e4615 100644 (file)
@@ -3637,7 +3637,7 @@ static u16 MXL_GetCHRegister_ZeroIF(struct dvb_frontend *fe, u8 *RegNum,
        u16 status = 0;
        int i;
 
-       u8 RegAddr[] = {43, 136};
+       static const u8 RegAddr[] = {43, 136};
 
        *count = ARRAY_SIZE(RegAddr);