* [PATCH] media: bttv-input: make const array addr_list static
@ 2018-10-04 13:59 Colin King
0 siblings, 0 replies; only message in thread
From: Colin King @ 2018-10-04 13:59 UTC (permalink / raw)
To: Mauro Carvalho Chehab, linux-media; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
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>
---
drivers/media/pci/bt8xx/bttv-input.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/pci/bt8xx/bttv-input.c b/drivers/media/pci/bt8xx/bttv-input.c
index 5cf929370398..d34fbaa027c2 100644
--- a/drivers/media/pci/bt8xx/bttv-input.c
+++ b/drivers/media/pci/bt8xx/bttv-input.c
@@ -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
};
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-10-04 13:59 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-04 13:59 [PATCH] media: bttv-input: make const array addr_list static Colin King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).