diff mbox

i2c: robotfuzz-osif: Constify osif_table

Message ID 1464845328.6532.1.camel@ingics.com
State Accepted
Headers show

Commit Message

Axel Lin June 2, 2016, 5:28 a.m. UTC
osif_table is never modified, so declare it as const.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/i2c/busses/i2c-robotfuzz-osif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andrew Lunn June 2, 2016, 11:59 a.m. UTC | #1
On Thu, Jun 02, 2016 at 01:28:48PM +0800, Axel Lin wrote:
> osif_table is never modified, so declare it as const.
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Acked-by: Andrew Lunn <andrew@lunn.ch>

Thanks
	Andrew

> ---
>  drivers/i2c/busses/i2c-robotfuzz-osif.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-robotfuzz-osif.c b/drivers/i2c/busses/i2c-robotfuzz-osif.c
> index ced9c6a..89d8b41 100644
> --- a/drivers/i2c/busses/i2c-robotfuzz-osif.c
> +++ b/drivers/i2c/busses/i2c-robotfuzz-osif.c
> @@ -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) },
>  	{ }
>  };
> -- 
> 2.5.0
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Wolfram Sang June 9, 2016, 8:44 p.m. UTC | #2
On Thu, Jun 02, 2016 at 01:28:48PM +0800, Axel Lin wrote:
> osif_table is never modified, so declare it as const.
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Applied to for-next, thanks!
diff mbox

Patch

diff --git a/drivers/i2c/busses/i2c-robotfuzz-osif.c b/drivers/i2c/busses/i2c-robotfuzz-osif.c
index ced9c6a..89d8b41 100644
--- a/drivers/i2c/busses/i2c-robotfuzz-osif.c
+++ b/drivers/i2c/busses/i2c-robotfuzz-osif.c
@@ -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) },
 	{ }
 };