From: Arvind Yadav Date: Mon, 21 Aug 2017 16:43:51 +0000 (+0530) Subject: staging: iio: tsl2x7x: constify i2c_device_id X-Git-Tag: rel_imx_4.19.35_1.1.0~11324^2~273^2~27 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=1405ddfbf10a4e3475babf533fca5f5f60dba2c8;p=linux.git staging: iio: tsl2x7x: constify i2c_device_id i2c_device_id are not supposed to change at runtime. All functions working with i2c_device_id provided by work with const i2c_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav Signed-off-by: Jonathan Cameron --- diff --git a/drivers/staging/iio/light/tsl2x7x.c b/drivers/staging/iio/light/tsl2x7x.c index 02e4a21c3e97..726cd4033703 100644 --- a/drivers/staging/iio/light/tsl2x7x.c +++ b/drivers/staging/iio/light/tsl2x7x.c @@ -1977,7 +1977,7 @@ static int tsl2x7x_remove(struct i2c_client *client) return 0; } -static struct i2c_device_id tsl2x7x_idtable[] = { +static const struct i2c_device_id tsl2x7x_idtable[] = { { "tsl2571", tsl2571 }, { "tsl2671", tsl2671 }, { "tmd2671", tmd2671 },