summaryrefslogtreecommitdiff
path: root/drivers/iio/pressure/bmp280-i2c.c
diff options
context:
space:
mode:
authorBartosz Golaszewski <bgolaszewski@baylibre.com>2019-10-07 05:41:31 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2019-10-22 13:10:23 +0300
commit2f4292a821711ec9f2c7781d1ee1a9570940bd02 (patch)
tree1521a45975efc1d21e4b2e4fb151d18472d3f4ae /drivers/iio/pressure/bmp280-i2c.c
parent1372d1a1979931a2a073b2cb683974f9fbe1230e (diff)
downloadlinux-2f4292a821711ec9f2c7781d1ee1a9570940bd02.tar.xz
iio: pressure: bmp280: use devm action and remove labels from probe
We can drop some duplicate code if we use devm_action for disabling regulators and pm and the managed variant of iio_device_register(). This allows us to completely remove all remove() callbacks from both i2c and spi code. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/pressure/bmp280-i2c.c')
-rw-r--r--drivers/iio/pressure/bmp280-i2c.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/iio/pressure/bmp280-i2c.c b/drivers/iio/pressure/bmp280-i2c.c
index acd9a3784fb4..3109c8e2cc11 100644
--- a/drivers/iio/pressure/bmp280-i2c.c
+++ b/drivers/iio/pressure/bmp280-i2c.c
@@ -38,11 +38,6 @@ static int bmp280_i2c_probe(struct i2c_client *client,
client->irq);
}
-static int bmp280_i2c_remove(struct i2c_client *client)
-{
- return bmp280_common_remove(&client->dev);
-}
-
static const struct acpi_device_id bmp280_acpi_i2c_match[] = {
{"BMP0280", BMP280_CHIP_ID },
{"BMP0180", BMP180_CHIP_ID },
@@ -82,7 +77,6 @@ static struct i2c_driver bmp280_i2c_driver = {
.pm = &bmp280_dev_pm_ops,
},
.probe = bmp280_i2c_probe,
- .remove = bmp280_i2c_remove,
.id_table = bmp280_i2c_id,
};
module_i2c_driver(bmp280_i2c_driver);