Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1715731 > unrolled thread
| Started by | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| First post | 2017-08-19 20:50 +0200 |
| Last post | 2017-08-20 11:20 +0200 |
| Articles | 7 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 0/3] constify iio i2c_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-19 20:50 +0200
[PATCH 2/3] iio: light: apds9300: constify i2c_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-19 20:50 +0200
Re: [PATCH 2/3] iio: light: apds9300: constify i2c_device_id Jonathan Cameron <jic23@kernel.org> - 2017-08-20 11:20 +0200
[PATCH 1/3] iio: accel: bma180: constify i2c_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-19 20:50 +0200
Re: [PATCH 1/3] iio: accel: bma180: constify i2c_device_id Jonathan Cameron <jic23@kernel.org> - 2017-08-20 11:20 +0200
[PATCH 3/3] iio: light: tsl2583: constify i2c_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-19 20:50 +0200
Re: [PATCH 3/3] iio: light: tsl2583: constify i2c_device_id Jonathan Cameron <jic23@kernel.org> - 2017-08-20 11:20 +0200
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Date | 2017-08-19 20:50 +0200 |
| Subject | [PATCH 0/3] constify iio i2c_device_id |
| Message-ID | <uggYN-4Od-3@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Date | 2017-08-19 20:50 +0200 |
| Subject | [PATCH 2/3] iio: light: apds9300: constify i2c_device_id |
| Message-ID | <uggYN-4Od-1@gated-at.bofh.it> |
| In reply to | #1715731 |
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
[toc] | [prev] | [next] | [standalone]
| From | Jonathan Cameron <jic23@kernel.org> |
|---|---|
| Date | 2017-08-20 11:20 +0200 |
| Subject | Re: [PATCH 2/3] iio: light: apds9300: constify i2c_device_id |
| Message-ID | <uguyJ-52R-15@gated-at.bofh.it> |
| In reply to | #1715732 |
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 },
> { }
> };
[toc] | [prev] | [next] | [standalone]
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Date | 2017-08-19 20:50 +0200 |
| Subject | [PATCH 1/3] iio: accel: bma180: constify i2c_device_id |
| Message-ID | <uggYO-4Od-5@gated-at.bofh.it> |
| In reply to | #1715731 |
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
[toc] | [prev] | [next] | [standalone]
| From | Jonathan Cameron <jic23@kernel.org> |
|---|---|
| Date | 2017-08-20 11:20 +0200 |
| Subject | Re: [PATCH 1/3] iio: accel: bma180: constify i2c_device_id |
| Message-ID | <uguyJ-52R-13@gated-at.bofh.it> |
| In reply to | #1715733 |
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 },
> { }
[toc] | [prev] | [next] | [standalone]
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Date | 2017-08-19 20:50 +0200 |
| Subject | [PATCH 3/3] iio: light: tsl2583: constify i2c_device_id |
| Message-ID | <uggYO-4Od-9@gated-at.bofh.it> |
| In reply to | #1715731 |
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
[toc] | [prev] | [next] | [standalone]
| From | Jonathan Cameron <jic23@kernel.org> |
|---|---|
| Date | 2017-08-20 11:20 +0200 |
| Subject | Re: [PATCH 3/3] iio: light: tsl2583: constify i2c_device_id |
| Message-ID | <uguyJ-52R-7@gated-at.bofh.it> |
| In reply to | #1715734 |
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 },
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web