]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
nfc: nfcmrvl: constify i2c_device_id
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Mon, 21 Aug 2017 17:03:54 +0000 (22:33 +0530)
committerSamuel Ortiz <sameo@linux.intel.com>
Sun, 5 Nov 2017 23:56:55 +0000 (00:56 +0100)
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>
drivers/nfc/nfcmrvl/i2c.c

index ffec103702f14c1db74092f511661869d463fba6..0f22379887ca8cb86c43d87b2880a7b9b0bf3791 100644 (file)
@@ -266,7 +266,7 @@ static const struct of_device_id of_nfcmrvl_i2c_match[] = {
 };
 MODULE_DEVICE_TABLE(of, of_nfcmrvl_i2c_match);
 
-static struct i2c_device_id nfcmrvl_i2c_id_table[] = {
+static const struct i2c_device_id nfcmrvl_i2c_id_table[] = {
        { "nfcmrvl_i2c", 0 },
        {}
 };