]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
iio: proximity: vcnl3020: make vcnl3020_property const
authorDavid Lechner <dlechner@baylibre.com>
Sat, 28 Jun 2025 18:23:49 +0000 (13:23 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 13 Jul 2025 14:36:23 +0000 (15:36 +0100)
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>
drivers/iio/proximity/vcnl3020.c

index 234bdad543cc25e59ace336d2870356b9521f8c8..7f417372566a69e43a62accc1ce0cc1586bd8054 100644 (file)
@@ -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;