Skip to contentSkip to conversation

media: bttv-input: make const array addr_list static

PATCH New Colin King 1 participant 1 message Oct 4, 2018

Subsystems (3)
lore
Share & tools
lore

Colin King

author
#0 lore raw

PATCH 1/1 media: bttv-input: make const array addr_list static

From: Colin Ian King <[email protected]>

The const array addr_list can be made static, saves populating it on the stack and will make it read-only.

---
 drivers/media/pci/bt8xx/bttv-input.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/bt8xx/bttv-input.c +1 -1
index 5cf929370398..d34fbaa027c2 100644
@@ -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
 	};
Signature · 1 line
2.17.1