OSDN Git Service

media: cx23885: make const array addr_list static
authorColin Ian King <colin.king@canonical.com>
Thu, 4 Oct 2018 14:15:35 +0000 (10:15 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 9 Oct 2018 12:02:15 +0000 (08:02 -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/cx23885/cx23885-i2c.c

index dd67135..d0df3df 100644 (file)
@@ -340,7 +340,7 @@ int cx23885_i2c_register(struct cx23885_i2c *bus)
        /* Instantiate the IR receiver device, if present */
        if (0 == bus->i2c_rc) {
                struct i2c_board_info info;
-               const unsigned short addr_list[] = {
+               static const unsigned short addr_list[] = {
                        0x6b, I2C_CLIENT_END
                };