Skip to content

Commit 4249842

Browse files
dlechjic23
authored andcommitted
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>
1 parent ba13dc5 commit 4249842

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/iio/proximity/vcnl3020.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,14 @@ static u32 microamp_to_reg(u32 *val)
102102
return *val /= 10000;
103103
};
104104

105-
static struct vcnl3020_property vcnl3020_led_current_property = {
105+
static const struct vcnl3020_property vcnl3020_led_current_property = {
106106
.name = "vishay,led-current-microamp",
107107
.reg = VCNL_LED_CURRENT,
108108
.conversion_func = microamp_to_reg,
109109
};
110110

111111
static int vcnl3020_get_and_apply_property(struct vcnl3020_data *data,
112-
struct vcnl3020_property *prop)
112+
const struct vcnl3020_property *prop)
113113
{
114114
int rc;
115115
u32 val;

0 commit comments

Comments
 (0)