]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: ivtv: make const array addr_list static
authorColin Ian King <colin.king@canonical.com>
Thu, 4 Oct 2018 14:02:14 +0000 (10:02 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 9 Oct 2018 12:02:00 +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/ivtv/ivtv-i2c.c

index 5e4e52147fb71a70e34b7e55be685bf7a747e16b..55ef1385519e1610018e7a36b3bac6dce697bef2 100644 (file)
@@ -239,7 +239,7 @@ struct i2c_client *ivtv_i2c_new_ir_legacy(struct ivtv *itv)
         * allocations, so this function must be called after all other i2c
         * devices we care about are registered.
         */
-       const unsigned short addr_list[] = {
+       static const unsigned short addr_list[] = {
                0x1a,   /* Hauppauge IR external - collides with WM8739 */
                0x18,   /* Hauppauge IR internal */
                I2C_CLIENT_END