Skip to contentSkip to conversation

media: ivtv: 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: ivtv: 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/ivtv/ivtv-i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/pci/ivtv/ivtv-i2c.c +1 -1
index 5e4e52147fb7..55ef1385519e 100644
@@ -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
Signature · 1 line
2.17.1