WSL2-Linux-Kernel/drivers/iio/accel
Miaoqian Lin 632fe0bb8c iio: Fix error handling for PM
The pm_runtime_enable will increase power disable depth.
If the probe fails, we should use pm_runtime_disable() to balance
pm_runtime_enable(). In the PM Runtime docs:
    Drivers in ->remove() callback should undo the runtime PM changes done
    in ->probe(). Usually this means calling pm_runtime_disable(),
    pm_runtime_dont_use_autosuspend() etc.
We should do this in error handling.

Fix this problem for the following drivers: bmc150, bmg160, kmx61,
kxcj-1013, mma9551, mma9553.

Fixes: 7d0ead5c3f ("iio: Reconcile operation order between iio_register/unregister and pm functions")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220106112309.16879-1-linmq006@gmail.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2022-01-30 14:50:34 +00:00
..
Kconfig
Makefile
adis16201.c
adis16209.c
adxl313.h
adxl313_core.c
adxl313_i2c.c
adxl313_spi.c
adxl345.h
adxl345_core.c
adxl345_i2c.c
adxl345_spi.c
adxl355.h
adxl355_core.c
adxl355_i2c.c
adxl355_spi.c
adxl372.c iio: triggered-buffer: extend support to configure output buffers 2021-10-19 08:30:45 +01:00
adxl372.h
adxl372_i2c.c
adxl372_spi.c
bma180.c iio:accel:bma180: Suppress clang W=1 warning about pointer to enum conversion. 2021-12-16 18:02:34 +00:00
bma220_spi.c iio: bma220: Use scan_type when processing raw data 2021-11-17 17:51:40 +00:00
bma400.h iio: accel: bma400: Make bma400_remove() return void 2021-10-19 08:30:45 +01:00
bma400_core.c iio: accel: bma400: Make bma400_remove() return void 2021-10-19 08:30:45 +01:00
bma400_i2c.c iio: accel: bma400: Make bma400_remove() return void 2021-10-19 08:30:45 +01:00
bma400_spi.c iio: accel: bma400: Make bma400_remove() return void 2021-10-19 08:30:45 +01:00
bmc150-accel-core.c iio: Fix error handling for PM 2022-01-30 14:50:34 +00:00
bmc150-accel-i2c.c iio: accel: bmc150: Make bmc150_accel_core_remove() return void 2021-10-19 08:30:45 +01:00
bmc150-accel-spi.c iio: accel: bmc150: Make bmc150_accel_core_remove() return void 2021-10-19 08:30:45 +01:00
bmc150-accel.h iio: accel: bmc150: Make bmc150_accel_core_remove() return void 2021-10-19 08:30:45 +01:00
bmi088-accel-core.c iio: accel: bmi088: Make bmi088_accel_core_remove() return void 2021-10-19 08:30:45 +01:00
bmi088-accel-spi.c iio: accel: bmi088: Make bmi088_accel_core_remove() return void 2021-10-19 08:30:45 +01:00
bmi088-accel.h iio: accel: bmi088: Make bmi088_accel_core_remove() return void 2021-10-19 08:30:45 +01:00
cros_ec_accel_legacy.c
da280.c
da311.c
dmard06.c
dmard09.c
dmard10.c
fxls8962af-core.c iio: accel: fxls8962af: add padding to regmap for SPI 2022-01-23 18:23:48 +00:00
fxls8962af-i2c.c iio: accel: fxls8962af: add padding to regmap for SPI 2022-01-23 18:23:48 +00:00
fxls8962af-spi.c iio: accel: fxls8962af: add padding to regmap for SPI 2022-01-23 18:23:48 +00:00
fxls8962af.h iio: accel: fxls8962af: add padding to regmap for SPI 2022-01-23 18:23:48 +00:00
hid-sensor-accel-3d.c
kxcjk-1013.c iio: Fix error handling for PM 2022-01-30 14:50:34 +00:00
kxsd9-i2c.c iio: accel: kxsd9: Make kxsd9_common_remove() return void 2021-10-19 08:30:45 +01:00
kxsd9-spi.c iio: accel: kxsd9: Make kxsd9_common_remove() return void 2021-10-19 08:30:45 +01:00
kxsd9.c iio: kxsd9: Don't return error code in trigger handler 2021-11-17 17:52:33 +00:00
kxsd9.h iio: accel: kxsd9: Make kxsd9_common_remove() return void 2021-10-19 08:30:45 +01:00
mc3230.c
mma7455.h iio: accel: mma7455: Make mma7455_core_remove() return void 2021-10-19 08:30:45 +01:00
mma7455_core.c iio: mma7455: Use scan_type when processing raw data 2021-11-17 17:51:41 +00:00
mma7455_i2c.c iio: accel: mma7455: Make mma7455_core_remove() return void 2021-10-19 08:30:45 +01:00
mma7455_spi.c iio: accel: mma7455: Make mma7455_core_remove() return void 2021-10-19 08:30:45 +01:00
mma7660.c iio: accel: mma7660: Warn about failure to put device in stand-by in .remove() 2021-11-17 17:51:31 +00:00
mma8452.c 1st set of IIO new device support, features and cleanup for 5.17 2021-12-22 12:33:01 +01:00
mma9551.c iio: Fix error handling for PM 2022-01-30 14:50:34 +00:00
mma9551_core.c
mma9551_core.h
mma9553.c iio: Fix error handling for PM 2022-01-30 14:50:34 +00:00
mxc4005.c
mxc6255.c
sca3000.c iio: sca3000: Use scan_type when processing raw data 2021-11-17 17:51:41 +00:00
sca3300.c
ssp_accel_sensor.c
st_accel.h
st_accel_buffer.c
st_accel_core.c
st_accel_i2c.c
st_accel_spi.c
stk8ba50.c iio: stk8ba50: Use scan_type when processing raw data 2021-11-17 17:51:42 +00:00
stk8312.c iio: stk8312: Use scan_type when processing raw data 2021-11-17 17:51:41 +00:00