summaryrefslogtreecommitdiffstats
path: root/drivers/nfc
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2017-08-21 19:03:53 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2017-11-06 00:56:55 +0100
commitf98bc10e0eb90075665516c6ddc81761d42b3525 (patch)
tree6beb351705f48ce0e25b394a5471e9fd01318b47 /drivers/nfc
parentNFC: fix device-allocation error return (diff)
downloadlinux-f98bc10e0eb90075665516c6ddc81761d42b3525.tar.xz
linux-f98bc10e0eb90075665516c6ddc81761d42b3525.zip
nfc: microread: 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>
Diffstat (limited to 'drivers/nfc')
-rw-r--r--drivers/nfc/microread/i2c.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nfc/microread/i2c.c b/drivers/nfc/microread/i2c.c
index b668b7b9a61e..1806d20a5e29 100644
--- a/drivers/nfc/microread/i2c.c
+++ b/drivers/nfc/microread/i2c.c
@@ -294,7 +294,7 @@ static int microread_i2c_remove(struct i2c_client *client)
return 0;
}
-static struct i2c_device_id microread_i2c_id[] = {
+static const struct i2c_device_id microread_i2c_id[] = {
{ MICROREAD_I2C_DRIVER_NAME, 0},
{ }
};