diff options
author | Angel Iglesias <ang.iglesiasg@gmail.com> | 2023-10-22 19:22:18 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2023-11-16 19:10:27 +0000 |
commit | faac4dda9a91f94d96cb38676ca4177a54666d75 (patch) | |
tree | fc9b9a06eb93087487dde95d1684464407ef1f52 /drivers/iio | |
parent | aace22e375e287ae825b3b0a8a1d70820cfe27b9 (diff) |
iio: pressure: bmp280: Use spi_get_device_match_data()
Use the spi_get_device_match_data() helper instead of
device_get_match_data() and the fallback match_id logic.
Signed-off-by: Angel Iglesias <ang.iglesiasg@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/9ea8ac90b2b8a8cf45803d0435243c0bee009b37.1697994521.git.ang.iglesiasg@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/pressure/bmp280-spi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/iio/pressure/bmp280-spi.c b/drivers/iio/pressure/bmp280-spi.c index 1dff9bb7c4e9..2eed483a8cc4 100644 --- a/drivers/iio/pressure/bmp280-spi.c +++ b/drivers/iio/pressure/bmp280-spi.c @@ -58,9 +58,7 @@ static int bmp280_spi_probe(struct spi_device *spi) return ret; } - chip_info = device_get_match_data(&spi->dev); - if (!chip_info) - chip_info = (const struct bmp280_chip_info *) id->driver_data; + chip_info = spi_get_device_match_data(spi); regmap = devm_regmap_init(&spi->dev, &bmp280_regmap_bus, |