constify media i2c_device_id
Subsystems (4)
cover constify media 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.
Arvind Yadav (6):
[PATCH 1/6] [media] ad9389b: constify i2c_device_id [PATCH 2/6] [media] adv7511: constify i2c_device_id [PATCH 3/6] [media] adv7842: constify i2c_device_id [PATCH 4/6] [media] saa7127: constify i2c_device_id [PATCH 5/6] [media] tc358743: constify i2c_device_id [PATCH 6/6] [media] ths8200: constify i2c_device_id
drivers/media/i2c/ad9389b.c | 2 +- drivers/media/i2c/adv7511.c | 2 +- drivers/media/i2c/adv7842.c | 2 +- drivers/media/i2c/saa7127.c | 2 +- drivers/media/i2c/tc358743.c | 2 +- drivers/media/i2c/ths8200.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/6 ad9389b: 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.
--- drivers/media/i2c/ad9389b.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/ad9389b.c +1 -1
@@ -1208,7 +1208,7 @@ static int ad9389b_remove(struct i2c_client *client)/* ----------------------------------------------------------------------- */ -static struct i2c_device_id ad9389b_id[] = { +static const struct i2c_device_id ad9389b_id[] = { {"ad9389b" ,0 }, {"ad9889b" ,0 }, { }
Signature · 1 line
2.7.4
PATCH 2/6 adv7511: constify i2c_device_id
In reply to Arvind Yadavi2c_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.
--- drivers/media/i2c/adv7511.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/adv7511.c +1 -1
@@ -1986,7 +1986,7 @@ static int adv7511_remove(struct i2c_client *client)/* ----------------------------------------------------------------------- */ -static struct i2c_device_id adv7511_id[] = { +static const struct i2c_device_id adv7511_id[] = { {"adv7511" ,0 }, { } };
Signature · 1 line
2.7.4
PATCH 3/6 adv7842: constify i2c_device_id
In reply to Arvind Yadavi2c_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.
--- drivers/media/i2c/adv7842.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/adv7842.c +1 -1
@@ -3608,7 +3608,7 @@ static int adv7842_remove(struct i2c_client *client)/* ----------------------------------------------------------------------- */ -static struct i2c_device_id adv7842_id[] = { +static const struct i2c_device_id adv7842_id[] = { {"adv7842" ,0 }, { } };
Signature · 1 line
2.7.4
PATCH 4/6 saa7127: constify i2c_device_id
In reply to Arvind Yadavi2c_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.
--- drivers/media/i2c/saa7127.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/saa7127.c +1 -1
@@ -806,7 +806,7 @@ static int saa7127_remove(struct i2c_client *client)/* ----------------------------------------------------------------------- */ -static struct i2c_device_id saa7127_id[] = { +static const struct i2c_device_id saa7127_id[] = { {"saa7127_auto" ,0 },/* auto-detection */ {"saa7126" ,SAA7127 }, {"saa7127" ,SAA7127 },
Signature · 1 line
2.7.4
PATCH 5/6 tc358743: constify i2c_device_id
In reply to Arvind Yadavi2c_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.
--- drivers/media/i2c/tc358743.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/tc358743.c +1 -1
@@ -2013,7 +2013,7 @@ static int tc358743_remove(struct i2c_client *client)return 0 ; } -static struct i2c_device_id tc358743_id[] = { +static const struct i2c_device_id tc358743_id[] = { {"tc358743" ,0 }, {} };
Signature · 1 line
2.7.4
PATCH 6/6 ths8200: constify i2c_device_id
In reply to Arvind Yadavi2c_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.
--- drivers/media/i2c/ths8200.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/ths8200.c +1 -1
@@ -483,7 +483,7 @@ static int ths8200_remove(struct i2c_client *client)return 0 ; } -static struct i2c_device_id ths8200_id[] = { +static const struct i2c_device_id ths8200_id[] = { {"ths8200" ,0 }, {}, };
Signature · 1 line
2.7.4