[PATCH] iio: light: isl76682: make isl76682_range_table const

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

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

diff --git a/drivers/iio/light/isl76682.c b/drivers/iio/light/isl76682.c
index cf6ddee44ffc3f8010de912d36d16d474dbdcc66..b6f2fc9978f620afc69750d21eba7a3aa5032e2d 100644
--- a/drivers/iio/light/isl76682.c
+++ b/drivers/iio/light/isl76682.c
@@ -59,7 +59,7 @@ struct isl76682_range {
 	u32				ir;
 };
 
-static struct isl76682_range isl76682_range_table[] = {
+static const struct isl76682_range isl76682_range_table[] = {
 	{ ISL76682_COMMAND_RANGE_LUX_1K, 15000, 10500 },
 	{ ISL76682_COMMAND_RANGE_LUX_4K, 60000, 42000 },
 	{ ISL76682_COMMAND_RANGE_LUX_16K, 240000, 168000 },

---
base-commit: 14071b9cf2d751ff9bc8b5e43fa94fbf08aceea1
change-id: 20250628-iio-const-data-21-243d6fe40837

Best regards,
-- 
David Lechner <dlechner@baylibre.com>
Re: [PATCH] iio: light: isl76682: make isl76682_range_table const
Posted by Jonathan Cameron 3 months, 1 week ago
On Sat, 28 Jun 2025 12:54:37 -0500
David Lechner <dlechner@baylibre.com> wrote:

> Add const qualifier to struct isl76682_range isl76682_range_table[].
> 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.

Thanks,

Jonathan