summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDavid Lechner <dlechner@baylibre.com>2025-06-28 13:23:49 -0500
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2025-07-13 15:36:23 +0100
commitb1a6eac557f3f6f188beb8a7e12de1c66a8d38da (patch)
tree720b80e5b0f7d4e13a42ea8b6d1ad8587f08f336 /drivers
parent96337ede943508a2d900768f8ef68f83c178c7fd (diff)
iio: proximity: vcnl3020: make vcnl3020_property const
Add const qualifier to struct vcnl3020_property vcnl3020_led_current_property. This is read-only data so it can be made const. Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20250628-iio-const-data-25-v1-2-5d99cf17790e@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iio/proximity/vcnl3020.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/proximity/vcnl3020.c b/drivers/iio/proximity/vcnl3020.c
index 234bdad543cc..7f417372566a 100644
--- a/drivers/iio/proximity/vcnl3020.c
+++ b/drivers/iio/proximity/vcnl3020.c
@@ -102,14 +102,14 @@ static u32 microamp_to_reg(u32 *val)
return *val /= 10000;
};
-static struct vcnl3020_property vcnl3020_led_current_property = {
+static const struct vcnl3020_property vcnl3020_led_current_property = {
.name = "vishay,led-current-microamp",
.reg = VCNL_LED_CURRENT,
.conversion_func = microamp_to_reg,
};
static int vcnl3020_get_and_apply_property(struct vcnl3020_data *data,
- struct vcnl3020_property *prop)
+ const struct vcnl3020_property *prop)
{
int rc;
u32 val;