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

iio: accel: adxl313: Use i2c_get_match_data

Replace device_get_match_data() and i2c_match_id() by i2c_get_match
_data() as we have similar I2C and DT-based matching table.

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20230725171624.331283-3-biju.das.jz@bp.renesas.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Biju Das and committed by
Jonathan Cameron
579f6b00 f636554c

+1 -3
+1 -3
drivers/iio/accel/adxl313_i2c.c
··· 65 65 * Retrieves device specific data as a pointer to a 66 66 * adxl313_chip_info structure 67 67 */ 68 - chip_data = device_get_match_data(&client->dev); 69 - if (!chip_data) 70 - chip_data = (const struct adxl313_chip_info *)i2c_match_id(adxl313_i2c_id, client)->driver_data; 68 + chip_data = i2c_get_match_data(client); 71 69 72 70 regmap = devm_regmap_init_i2c(client, 73 71 &adxl31x_i2c_regmap_config[chip_data->type]);