Skip to content

Commit

Permalink
iio: light: fix vcnl4000 devicetree hooks
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Marco Felsch authored and jic23 committed Oct 9, 2019
1 parent fdb828e commit 1436a78
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/iio/light/vcnl4000.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,19 +398,19 @@ static int vcnl4000_probe(struct i2c_client *client,
static const struct of_device_id vcnl_4000_of_match[] = {
{
.compatible = "vishay,vcnl4000",
.data = "VCNL4000",
.data = (void *)VCNL4000,
},
{
.compatible = "vishay,vcnl4010",
.data = "VCNL4010",
.data = (void *)VCNL4010,
},
{
.compatible = "vishay,vcnl4010",
.data = "VCNL4020",
.compatible = "vishay,vcnl4020",
.data = (void *)VCNL4010,
},
{
.compatible = "vishay,vcnl4200",
.data = "VCNL4200",
.data = (void *)VCNL4200,
},
{},
};
Expand Down

0 comments on commit 1436a78

Please sign in to comment.