Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

David Lechner and committed by
Jonathan Cameron
b1a6eac5 96337ede

+2 -2
+2 -2
drivers/iio/proximity/vcnl3020.c
··· 102 102 return *val /= 10000; 103 103 }; 104 104 105 - static struct vcnl3020_property vcnl3020_led_current_property = { 105 + static const struct vcnl3020_property vcnl3020_led_current_property = { 106 106 .name = "vishay,led-current-microamp", 107 107 .reg = VCNL_LED_CURRENT, 108 108 .conversion_func = microamp_to_reg, 109 109 }; 110 110 111 111 static int vcnl3020_get_and_apply_property(struct vcnl3020_data *data, 112 - struct vcnl3020_property *prop) 112 + const struct vcnl3020_property *prop) 113 113 { 114 114 int rc; 115 115 u32 val;