iio: imu: bmi160: Make use of device properties
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 14 Apr 2022 13:18:04 +0000 (16:18 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Thu, 28 Apr 2022 18:22:54 +0000 (19:22 +0100)
commit5f474919fad82cd5761d2842c261d736941035fe
tree3bda717473fa21335f6b47ee5c3ef37daf54229f
parentd1100dd9068f445aa3102095f95b44aa80d47f57
iio: imu: bmi160: Make use of device properties

Convert the module to be property provider agnostic and allow
it to be used on non-OF platforms.

While at it, reuse temporary device pointer in the same function.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220414131804.25227-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/bmi160/bmi160_core.c
drivers/iio/imu/bmi160/bmi160_i2c.c
drivers/iio/imu/bmi160/bmi160_spi.c