All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] constify rtc i2c_device_id
@ 2017-08-19 19:07 Arvind Yadav
  2017-08-19 19:07 ` [PATCH 1/4] rtc: ds1672: constify i2c_device_id Arvind Yadav
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Arvind Yadav @ 2017-08-19 19:07 UTC (permalink / raw)
  To: a.zummo, alexandre.belloni; +Cc: linux-kernel, linux-rtc

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 (4):
  [PATCH 1/4] rtc: ds1672: constify i2c_device_id
  [PATCH 2/4] rtc: em3027: constify i2c_device_id
  [PATCH 3/4] rtc: max6900: constify i2c_device_id
  [PATCH 4/4] rtc: rv3029c2: constify i2c_device_id

 drivers/rtc/rtc-ds1672.c   | 2 +-
 drivers/rtc/rtc-em3027.c   | 2 +-
 drivers/rtc/rtc-max6900.c  | 2 +-
 drivers/rtc/rtc-rv3029c2.c | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

-- 
2.7.4

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

* [PATCH 1/4] rtc: ds1672: constify i2c_device_id
  2017-08-19 19:07 [PATCH 0/4] constify rtc i2c_device_id Arvind Yadav
@ 2017-08-19 19:07 ` Arvind Yadav
  2017-08-19 19:07 ` [PATCH 2/4] rtc: em3027: " Arvind Yadav
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Arvind Yadav @ 2017-08-19 19:07 UTC (permalink / raw)
  To: a.zummo, alexandre.belloni; +Cc: linux-kernel, linux-rtc

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/rtc/rtc-ds1672.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-ds1672.c b/drivers/rtc/rtc-ds1672.c
index 7bf46bf..9caaccc 100644
--- a/drivers/rtc/rtc-ds1672.c
+++ b/drivers/rtc/rtc-ds1672.c
@@ -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 },
 	{ }
 };
-- 
2.7.4

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

* [PATCH 2/4] rtc: em3027: constify i2c_device_id
  2017-08-19 19:07 [PATCH 0/4] constify rtc i2c_device_id Arvind Yadav
  2017-08-19 19:07 ` [PATCH 1/4] rtc: ds1672: constify i2c_device_id Arvind Yadav
@ 2017-08-19 19:07 ` Arvind Yadav
  2017-08-19 19:07 ` [PATCH 3/4] rtc: max6900: " Arvind Yadav
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Arvind Yadav @ 2017-08-19 19:07 UTC (permalink / raw)
  To: a.zummo, alexandre.belloni; +Cc: linux-kernel, linux-rtc

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/rtc/rtc-em3027.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-em3027.c b/drivers/rtc/rtc-em3027.c
index 4f4930a..b0ef8cf 100644
--- a/drivers/rtc/rtc-em3027.c
+++ b/drivers/rtc/rtc-em3027.c
@@ -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 },
 	{ }
 };
-- 
2.7.4

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

* [PATCH 3/4] rtc: max6900: constify i2c_device_id
  2017-08-19 19:07 [PATCH 0/4] constify rtc i2c_device_id Arvind Yadav
  2017-08-19 19:07 ` [PATCH 1/4] rtc: ds1672: constify i2c_device_id Arvind Yadav
  2017-08-19 19:07 ` [PATCH 2/4] rtc: em3027: " Arvind Yadav
@ 2017-08-19 19:07 ` Arvind Yadav
  2017-08-19 19:07 ` [PATCH 4/4] rtc: rv3029c2: " Arvind Yadav
  2017-08-24  9:01 ` [PATCH 0/4] constify rtc i2c_device_id Alexandre Belloni
  4 siblings, 0 replies; 6+ messages in thread
From: Arvind Yadav @ 2017-08-19 19:07 UTC (permalink / raw)
  To: a.zummo, alexandre.belloni; +Cc: linux-kernel, linux-rtc

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/rtc/rtc-max6900.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-max6900.c b/drivers/rtc/rtc-max6900.c
index 48b6b41..cbdc86a 100644
--- a/drivers/rtc/rtc-max6900.c
+++ b/drivers/rtc/rtc-max6900.c
@@ -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 },
 	{ }
 };
-- 
2.7.4

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

* [PATCH 4/4] rtc: rv3029c2: constify i2c_device_id
  2017-08-19 19:07 [PATCH 0/4] constify rtc i2c_device_id Arvind Yadav
                   ` (2 preceding siblings ...)
  2017-08-19 19:07 ` [PATCH 3/4] rtc: max6900: " Arvind Yadav
@ 2017-08-19 19:07 ` Arvind Yadav
  2017-08-24  9:01 ` [PATCH 0/4] constify rtc i2c_device_id Alexandre Belloni
  4 siblings, 0 replies; 6+ messages in thread
From: Arvind Yadav @ 2017-08-19 19:07 UTC (permalink / raw)
  To: a.zummo, alexandre.belloni; +Cc: linux-kernel, linux-rtc

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/rtc/rtc-rv3029c2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rtc/rtc-rv3029c2.c b/drivers/rtc/rtc-rv3029c2.c
index 85fa1da..aa09771 100644
--- a/drivers/rtc/rtc-rv3029c2.c
+++ b/drivers/rtc/rtc-rv3029c2.c
@@ -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 },
 	{ }
-- 
2.7.4

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

* Re: [PATCH 0/4] constify rtc i2c_device_id
  2017-08-19 19:07 [PATCH 0/4] constify rtc i2c_device_id Arvind Yadav
                   ` (3 preceding siblings ...)
  2017-08-19 19:07 ` [PATCH 4/4] rtc: rv3029c2: " Arvind Yadav
@ 2017-08-24  9:01 ` Alexandre Belloni
  4 siblings, 0 replies; 6+ messages in thread
From: Alexandre Belloni @ 2017-08-24  9:01 UTC (permalink / raw)
  To: Arvind Yadav; +Cc: a.zummo, linux-kernel, linux-rtc

On 20/08/2017 at 00:37:54 +0530, Arvind Yadav wrote:
> 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 (4):
>   [PATCH 1/4] rtc: ds1672: constify i2c_device_id
>   [PATCH 2/4] rtc: em3027: constify i2c_device_id
>   [PATCH 3/4] rtc: max6900: constify i2c_device_id
>   [PATCH 4/4] rtc: rv3029c2: constify i2c_device_id
> 
>  drivers/rtc/rtc-ds1672.c   | 2 +-
>  drivers/rtc/rtc-em3027.c   | 2 +-
>  drivers/rtc/rtc-max6900.c  | 2 +-
>  drivers/rtc/rtc-rv3029c2.c | 2 +-
>  4 files changed, 4 insertions(+), 4 deletions(-)
> 

All applied.

> -- 
> 2.7.4
> 

-- 
Alexandre Belloni, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

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

end of thread, other threads:[~2017-08-24  9:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-19 19:07 [PATCH 0/4] constify rtc i2c_device_id Arvind Yadav
2017-08-19 19:07 ` [PATCH 1/4] rtc: ds1672: constify i2c_device_id Arvind Yadav
2017-08-19 19:07 ` [PATCH 2/4] rtc: em3027: " Arvind Yadav
2017-08-19 19:07 ` [PATCH 3/4] rtc: max6900: " Arvind Yadav
2017-08-19 19:07 ` [PATCH 4/4] rtc: rv3029c2: " Arvind Yadav
2017-08-24  9:01 ` [PATCH 0/4] constify rtc i2c_device_id Alexandre Belloni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.