linux/drivers/iio/gyro
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
..
adis16080.c iio: gyro: adis16080: use devm_iio_device_register() in probe 2021-10-17 11:05:54 +01:00
adis16130.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
adis16136.c iio: adis: Cleanout unused headers 2021-06-04 09:28:10 +01:00
adis16260.c iio: adis: Cleanout unused headers 2021-06-04 09:28:10 +01:00
adxrs290.c iio: gyro: adxrs290: fix data signedness 2021-11-21 11:29:50 +00:00
adxrs450.c iio: remove explicit IIO device parent assignment 2020-06-14 11:49:59 +01:00
bmg160_core.c iio: Fix error handling for PM 2022-01-30 14:50:34 +00:00
bmg160_i2c.c iio: gyro: bmg160_i2c: Use vsprintf extension %pe for symbolic error name 2020-04-19 16:56:15 +01:00
bmg160_spi.c iio: gyro: bmg160_spi: Use vsprintf extension %pe for symbolic error name 2020-04-19 16:56:16 +01:00
bmg160.h
fxas21002c_core.c 1st set of new IIO/counter device support, features and cleanup for 5.14 2021-06-09 12:11:49 +02:00
fxas21002c_i2c.c iio: gyro: fxas21002c: add i2c driver 2019-04-22 11:34:12 +01:00
fxas21002c_spi.c iio: gyro: fxas21002c: add spi driver 2019-04-22 11:34:12 +01:00
fxas21002c.h iio: gyro: fxas21002c: Move 'fxas21002c_reg_fields' to the only file its used 2020-07-20 09:03:25 +01:00
hid-sensor-gyro-3d.c iio: hid-sensors: bind IIO channels alloc to device object 2021-07-13 18:21:53 +01:00
itg3200_buffer.c iio: itg3200: Call iio_trigger_notify_done() on error 2021-11-17 17:52:36 +00:00
itg3200_core.c iio: Drop Duplicated "mount-matrix" parameter 2021-06-03 18:24:13 +01:00
Kconfig iio: gyro: remove dead config dependencies on INPUT_MPU3050 2021-09-14 12:00:32 +01:00
Makefile iio: gyro: Add driver support for ADXRS290 2020-08-22 10:53:20 +01:00
mpu3050-core.c iio: gyro: mpu3050: Fix alignment and size issues with buffers. 2021-10-19 08:29:22 +01:00
mpu3050-i2c.c iio: gyro: mpu3050: Use vsprintf extension %pe for symbolic error name 2020-04-19 16:56:16 +01:00
mpu3050.h
ssp_gyro_sensor.c iio: make use of devm_iio_kfifo_buffer_setup() helper 2021-03-11 20:47:01 +00:00
st_gyro_buffer.c iio: gyro: st_gyro: use devm_iio_triggered_buffer_setup() for buffer 2021-07-24 16:35:05 +01:00
st_gyro_core.c iio: st_sensors: remove reference to parent device object on st_sensor_data 2021-09-14 12:00:32 +01:00
st_gyro_i2c.c iio: st_sensors: remove all driver remove functions 2021-09-14 12:00:31 +01:00
st_gyro_spi.c iio: st_sensors: remove all driver remove functions 2021-09-14 12:00:31 +01:00
st_gyro.h iio: gyro: st_gyro: use devm_iio_triggered_buffer_setup() for buffer 2021-07-24 16:35:05 +01:00