Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

misc: isl29020: 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.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Arvind Yadav and committed by
Greg Kroah-Hartman
07e4049a 34d0eb50

+1 -1
+1 -1
drivers/misc/isl29020.c
··· 188 188 return 0; 189 189 } 190 190 191 - static struct i2c_device_id isl29020_id[] = { 191 + static const struct i2c_device_id isl29020_id[] = { 192 192 { "isl29020", 0 }, 193 193 { } 194 194 };