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>
This commit is contained in:
committed by
Jonathan Cameron
parent
96337ede94
commit
b1a6eac557
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user