[PATCH] iio: adc: axp20x_adc: make axp717_maps const

David Lechner posted 1 patch 3 months, 1 week ago
drivers/iio/adc/axp20x_adc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] iio: adc: axp20x_adc: make axp717_maps const
Posted by David Lechner 3 months, 1 week ago
Add const qualifier to struct iio_map axp717_maps[]. This is read-only
data so it can be made const.

Signed-off-by: David Lechner <dlechner@baylibre.com>
---
 drivers/iio/adc/axp20x_adc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/adc/axp20x_adc.c b/drivers/iio/adc/axp20x_adc.c
index 71584ffd36324800e23945df7984ac98ba88b793..bb290b5ee92d211f12bbb2a4b8f0dda87e09f4c5 100644
--- a/drivers/iio/adc/axp20x_adc.c
+++ b/drivers/iio/adc/axp20x_adc.c
@@ -173,7 +173,7 @@ static const struct iio_map axp22x_maps[] = {
 	{ }
 };
 
-static struct iio_map axp717_maps[] = {
+static const struct iio_map axp717_maps[] = {
 	{
 		.consumer_dev_name = "axp20x-usb-power-supply",
 		.consumer_channel = "vbus_v",

---
base-commit: 14071b9cf2d751ff9bc8b5e43fa94fbf08aceea1
change-id: 20250628-iio-const-data-7-6e215b22f2c8

Best regards,
-- 
David Lechner <dlechner@baylibre.com>
Re: [PATCH] iio: adc: axp20x_adc: make axp717_maps const
Posted by Jonathan Cameron 3 months, 1 week ago
On Sat, 28 Jun 2025 11:23:58 -0500
David Lechner <dlechner@baylibre.com> wrote:

> Add const qualifier to struct iio_map axp717_maps[]. 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.  Plenty of time for
additional comments / tags etc.

Jonathan