android_kernel_motorola_sm6375/drivers/iio
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Miaoqian Lin a28f8dbd47 iio: Fix error handling for PM
commit 632fe0bb8c5b9c06ec961f575ee42a6fff5eceeb upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-03-02 11:41:12 +01:00
..
accel iio: Fix error handling for PM 2022-03-02 11:41:12 +01:00
adc iio: adc: ad7124: fix mask used for setting AIN_BUFP & AIN_BUFM bits 2022-03-02 11:41:11 +01:00
afe
amplifiers
buffer
chemical
common iio: ssp_sensors: fix error code in ssp_print_mcu_debug() 2021-10-20 11:40:15 +02:00
dac iio: dac: ad5446: Fix ad5622_write() return value 2021-11-17 09:48:26 +01:00
dummy
frequency
gyro iio: Fix error handling for PM 2022-03-02 11:41:12 +01:00
health
humidity
imu iio: Fix error handling for PM 2022-03-02 11:41:12 +01:00
light iio: ltr501: Don't return error code in trigger handler 2021-12-14 14:49:05 +01:00
magnetometer iio: Fix error handling for PM 2022-03-02 11:41:12 +01:00
multiplexer
orientation
potentiometer
potentiostat
pressure
proximity
resolver
temperature
trigger iio: trigger: stm32-timer: fix MODULE_ALIAS 2021-12-14 14:49:05 +01:00
iio_core.h
iio_core_trigger.h
industrialio-buffer.c
industrialio-configfs.c
industrialio-core.c
industrialio-event.c
industrialio-sw-device.c
industrialio-sw-trigger.c
industrialio-trigger.c iio: trigger: Fix reference counting 2021-12-14 14:49:05 +01:00
industrialio-triggered-event.c
inkern.c
Kconfig
Makefile