diff options
author | Biju Das <biju.das.jz@bp.renesas.com> | 2023-09-10 16:00:32 +0100 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2023-09-27 09:39:57 +0200 |
commit | dd2dbf3cbd3f091f20860586f1115eb0fa513d5d (patch) | |
tree | b6e21e32e9a2edc0425e1d5fb55e75b364a70ad9 /drivers/hwmon/lm95234.c | |
parent | 578295176d5caaf0a91314826152b4b3a5766320 (diff) |
media: i2c: ov7670: Extend match support for OF tables
The driver has an OF match table, still, it uses an ID lookup table for
retrieving match data. Currently, the driver is working on the
assumption that an I2C device registered via OF will always match a
legacy I2C device ID. The correct approach is to have an OF device ID
table using i2c_get_match_data() if the devices are registered via OF/ID.
Unify the OF/ID table by using struct ov7670_devtype as match data for
both these tables and replace the ID lookup table for the match data by
i2c_get_match_data().
Split the array ov7670_devdata[] as individual variables, and
make lines shorter by referring to e.g. &ov7670_devdata instead of
&ov7670_devdata[MODEL_OV7670].
Drop enum ov7670_model as there is no user.
While at it, remove the trailing comma in the terminator entry for the OF
table making code robust against (theoretical) misrebases or other similar
things where the new entry goes _after_ the termination without the
compiler noticing.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Reviewed-by: Jacopo Mondi <jacopo.mondi+renesas@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/hwmon/lm95234.c')
0 files changed, 0 insertions, 0 deletions