]> git.baikalelectronics.ru Git - kernel.git/commit
iio: light: fix vcnl4000 devicetree hooks
authorMarco Felsch <m.felsch@pengutronix.de>
Tue, 17 Sep 2019 14:56:36 +0000 (16:56 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 9 Oct 2019 18:11:28 +0000 (19:11 +0100)
commita8503af22175e6e1abaff015653a2b6101408018
tree35c0f87f4792dbb9bcc6945a3763bd7b70cd3add
parentb223e220b6e3bc52e90db6a691919dc4b46e6460
iio: light: fix vcnl4000 devicetree hooks

Since commit 62af1fc71dd3 ("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: 62af1fc71dd3 ("iio: light: vcnl4000 add devicetree hooks")
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Reviewed-by: Angus Ainslie (Purism) angus@akkea.ca
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/light/vcnl4000.c