Skip to content

Commit 9845530

Browse files
ArvindYadavCsSamuel Ortiz
authored andcommitted
nfc: st-nci: 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: Samuel Ortiz <sameo@linux.intel.com>
1 parent 81251cc commit 9845530

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/nfc/st-nci/i2c.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ static int st_nci_i2c_remove(struct i2c_client *client)
279279
return 0;
280280
}
281281

282-
static struct i2c_device_id st_nci_i2c_id_table[] = {
282+
static const struct i2c_device_id st_nci_i2c_id_table[] = {
283283
{ST_NCI_DRIVER_NAME, 0},
284284
{}
285285
};

0 commit comments

Comments
 (0)