Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: light: opt4001: Use i2c_get_match_data()

Replace device_get_match_data()->i2c_get_match_data() to extend matching
support for ID table.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Stefan Windfeldt-Prytz <stefan.windfeldt-prytz@axis.com>
Tested-by: Stefan Windfeldt-Prytz <stefan.windfeldt-prytz@axis.com>
Link: https://lore.kernel.org/r/20230812151908.188696-1-biju.das.jz@bp.renesas.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Biju Das and committed by
Jonathan Cameron
5a4ef20a c4153b57

+1 -1
+1 -1
drivers/iio/light/opt4001.c
··· 412 412 if (dev_id != OPT4001_DEVICE_ID_VAL) 413 413 dev_warn(&client->dev, "Device ID: %#04x unknown\n", dev_id); 414 414 415 - chip->chip_info = device_get_match_data(&client->dev); 415 + chip->chip_info = i2c_get_match_data(client); 416 416 417 417 indio_dev->channels = opt4001_channels; 418 418 indio_dev->num_channels = ARRAY_SIZE(opt4001_channels);