Skip to contentSkip to conversation

i2c: robotfuzz-osif: Constify osif_table

PATCH Applied Axel Lin 3 participants 3 messages Jun 2, 2016 – Jun 9, 2016 I2C subsystem host drivers

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 i2c: robotfuzz-osif: Constify osif_table

osif_table is never modified, so declare it as const.

---
 drivers/i2c/busses/i2c-robotfuzz-osif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-robotfuzz-osif.c +1 -1
index ced9c6a..89d8b41 100644
@@ -125,7 +125,7 @@ static struct i2c_algorithm osif_algorithm = {
 #define USB_OSIF_VENDOR_ID	0x1964
 #define USB_OSIF_PRODUCT_ID	0x0001
 
-static struct usb_device_id osif_table[] = {
+static const struct usb_device_id osif_table[] = {
 	{ USB_DEVICE(USB_OSIF_VENDOR_ID, USB_OSIF_PRODUCT_ID) },
 	{ }
 };
Signature · 1 line
2.5.0
Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Axel Lin

osif_table is never modified, so declare it as const.

Thanks
Andrew

Quoted 20 lines
---
 drivers/i2c/busses/i2c-robotfuzz-osif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/i2c/busses/i2c-robotfuzz-osif.c +1 -1
index ced9c6a..89d8b41 100644
@@ -125,7 +125,7 @@ static struct i2c_algorithm osif_algorithm = {
 #define USB_OSIF_VENDOR_ID	0x1964
 #define USB_OSIF_PRODUCT_ID	0x0001
 
-static struct usb_device_id osif_table[] = {
+static const struct usb_device_id osif_table[] = {
 	{ USB_DEVICE(USB_OSIF_VENDOR_ID, USB_OSIF_PRODUCT_ID) },
 	{ }
 };
Signature · 1 line
2.5.0