media: i2c: video-i2c: Convert enum->pointer for data in the match tables
authorBiju Das <biju.das.jz@bp.renesas.com>
Sun, 20 Aug 2023 07:58:46 +0000 (08:58 +0100)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 27 Sep 2023 07:39:56 +0000 (09:39 +0200)
commitd1560d57d75c05004e19cd3333e72b13940863f4
treebc76658ac0bbba0671aa33ca442ff892d4930f6e
parenta111f02464ca74358a001ff710334e09a22cdd7a
media: i2c: video-i2c: Convert enum->pointer for data in the match tables

Convert enum->pointer for data in the match tables, so that
device_get_match_data() can do match against OF/ACPI/I2C tables, once i2c
bus type match support added to it.

Replace enum->struct *video_i2c_chip for data in the match table. Simplify
the probe() by replacing device_get_match_data() and ID lookup for
retrieving data by i2c_get_match_data().

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/i2c/video-i2c.c