Skip to content

Commit a122ffd

Browse files
ArvindYadavCsSamuel Ortiz
authored andcommitted
nfc: st21nfca: 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 9845530 commit a122ffd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • drivers/nfc/st21nfca

‎drivers/nfc/st21nfca/i2c.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ static int st21nfca_hci_i2c_remove(struct i2c_client *client)
589589
return 0;
590590
}
591591

592-
static struct i2c_device_id st21nfca_hci_i2c_id_table[] = {
592+
static const struct i2c_device_id st21nfca_hci_i2c_id_table[] = {
593593
{ST21NFCA_HCI_DRIVER_NAME, 0},
594594
{}
595595
};

0 commit comments

Comments
 (0)