Commit 19bc4f40 authored by Colin Ian King's avatar Colin Ian King Committed by Mauro Carvalho Chehab
Browse files

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: default avatarColin Ian King <colin.i.king@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent ef058cc8
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -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 */