Skip to contentSkip to conversation

staging: iio: tsl2x7x: constify i2c_device_id

PATCH In review Arvind Yadav 3 participants 4 messages Aug 21, 2017 – Sep 3, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 4/4 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 <linux/i2c.h> work with const i2c_device_id. So mark the non-const structs as const.

---
 drivers/staging/iio/light/tsl2x7x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/iio/light/tsl2x7x.c +1 -1
index 1467199..9b4425d 100644
@@ -2010,7 +2010,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 },
Signature · 1 line
2.7.4
#1 lore raw

Don't say "[PATCH 4/4]". It's not a patchset or a part of an email thread.

regards,
dan carpenter

#2 lore raw

Hi

Quoted 2 lines · Dan Carpenter

Don't say "[PATCH 4/4]". It's not a patchset or a part of an email thread.

Yes, It's part of these patchset.
[PATCH 1/4] misc: apds9802als: constify i2c_device_id [PATCH 2/4] misc: hmc6352: constify i2c_device_id [PATCH 3/4] misc: isl29020: constify i2c_device_id [PATCH 4/4] staging: iio: tsl2x7x: constify i2c_device_id

Quoted 4 lines

regards,
dan carpenter

~arvind

#3 lore raw
Quoted 11 lines · On Tue, 22 Aug 2017 10:51:37 +0530 Arvind Yadav <[email protected]>…

Hi

Quoted 2 lines · Dan Carpenter

Don't say "[PATCH 4/4]". It's not a patchset or a part of an email thread.

Yes, It's part of these patchset.
[PATCH 1/4] misc: apds9802als: constify i2c_device_id [PATCH 2/4] misc: hmc6352: constify i2c_device_id [PATCH 3/4] misc: isl29020: constify i2c_device_id [PATCH 4/4] staging: iio: tsl2x7x: constify i2c_device_id

For a series like this that is jumping around the kernel it would have been better to have broken it up on a subsystem basis. It is always confusing when people only see a small part of a bigger series and need to go looking to find out if they have missed something in the other patches.

Anyhow, applied to the togreg branch of iio.git which will be pushed out as testing for the autobuilders to play with it.

Thanks,

Jonathan

Quoted 10 lines
Quoted 5 lines

regards,
dan carpenter

~arvind
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html