* [PATCH] media: cx23885: make const array addr_list static
@ 2018-10-04 14:15 Colin King
0 siblings, 0 replies; only message in thread
From: Colin King @ 2018-10-04 14:15 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/cx23885/cx23885-i2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/pci/cx23885/cx23885-i2c.c b/drivers/media/pci/cx23885/cx23885-i2c.c
index dd67135d2bb6..d0df3dfff694 100644
--- a/drivers/media/pci/cx23885/cx23885-i2c.c
+++ b/drivers/media/pci/cx23885/cx23885-i2c.c
@@ -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
};
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2018-10-04 14:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-04 14:15 [PATCH] media: cx23885: 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).