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

iio: imu: bmi270: fix dev_err_probe error msg

The bmi270 can be connected to I2C or a SPI interface. If it is a SPI,
during probe, if devm_regmap_init() fails, it should print the "spi"
term rather "i2c".

Fixes: 92cc50a00574 ("iio: imu: bmi270: Add spi driver for bmi270 imu")
Signed-off-by: Rodrigo Gobbi <rodrigo.gobbi.7@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Rodrigo Gobbi and committed by
Jonathan Cameron
02f86101 698dcf54

+1 -1
+1 -1
drivers/iio/imu/bmi270/bmi270_spi.c
··· 60 60 &bmi270_spi_regmap_config); 61 61 if (IS_ERR(regmap)) 62 62 return dev_err_probe(dev, PTR_ERR(regmap), 63 - "Failed to init i2c regmap"); 63 + "Failed to init spi regmap\n"); 64 64 65 65 return bmi270_core_probe(dev, regmap, chip_info); 66 66 }