media: bttv-input: make const array addr_list static
authorColin Ian King <colin.king@canonical.com>
Thu, 4 Oct 2018 13:59:06 +0000 (09:59 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 9 Oct 2018 12:00:50 +0000 (08:00 -0400)
The const array addr_list can be made static, saves populating it on
the stack and will make it read-only.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/pci/bt8xx/bttv-input.c

index 5cf9293703988877fcf8f0c764a8de196cba4151..d34fbaa027c2348ced8a82b92c318bdc7b615258 100644 (file)
@@ -370,7 +370,7 @@ static int get_key_pv951(struct IR_i2c *ir, enum rc_proto *protocol,
 /* Instantiate the I2C IR receiver device, if present */
 void init_bttv_i2c_ir(struct bttv *btv)
 {
-       const unsigned short addr_list[] = {
+       static const unsigned short addr_list[] = {
                0x1a, 0x18, 0x64, 0x30, 0x71,
                I2C_CLIENT_END
        };