iio: bmi160: use all devm functions in probe
authorMartin Kelly <martin@martingkelly.com>
Mon, 10 Dec 2018 03:14:55 +0000 (19:14 -0800)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Mon, 10 Dec 2018 21:15:41 +0000 (21:15 +0000)
commit6e9982918c3fc4f0c4c32c95d1eb0a345baea5f1
tree7de2102994afed929d7e92e39df4541b94b07497
parent0e76df5c978338f3051e5126fc0c4245c57a307a
iio: bmi160: use all devm functions in probe

Currently, we're using the devm version of some but not all functions.
Switch to the devm version of iio_triggered_buffer_setup and
iio_device_register to simplify the code a bit and decrease the chance of
bugs.

Signed-off-by: Martin Kelly <martin@martingkelly.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/imu/bmi160/bmi160.h
drivers/iio/imu/bmi160/bmi160_core.c
drivers/iio/imu/bmi160/bmi160_i2c.c
drivers/iio/imu/bmi160/bmi160_spi.c