diff options
author | Alexandru Ardelean <aardelean@deviqon.com> | 2021-06-24 10:04:40 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-07-19 10:51:59 +0200 |
commit | d372e5a19a8eb281428954b5edbd033d824f1bf0 (patch) | |
tree | f1d0de0e8dd5d283db5e93f627fde0481d47902a /drivers/iio/accel/adxl345.h | |
parent | iio: light: tcs3414: convert probe to device-managed routines (diff) | |
download | linux-d372e5a19a8eb281428954b5edbd033d824f1bf0.tar.xz linux-d372e5a19a8eb281428954b5edbd033d824f1bf0.zip |
iio: accel: adxl345: convert probe to device-managed functions
This driver has two parts, one for i2c and one for spi, since the chip can
operate with both wire protocols.
The core file has a common adxl345_core_remove() function which puts the
chip into a powerdown state. This can be implemented with a
devm_add_action_or_reset() hook.
Doing that means we can register the IIO device with
devm_iio_device_register() and get rid of the adxl345_core_remove()
function.
The dev_set_drvdata() call can be removed as there is no other user of this
private data anymore.
Signed-off-by: Alexandru Ardelean <aardelean@deviqon.com>
Link: https://lore.kernel.org/r/20210624080441.8710-1-aardelean@deviqon.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/accel/adxl345.h')
-rw-r--r-- | drivers/iio/accel/adxl345.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/iio/accel/adxl345.h b/drivers/iio/accel/adxl345.h index 384497776b67..af0fdd02c4f2 100644 --- a/drivers/iio/accel/adxl345.h +++ b/drivers/iio/accel/adxl345.h @@ -15,6 +15,5 @@ enum adxl345_device_type { int adxl345_core_probe(struct device *dev, struct regmap *regmap, enum adxl345_device_type type, const char *name); -int adxl345_core_remove(struct device *dev); #endif /* _ADXL345_H_ */ |