iio: dac: mcp4725: Use i2c_get_match_data()
authorBiju Das <biju.das.jz@bp.renesas.com>
Sun, 3 Sep 2023 11:55:46 +0000 (12:55 +0100)
committerJonathan Cameron <jonathan.cameron@huawei.com>
Tue, 12 Sep 2023 09:42:04 +0000 (10:42 +0100)
commit18bdc686c1519e067dc80ec0015da52e2bd628b9
treeed44de845a02ee42a08a621c061e706d863b5494
parent002d546fff4f83648903eada2b6226d314374fdb
iio: dac: mcp4725: Use i2c_get_match_data()

Add struct mcp4725_chip_info with chan_spec and chip_id variable.
After this simplify probe() by replacing device_get_match_data() and id
lookup for retrieving match data by i2c_get_match_data() by converting
enum->pointer for data in the match table.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20230903115548.59306-3-biju.das.jz@bp.renesas.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/dac/mcp4725.c