Skip to content

Commit 1436a78

Browse files
Marco Felschjic23
authored andcommitted
iio: light: fix vcnl4000 devicetree hooks
Since commit ebd457d ("iio: light: vcnl4000 add devicetree hooks") the of_match_table is supported but the data shouldn't be a string. Instead it shall be one of 'enum vcnl4000_device_ids'. Also the matching logic for the vcnl4020 was wrong. Since the data retrieve mechanism is still based on the i2c_device_id no failures did appeared till now. Fixes: ebd457d ("iio: light: vcnl4000 add devicetree hooks") Signed-off-by: Marco Felsch <[email protected]> Reviewed-by: Angus Ainslie (Purism) [email protected] Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent fdb828e commit 1436a78

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/iio/light/vcnl4000.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -398,19 +398,19 @@ static int vcnl4000_probe(struct i2c_client *client,
398398
static const struct of_device_id vcnl_4000_of_match[] = {
399399
{
400400
.compatible = "vishay,vcnl4000",
401-
.data = "VCNL4000",
401+
.data = (void *)VCNL4000,
402402
},
403403
{
404404
.compatible = "vishay,vcnl4010",
405-
.data = "VCNL4010",
405+
.data = (void *)VCNL4010,
406406
},
407407
{
408-
.compatible = "vishay,vcnl4010",
409-
.data = "VCNL4020",
408+
.compatible = "vishay,vcnl4020",
409+
.data = (void *)VCNL4010,
410410
},
411411
{
412412
.compatible = "vishay,vcnl4200",
413-
.data = "VCNL4200",
413+
.data = (void *)VCNL4200,
414414
},
415415
{},
416416
};

0 commit comments

Comments
 (0)