summaryrefslogtreecommitdiff
path: root/drivers/iio/imu/bmi160/bmi160_i2c.c
diff options
context:
space:
mode:
authorMartin Kelly <martin@martingkelly.com>2018-12-10 06:14:55 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2018-12-11 00:15:41 +0300
commit6e9982918c3fc4f0c4c32c95d1eb0a345baea5f1 (patch)
tree7de2102994afed929d7e92e39df4541b94b07497 /drivers/iio/imu/bmi160/bmi160_i2c.c
parent0e76df5c978338f3051e5126fc0c4245c57a307a (diff)
downloadlinux-6e9982918c3fc4f0c4c32c95d1eb0a345baea5f1.tar.xz
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>
Diffstat (limited to 'drivers/iio/imu/bmi160/bmi160_i2c.c')
-rw-r--r--drivers/iio/imu/bmi160/bmi160_i2c.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/iio/imu/bmi160/bmi160_i2c.c b/drivers/iio/imu/bmi160/bmi160_i2c.c
index 155a31f72445..5b1f7e6af651 100644
--- a/drivers/iio/imu/bmi160/bmi160_i2c.c
+++ b/drivers/iio/imu/bmi160/bmi160_i2c.c
@@ -38,13 +38,6 @@ static int bmi160_i2c_probe(struct i2c_client *client,
return bmi160_core_probe(&client->dev, regmap, name, false);
}
-static int bmi160_i2c_remove(struct i2c_client *client)
-{
- bmi160_core_remove(&client->dev);
-
- return 0;
-}
-
static const struct i2c_device_id bmi160_i2c_id[] = {
{"bmi160", 0},
{}
@@ -72,7 +65,6 @@ static struct i2c_driver bmi160_i2c_driver = {
.of_match_table = of_match_ptr(bmi160_of_match),
},
.probe = bmi160_i2c_probe,
- .remove = bmi160_i2c_remove,
.id_table = bmi160_i2c_id,
};
module_i2c_driver(bmi160_i2c_driver);