* [PATCH] iio: adc: ad7091r5: make ad7091r5_init_info const
@ 2025-06-28 16:06 David Lechner
2025-06-29 16:49 ` Jonathan Cameron
2025-06-29 18:20 ` Marcelo Schmitt
0 siblings, 2 replies; 3+ messages in thread
From: David Lechner @ 2025-06-28 16:06 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Marcelo Schmitt,
Jonathan Cameron, Nuno Sá,
Andy Shevchenko
Cc: linux-iio, linux-kernel, David Lechner
Add const qualifier to struct ad7091r_init_info ad7091r5_init_info. This
is read-only data so it can be made const.
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
drivers/iio/adc/ad7091r5.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/ad7091r5.c b/drivers/iio/adc/ad7091r5.c
index b472b9498fd1307e493579e257769ace233eb073..bd4877268689f048eb67e262ac5ea0c1f5c04a76 100644
--- a/drivers/iio/adc/ad7091r5.c
+++ b/drivers/iio/adc/ad7091r5.c
@@ -92,7 +92,7 @@ static void ad7091r5_regmap_init(struct ad7091r_state *st,
st->map = devm_regmap_init_i2c(i2c, regmap_conf);
}
-static struct ad7091r_init_info ad7091r5_init_info = {
+static const struct ad7091r_init_info ad7091r5_init_info = {
.info_irq = &ad7091r5_chip_info_irq,
.info_no_irq = &ad7091r5_chip_info_noirq,
.regmap_config = &ad7091r_regmap_config,
---
base-commit: 14071b9cf2d751ff9bc8b5e43fa94fbf08aceea1
change-id: 20250628-iio-const-data-3-fecf1e7698ac
Best regards,
--
David Lechner <dlechner@baylibre.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: adc: ad7091r5: make ad7091r5_init_info const
2025-06-28 16:06 [PATCH] iio: adc: ad7091r5: make ad7091r5_init_info const David Lechner
@ 2025-06-29 16:49 ` Jonathan Cameron
2025-06-29 18:20 ` Marcelo Schmitt
1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2025-06-29 16:49 UTC (permalink / raw)
To: David Lechner
Cc: Lars-Peter Clausen, Michael Hennerich, Marcelo Schmitt,
Nuno Sá,
Andy Shevchenko, linux-iio, linux-kernel
On Sat, 28 Jun 2025 11:06:48 -0500
David Lechner <dlechner@baylibre.com> wrote:
> Add const qualifier to struct ad7091r_init_info ad7091r5_init_info. This
> is read-only data so it can be made const.
>
> Signed-off-by: David Lechner <dlechner@baylibre.com>
Applied.
Thanks,
Jonathan
> ---
> drivers/iio/adc/ad7091r5.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/ad7091r5.c b/drivers/iio/adc/ad7091r5.c
> index b472b9498fd1307e493579e257769ace233eb073..bd4877268689f048eb67e262ac5ea0c1f5c04a76 100644
> --- a/drivers/iio/adc/ad7091r5.c
> +++ b/drivers/iio/adc/ad7091r5.c
> @@ -92,7 +92,7 @@ static void ad7091r5_regmap_init(struct ad7091r_state *st,
> st->map = devm_regmap_init_i2c(i2c, regmap_conf);
> }
>
> -static struct ad7091r_init_info ad7091r5_init_info = {
> +static const struct ad7091r_init_info ad7091r5_init_info = {
> .info_irq = &ad7091r5_chip_info_irq,
> .info_no_irq = &ad7091r5_chip_info_noirq,
> .regmap_config = &ad7091r_regmap_config,
>
> ---
> base-commit: 14071b9cf2d751ff9bc8b5e43fa94fbf08aceea1
> change-id: 20250628-iio-const-data-3-fecf1e7698ac
>
> Best regards,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] iio: adc: ad7091r5: make ad7091r5_init_info const
2025-06-28 16:06 [PATCH] iio: adc: ad7091r5: make ad7091r5_init_info const David Lechner
2025-06-29 16:49 ` Jonathan Cameron
@ 2025-06-29 18:20 ` Marcelo Schmitt
1 sibling, 0 replies; 3+ messages in thread
From: Marcelo Schmitt @ 2025-06-29 18:20 UTC (permalink / raw)
To: David Lechner
Cc: Lars-Peter Clausen, Michael Hennerich, Marcelo Schmitt,
Jonathan Cameron, Nuno Sá,
Andy Shevchenko, linux-iio, linux-kernel
On 06/28, David Lechner wrote:
> Add const qualifier to struct ad7091r_init_info ad7091r5_init_info. This
> is read-only data so it can be made const.
>
> Signed-off-by: David Lechner <dlechner@baylibre.com>
> ---
Acked-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-06-29 18:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-28 16:06 [PATCH] iio: adc: ad7091r5: make ad7091r5_init_info const David Lechner
2025-06-29 16:49 ` Jonathan Cameron
2025-06-29 18:20 ` Marcelo Schmitt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®