mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 06:31:52 +00:00
rtc: 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: Alexandre Belloni <alexandre.belloni@free-electrons.com>
This commit is contained in:
parent
ea369ea6d8
commit
45a6351849
@ -190,7 +190,7 @@ static int ds1672_probe(struct i2c_client *client,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct i2c_device_id ds1672_id[] = {
|
||||
static const struct i2c_device_id ds1672_id[] = {
|
||||
{ "ds1672", 0 },
|
||||
{ }
|
||||
};
|
||||
|
@ -132,7 +132,7 @@ static int em3027_probe(struct i2c_client *client,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct i2c_device_id em3027_id[] = {
|
||||
static const struct i2c_device_id em3027_id[] = {
|
||||
{ "em3027", 0 },
|
||||
{ }
|
||||
};
|
||||
|
@ -226,7 +226,7 @@ max6900_probe(struct i2c_client *client, const struct i2c_device_id *id)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct i2c_device_id max6900_id[] = {
|
||||
static const struct i2c_device_id max6900_id[] = {
|
||||
{ "max6900", 0 },
|
||||
{ }
|
||||
};
|
||||
|
@ -868,7 +868,7 @@ static int rv3029_i2c_probe(struct i2c_client *client,
|
||||
return rv3029_probe(&client->dev, regmap, client->irq, client->name);
|
||||
}
|
||||
|
||||
static struct i2c_device_id rv3029_id[] = {
|
||||
static const struct i2c_device_id rv3029_id[] = {
|
||||
{ "rv3029", 0 },
|
||||
{ "rv3029c2", 0 },
|
||||
{ }
|
||||
|
Loading…
Reference in New Issue
Block a user