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

Configure Feed

Select the types of activity you want to include in your feed.

iio: magnetometer: yamaha-yas530: Use i2c_get_match_data()

Simplify the probe() by replacing device_get_match_data() with
i2c_get_match_data().

Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230812065741.20990-2-biju.das.jz@bp.renesas.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Biju Das and committed by
Jonathan Cameron
72d36539 541d803a

+1 -3
+1 -3
drivers/iio/magnetometer/yamaha-yas530.c
··· 1434 1434 goto assert_reset; 1435 1435 } 1436 1436 1437 - ci = device_get_match_data(dev); 1438 - if (!ci) 1439 - ci = (const struct yas5xx_chip_info *)id->driver_data; 1437 + ci = i2c_get_match_data(i2c); 1440 1438 yas5xx->chip_info = ci; 1441 1439 1442 1440 ret = regmap_read(yas5xx->map, YAS5XX_DEVICE_ID, &id_check);