* [PATCH] iio: adc: ad7091r8: make ad7091r_init_info const
@ 2025-06-28 16:09 David Lechner
2025-06-29 16:50 ` Jonathan Cameron
2025-06-29 18:17 ` Marcelo Schmitt
0 siblings, 2 replies; 4+ messages in thread
From: David Lechner @ 2025-06-28 16:09 UTC (permalink / raw)
To: Marcelo Schmitt, Lars-Peter Clausen, Michael Hennerich,
Jonathan Cameron, Nuno Sá, Andy Shevchenko
Cc: linux-iio, linux-kernel, David Lechner
Add const qualifier to struct ad7091r_init_info ad7091r*_init_info. This
is read-only data so it can be made const.
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
drivers/iio/adc/ad7091r8.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/iio/adc/ad7091r8.c b/drivers/iio/adc/ad7091r8.c
index cebade4c2d49ede2bd256ccfa9a064f56437fe4f..e93b8bb60e8ea70eedc086551bf09510e78eae51 100644
--- a/drivers/iio/adc/ad7091r8.c
+++ b/drivers/iio/adc/ad7091r8.c
@@ -206,14 +206,14 @@ static int ad7091r8_gpio_setup(struct ad7091r_state *st)
return 0;
}
-static struct ad7091r_init_info ad7091r2_init_info = {
+static const struct ad7091r_init_info ad7091r2_init_info = {
.info_no_irq = &ad7091r8_infos[AD7091R2_INFO],
.regmap_config = &ad7091r2_reg_conf,
.init_adc_regmap = &ad7091r8_regmap_init,
.setup = &ad7091r8_gpio_setup
};
-static struct ad7091r_init_info ad7091r4_init_info = {
+static const struct ad7091r_init_info ad7091r4_init_info = {
.info_no_irq = &ad7091r8_infos[AD7091R4_INFO],
.info_irq = &ad7091r8_infos[AD7091R4_INFO_IRQ],
.regmap_config = &ad7091r4_reg_conf,
@@ -221,7 +221,7 @@ static struct ad7091r_init_info ad7091r4_init_info = {
.setup = &ad7091r8_gpio_setup
};
-static struct ad7091r_init_info ad7091r8_init_info = {
+static const struct ad7091r_init_info ad7091r8_init_info = {
.info_no_irq = &ad7091r8_infos[AD7091R8_INFO],
.info_irq = &ad7091r8_infos[AD7091R8_INFO_IRQ],
.regmap_config = &ad7091r8_reg_conf,
---
base-commit: 14071b9cf2d751ff9bc8b5e43fa94fbf08aceea1
change-id: 20250628-iio-const-data-4-91f4d145abb5
Best regards,
--
David Lechner <dlechner@baylibre.com>
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] iio: adc: ad7091r8: make ad7091r_init_info const
2025-06-28 16:09 [PATCH] iio: adc: ad7091r8: make ad7091r_init_info const David Lechner
@ 2025-06-29 16:50 ` Jonathan Cameron
2025-06-29 18:17 ` Marcelo Schmitt
1 sibling, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2025-06-29 16:50 UTC (permalink / raw)
To: David Lechner
Cc: Marcelo Schmitt, Lars-Peter Clausen, Michael Hennerich,
Nuno Sá, Andy Shevchenko, linux-iio, linux-kernel
On Sat, 28 Jun 2025 11:09:25 -0500
David Lechner <dlechner@baylibre.com> wrote:
> Add const qualifier to struct ad7091r_init_info ad7091r*_init_info. This
> is read-only data so it can be made const.
>
> Signed-off-by: David Lechner <dlechner@baylibre.com>
Applied to the testing branch of iio.git. Time available for feedback
but it seem simple enough and the compiler should scream if wrong!
Thanks,
J
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] iio: adc: ad7091r8: make ad7091r_init_info const
2025-06-28 16:09 [PATCH] iio: adc: ad7091r8: make ad7091r_init_info const David Lechner
2025-06-29 16:50 ` Jonathan Cameron
@ 2025-06-29 18:17 ` Marcelo Schmitt
2025-06-29 18:38 ` Jonathan Cameron
1 sibling, 1 reply; 4+ messages in thread
From: Marcelo Schmitt @ 2025-06-29 18:17 UTC (permalink / raw)
To: David Lechner
Cc: Marcelo Schmitt, Lars-Peter Clausen, Michael Hennerich,
Jonathan Cameron, Nuno Sá, Andy Shevchenko, linux-iio,
linux-kernel
On 06/28, David Lechner wrote:
> Add const qualifier to struct ad7091r_init_info ad7091r*_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] 4+ messages in thread
* Re: [PATCH] iio: adc: ad7091r8: make ad7091r_init_info const
2025-06-29 18:17 ` Marcelo Schmitt
@ 2025-06-29 18:38 ` Jonathan Cameron
0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2025-06-29 18:38 UTC (permalink / raw)
To: Marcelo Schmitt
Cc: David Lechner, Marcelo Schmitt, Lars-Peter Clausen,
Michael Hennerich, Nuno Sá, Andy Shevchenko, linux-iio,
linux-kernel
On Sun, 29 Jun 2025 15:17:25 -0300
Marcelo Schmitt <marcelo.schmitt1@gmail.com> wrote:
> On 06/28, David Lechner wrote:
> > Add const qualifier to struct ad7091r_init_info ad7091r*_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>
Tags added. Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-06-29 18:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-28 16:09 [PATCH] iio: adc: ad7091r8: make ad7091r_init_info const David Lechner
2025-06-29 16:50 ` Jonathan Cameron
2025-06-29 18:17 ` Marcelo Schmitt
2025-06-29 18:38 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox