linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] constify media i2c_device_id
@ 2017-08-19 19:20 Arvind Yadav
  2017-08-19 19:20 ` [PATCH 1/6] [media] ad9389b: constify i2c_device_id Arvind Yadav
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Arvind Yadav @ 2017-08-19 19:20 UTC (permalink / raw)
  To: hans.verkuil, mchehab, matrandg; +Cc: linux-kernel, linux-media

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(-)

-- 
2.7.4

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/6] [media] ad9389b: constify i2c_device_id
  2017-08-19 19:20 [PATCH 0/6] constify media i2c_device_id Arvind Yadav
@ 2017-08-19 19:20 ` Arvind Yadav
  2017-08-19 19:20 ` [PATCH 2/6] [media] adv7511: " Arvind Yadav
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Arvind Yadav @ 2017-08-19 19:20 UTC (permalink / raw)
  To: hans.verkuil, mchehab, matrandg; +Cc: linux-kernel, linux-media

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>
---
 drivers/media/i2c/ad9389b.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/ad9389b.c b/drivers/media/i2c/ad9389b.c
index 50f3541..a056d6c 100644
--- a/drivers/media/i2c/ad9389b.c
+++ b/drivers/media/i2c/ad9389b.c
@@ -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 },
 	{ }
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/6] [media] adv7511: constify i2c_device_id
  2017-08-19 19:20 [PATCH 0/6] constify media i2c_device_id Arvind Yadav
  2017-08-19 19:20 ` [PATCH 1/6] [media] ad9389b: constify i2c_device_id Arvind Yadav
@ 2017-08-19 19:20 ` Arvind Yadav
  2017-08-19 19:20 ` [PATCH 3/6] [media] adv7842: " Arvind Yadav
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Arvind Yadav @ 2017-08-19 19:20 UTC (permalink / raw)
  To: hans.verkuil, mchehab, matrandg; +Cc: linux-kernel, linux-media

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>
---
 drivers/media/i2c/adv7511.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/adv7511.c b/drivers/media/i2c/adv7511.c
index ccc4786..8fc97a8 100644
--- a/drivers/media/i2c/adv7511.c
+++ b/drivers/media/i2c/adv7511.c
@@ -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 },
 	{ }
 };
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/6] [media] adv7842: constify i2c_device_id
  2017-08-19 19:20 [PATCH 0/6] constify media i2c_device_id Arvind Yadav
  2017-08-19 19:20 ` [PATCH 1/6] [media] ad9389b: constify i2c_device_id Arvind Yadav
  2017-08-19 19:20 ` [PATCH 2/6] [media] adv7511: " Arvind Yadav
@ 2017-08-19 19:20 ` Arvind Yadav
  2017-08-19 19:20 ` [PATCH 4/6] [media] saa7127: " Arvind Yadav
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Arvind Yadav @ 2017-08-19 19:20 UTC (permalink / raw)
  To: hans.verkuil, mchehab, matrandg; +Cc: linux-kernel, linux-media

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>
---
 drivers/media/i2c/adv7842.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/adv7842.c b/drivers/media/i2c/adv7842.c
index 303effd..9b959ec 100644
--- a/drivers/media/i2c/adv7842.c
+++ b/drivers/media/i2c/adv7842.c
@@ -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 },
 	{ }
 };
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/6] [media] saa7127: constify i2c_device_id
  2017-08-19 19:20 [PATCH 0/6] constify media i2c_device_id Arvind Yadav
                   ` (2 preceding siblings ...)
  2017-08-19 19:20 ` [PATCH 3/6] [media] adv7842: " Arvind Yadav
@ 2017-08-19 19:20 ` Arvind Yadav
  2017-08-19 19:20 ` [PATCH 5/6] [media] tc358743: " Arvind Yadav
  2017-08-19 19:20 ` [PATCH 6/6] [media] ths8200: " Arvind Yadav
  5 siblings, 0 replies; 7+ messages in thread
From: Arvind Yadav @ 2017-08-19 19:20 UTC (permalink / raw)
  To: hans.verkuil, mchehab, matrandg; +Cc: linux-kernel, linux-media

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>
---
 drivers/media/i2c/saa7127.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/saa7127.c b/drivers/media/i2c/saa7127.c
index 99c3030..01784d4 100644
--- a/drivers/media/i2c/saa7127.c
+++ b/drivers/media/i2c/saa7127.c
@@ -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 },
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 5/6] [media] tc358743: constify i2c_device_id
  2017-08-19 19:20 [PATCH 0/6] constify media i2c_device_id Arvind Yadav
                   ` (3 preceding siblings ...)
  2017-08-19 19:20 ` [PATCH 4/6] [media] saa7127: " Arvind Yadav
@ 2017-08-19 19:20 ` Arvind Yadav
  2017-08-19 19:20 ` [PATCH 6/6] [media] ths8200: " Arvind Yadav
  5 siblings, 0 replies; 7+ messages in thread
From: Arvind Yadav @ 2017-08-19 19:20 UTC (permalink / raw)
  To: hans.verkuil, mchehab, matrandg; +Cc: linux-kernel, linux-media

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>
---
 drivers/media/i2c/tc358743.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c
index 5788af2..e6f5c36 100644
--- a/drivers/media/i2c/tc358743.c
+++ b/drivers/media/i2c/tc358743.c
@@ -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},
 	{}
 };
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 6/6] [media] ths8200: constify i2c_device_id
  2017-08-19 19:20 [PATCH 0/6] constify media i2c_device_id Arvind Yadav
                   ` (4 preceding siblings ...)
  2017-08-19 19:20 ` [PATCH 5/6] [media] tc358743: " Arvind Yadav
@ 2017-08-19 19:20 ` Arvind Yadav
  5 siblings, 0 replies; 7+ messages in thread
From: Arvind Yadav @ 2017-08-19 19:20 UTC (permalink / raw)
  To: hans.verkuil, mchehab, matrandg; +Cc: linux-kernel, linux-media

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>
---
 drivers/media/i2c/ths8200.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/ths8200.c b/drivers/media/i2c/ths8200.c
index 42340e3..498ad23 100644
--- a/drivers/media/i2c/ths8200.c
+++ b/drivers/media/i2c/ths8200.c
@@ -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 },
 	{},
 };
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-08-19 19:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-19 19:20 [PATCH 0/6] constify media i2c_device_id Arvind Yadav
2017-08-19 19:20 ` [PATCH 1/6] [media] ad9389b: constify i2c_device_id Arvind Yadav
2017-08-19 19:20 ` [PATCH 2/6] [media] adv7511: " Arvind Yadav
2017-08-19 19:20 ` [PATCH 3/6] [media] adv7842: " Arvind Yadav
2017-08-19 19:20 ` [PATCH 4/6] [media] saa7127: " Arvind Yadav
2017-08-19 19:20 ` [PATCH 5/6] [media] tc358743: " Arvind Yadav
2017-08-19 19:20 ` [PATCH 6/6] [media] ths8200: " Arvind Yadav

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).