From: Colin Ian King Date: Sun, 9 Jan 2022 20:45:57 +0000 (+0100) Subject: media: gspca: make array regs_to_read static const X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=19bc4f40b2c5ca8f2506766560067817f6f5c37e;p=linux.git media: gspca: make array regs_to_read static const Don't populate the read-only array regs_to_read on the stack but instead it static const. Also makes the object code a little smaller. Signed-off-by: Colin Ian King Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/usb/gspca/jl2005bcd.c b/drivers/media/usb/gspca/jl2005bcd.c index ca12f33f3e12c..a408fcc3a0608 100644 --- a/drivers/media/usb/gspca/jl2005bcd.c +++ b/drivers/media/usb/gspca/jl2005bcd.c @@ -166,7 +166,9 @@ static int jl2005c_get_firmware_id(struct gspca_dev *gspca_dev) struct sd *sd = (struct sd *)gspca_dev; int i = 0; int retval; - unsigned char regs_to_read[] = {0x57, 0x02, 0x03, 0x5d, 0x5e, 0x5f}; + static const unsigned char regs_to_read[] = { + 0x57, 0x02, 0x03, 0x5d, 0x5e, 0x5f + }; gspca_dbg(gspca_dev, D_PROBE, "Running jl2005c_get_firmware_id\n"); /* Read the first ID byte once for warmup */