diff options
author | Jagath Jog J <jagathjog1996@gmail.com> | 2022-05-05 16:30:14 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2022-06-11 16:35:26 +0300 |
commit | 12c99f859fd3da5fc8f8491826e7023001f54821 (patch) | |
tree | 75895daed8f94afefd3b0c81cd4aa23db6768a71 /drivers/iio/accel/bma400.h | |
parent | 1bd2dc6ea863690aee5c45ebf09c9194c7a42c0d (diff) | |
download | linux-12c99f859fd3da5fc8f8491826e7023001f54821.tar.xz |
iio: accel: bma400: conversion to device-managed function
This is a conversion to device-managed by using devm_iio_device_register()
inside probe function. Previously the bma400 was not put into power down
mode in some error paths in probe where it now is, but that should cause
no harm.
The dev_set_drvdata() call, bma400_remove() function and hooks in the I2C
and SPI driver struct is removed as devm_iio_device_register() function is
used to automatically unregister on driver detach.
Signed-off-by: Jagath Jog J <jagathjog1996@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20220505133021.22362-4-jagathjog1996@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/accel/bma400.h')
-rw-r--r-- | drivers/iio/accel/bma400.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/iio/accel/bma400.h b/drivers/iio/accel/bma400.h index 80330c7ce17f..1c8c47a9a317 100644 --- a/drivers/iio/accel/bma400.h +++ b/drivers/iio/accel/bma400.h @@ -113,6 +113,4 @@ extern const struct regmap_config bma400_regmap_config; int bma400_probe(struct device *dev, struct regmap *regmap, const char *name); -void bma400_remove(struct device *dev); - #endif |