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

misc: apds9802als: 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
006dbb38 b8dbb502

+1 -1
+1 -1
drivers/misc/apds9802als.c
··· 298 298 #define APDS9802ALS_PM_OPS NULL 299 299 #endif /* CONFIG_PM */ 300 300 301 - static struct i2c_device_id apds9802als_id[] = { 301 + static const struct i2c_device_id apds9802als_id[] = { 302 302 { DRIVER_NAME, 0 }, 303 303 { } 304 304 };