* [PATCH 0/3] constify iio i2c_device_id
@ 2017-08-19 18:47 Arvind Yadav
2017-08-19 18:47 ` [PATCH 1/3] iio: accel: bma180: constify i2c_device_id Arvind Yadav
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Arvind Yadav @ 2017-08-19 18:47 UTC (permalink / raw)
To: jic23, knaack.h, lars, pmeerw; +Cc: linux-kernel, linux-iio
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 (3):
[PATCH 1/3] iio: accel: bma180: constify i2c_device_id
[PATCH 2/3] iio: light: apds9300: constify i2c_device_id
[PATCH 3/3] iio: light: tsl2583: constify i2c_device_id
drivers/iio/accel/bma180.c | 2 +-
drivers/iio/light/apds9300.c | 2 +-
drivers/iio/light/tsl2583.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
--
2.7.4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] iio: accel: bma180: constify i2c_device_id
2017-08-19 18:47 [PATCH 0/3] constify iio i2c_device_id Arvind Yadav
@ 2017-08-19 18:47 ` Arvind Yadav
2017-08-20 9:16 ` Jonathan Cameron
2017-08-19 18:47 ` [PATCH 2/3] iio: light: apds9300: " Arvind Yadav
2017-08-19 18:47 ` [PATCH 3/3] iio: light: tsl2583: " Arvind Yadav
2 siblings, 1 reply; 7+ messages in thread
From: Arvind Yadav @ 2017-08-19 18:47 UTC (permalink / raw)
To: jic23, knaack.h, lars, pmeerw; +Cc: linux-kernel, linux-iio
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/iio/accel/bma180.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c
index efc6773..3dec972 100644
--- a/drivers/iio/accel/bma180.c
+++ b/drivers/iio/accel/bma180.c
@@ -842,7 +842,7 @@ static SIMPLE_DEV_PM_OPS(bma180_pm_ops, bma180_suspend, bma180_resume);
#define BMA180_PM_OPS NULL
#endif
-static struct i2c_device_id bma180_ids[] = {
+static const struct i2c_device_id bma180_ids[] = {
{ "bma180", BMA180 },
{ "bma250", BMA250 },
{ }
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] iio: light: apds9300: constify i2c_device_id
2017-08-19 18:47 [PATCH 0/3] constify iio i2c_device_id Arvind Yadav
2017-08-19 18:47 ` [PATCH 1/3] iio: accel: bma180: constify i2c_device_id Arvind Yadav
@ 2017-08-19 18:47 ` Arvind Yadav
2017-08-20 9:17 ` Jonathan Cameron
2017-08-19 18:47 ` [PATCH 3/3] iio: light: tsl2583: " Arvind Yadav
2 siblings, 1 reply; 7+ messages in thread
From: Arvind Yadav @ 2017-08-19 18:47 UTC (permalink / raw)
To: jic23, knaack.h, lars, pmeerw; +Cc: linux-kernel, linux-iio
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/iio/light/apds9300.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/light/apds9300.c b/drivers/iio/light/apds9300.c
index 649b26f..05eacd1 100644
--- a/drivers/iio/light/apds9300.c
+++ b/drivers/iio/light/apds9300.c
@@ -505,7 +505,7 @@ static SIMPLE_DEV_PM_OPS(apds9300_pm_ops, apds9300_suspend, apds9300_resume);
#define APDS9300_PM_OPS NULL
#endif
-static struct i2c_device_id apds9300_id[] = {
+static const struct i2c_device_id apds9300_id[] = {
{ APDS9300_DRV_NAME, 0 },
{ }
};
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] iio: light: tsl2583: constify i2c_device_id
2017-08-19 18:47 [PATCH 0/3] constify iio i2c_device_id Arvind Yadav
2017-08-19 18:47 ` [PATCH 1/3] iio: accel: bma180: constify i2c_device_id Arvind Yadav
2017-08-19 18:47 ` [PATCH 2/3] iio: light: apds9300: " Arvind Yadav
@ 2017-08-19 18:47 ` Arvind Yadav
2017-08-20 9:17 ` Jonathan Cameron
2 siblings, 1 reply; 7+ messages in thread
From: Arvind Yadav @ 2017-08-19 18:47 UTC (permalink / raw)
To: jic23, knaack.h, lars, pmeerw; +Cc: linux-kernel, linux-iio
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/iio/light/tsl2583.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/light/tsl2583.c b/drivers/iio/light/tsl2583.c
index 1679181..fb711ed 100644
--- a/drivers/iio/light/tsl2583.c
+++ b/drivers/iio/light/tsl2583.c
@@ -924,7 +924,7 @@ static const struct dev_pm_ops tsl2583_pm_ops = {
SET_RUNTIME_PM_OPS(tsl2583_suspend, tsl2583_resume, NULL)
};
-static struct i2c_device_id tsl2583_idtable[] = {
+static const struct i2c_device_id tsl2583_idtable[] = {
{ "tsl2580", 0 },
{ "tsl2581", 1 },
{ "tsl2583", 2 },
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/3] iio: accel: bma180: constify i2c_device_id
2017-08-19 18:47 ` [PATCH 1/3] iio: accel: bma180: constify i2c_device_id Arvind Yadav
@ 2017-08-20 9:16 ` Jonathan Cameron
0 siblings, 0 replies; 7+ messages in thread
From: Jonathan Cameron @ 2017-08-20 9:16 UTC (permalink / raw)
To: Arvind Yadav; +Cc: knaack.h, lars, pmeerw, linux-kernel, linux-iio
On Sun, 20 Aug 2017 00:17:36 +0530
Arvind Yadav <arvind.yadav.cs@gmail.com> 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.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.
Thanks,
Jonathan
> ---
> drivers/iio/accel/bma180.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c
> index efc6773..3dec972 100644
> --- a/drivers/iio/accel/bma180.c
> +++ b/drivers/iio/accel/bma180.c
> @@ -842,7 +842,7 @@ static SIMPLE_DEV_PM_OPS(bma180_pm_ops, bma180_suspend, bma180_resume);
> #define BMA180_PM_OPS NULL
> #endif
>
> -static struct i2c_device_id bma180_ids[] = {
> +static const struct i2c_device_id bma180_ids[] = {
> { "bma180", BMA180 },
> { "bma250", BMA250 },
> { }
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] iio: light: apds9300: constify i2c_device_id
2017-08-19 18:47 ` [PATCH 2/3] iio: light: apds9300: " Arvind Yadav
@ 2017-08-20 9:17 ` Jonathan Cameron
0 siblings, 0 replies; 7+ messages in thread
From: Jonathan Cameron @ 2017-08-20 9:17 UTC (permalink / raw)
To: Arvind Yadav; +Cc: knaack.h, lars, pmeerw, linux-kernel, linux-iio
On Sun, 20 Aug 2017 00:17:37 +0530
Arvind Yadav <arvind.yadav.cs@gmail.com> 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.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Applied.
Thanks,
Jonathan
> ---
> drivers/iio/light/apds9300.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/light/apds9300.c b/drivers/iio/light/apds9300.c
> index 649b26f..05eacd1 100644
> --- a/drivers/iio/light/apds9300.c
> +++ b/drivers/iio/light/apds9300.c
> @@ -505,7 +505,7 @@ static SIMPLE_DEV_PM_OPS(apds9300_pm_ops, apds9300_suspend, apds9300_resume);
> #define APDS9300_PM_OPS NULL
> #endif
>
> -static struct i2c_device_id apds9300_id[] = {
> +static const struct i2c_device_id apds9300_id[] = {
> { APDS9300_DRV_NAME, 0 },
> { }
> };
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 3/3] iio: light: tsl2583: constify i2c_device_id
2017-08-19 18:47 ` [PATCH 3/3] iio: light: tsl2583: " Arvind Yadav
@ 2017-08-20 9:17 ` Jonathan Cameron
0 siblings, 0 replies; 7+ messages in thread
From: Jonathan Cameron @ 2017-08-20 9:17 UTC (permalink / raw)
To: Arvind Yadav; +Cc: knaack.h, lars, pmeerw, linux-kernel, linux-iio
On Sun, 20 Aug 2017 00:17:38 +0530
Arvind Yadav <arvind.yadav.cs@gmail.com> 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.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Applied.
Thanks,
Jonathan
> ---
> drivers/iio/light/tsl2583.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/light/tsl2583.c b/drivers/iio/light/tsl2583.c
> index 1679181..fb711ed 100644
> --- a/drivers/iio/light/tsl2583.c
> +++ b/drivers/iio/light/tsl2583.c
> @@ -924,7 +924,7 @@ static const struct dev_pm_ops tsl2583_pm_ops = {
> SET_RUNTIME_PM_OPS(tsl2583_suspend, tsl2583_resume, NULL)
> };
>
> -static struct i2c_device_id tsl2583_idtable[] = {
> +static const struct i2c_device_id tsl2583_idtable[] = {
> { "tsl2580", 0 },
> { "tsl2581", 1 },
> { "tsl2583", 2 },
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2017-08-20 9:17 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-19 18:47 [PATCH 0/3] constify iio i2c_device_id Arvind Yadav
2017-08-19 18:47 ` [PATCH 1/3] iio: accel: bma180: constify i2c_device_id Arvind Yadav
2017-08-20 9:16 ` Jonathan Cameron
2017-08-19 18:47 ` [PATCH 2/3] iio: light: apds9300: " Arvind Yadav
2017-08-20 9:17 ` Jonathan Cameron
2017-08-19 18:47 ` [PATCH 3/3] iio: light: tsl2583: " Arvind Yadav
2017-08-20 9:17 ` Jonathan Cameron
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).