OpenCloudOS-Kernel/drivers/iio/magnetometer
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 iio: magnetometer: ak8975: add AK09116 support 2021-09-14 12:00:33 +01:00
Makefile iio: magnetometer: Add driver for Yamaha YAS530 2021-01-09 21:52:46 +00:00
ak8974.c iio: Drop Duplicated "mount-matrix" parameter 2021-06-03 18:24:13 +01:00
ak8975.c iio:magn:ak8975: Suppress clang W=1 warning about pointer to enum conversion. 2021-12-21 15:10:09 +00:00
bmc150_magn.c iio: Fix error handling for PM 2022-01-30 14:50:34 +00:00
bmc150_magn.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bmc150_magn_i2c.c iio: magnetometer: bmc150: Add proper compatible for BMM150 2020-07-07 20:24:07 +01:00
bmc150_magn_spi.c iio: magn: bmc150: Use vsprintf extension %pe for symbolic error name 2020-04-19 16:56:18 +01:00
hid-sensor-magn-3d.c iio: hid-sensors: Update header includes 2021-06-16 14:53:13 +01:00
hmc5843.h iio: magn: hmc5843: Make hmc5843_common_remove() return void 2021-10-19 08:30:45 +01:00
hmc5843_core.c iio: expose shared parameter in IIO_ENUM_AVAILABLE 2021-11-27 16:12:23 +00:00
hmc5843_i2c.c iio: magn: hmc5843: Make hmc5843_common_remove() return void 2021-10-19 08:30:45 +01:00
hmc5843_spi.c iio: magn: hmc5843: Make hmc5843_common_remove() return void 2021-10-19 08:30:45 +01:00
mag3110.c iio: mag3110: Use scan_type when processing raw data 2021-11-17 17:51:43 +00:00
mmc35240.c iio: magnetometer: mmc35240: Fix function header formatting 2020-07-20 09:03:08 +01:00
rm3100-core.c iio: magn: rm3100: Fix alignment of buffer in iio_push_to_buffers_with_timestamp() 2021-06-14 11:42:41 +01:00
rm3100-i2c.c iio: magnetometer: Add driver support for PNI RM3100 2018-11-16 18:32:31 +00:00
rm3100-spi.c iio: magnetometer: Add driver support for PNI RM3100 2018-11-16 18:32:31 +00:00
rm3100.h iio: magnetometer: Add driver support for PNI RM3100 2018-11-16 18:32:31 +00:00
st_magn.h iio: magn: st_magn: use devm_iio_triggered_buffer_setup() for buffer 2021-07-24 16:35:05 +01:00
st_magn_buffer.c iio: magn: st_magn: use devm_iio_triggered_buffer_setup() for buffer 2021-07-24 16:35:05 +01:00
st_magn_core.c iio: st_sensors: remove reference to parent device object on st_sensor_data 2021-09-14 12:00:32 +01:00
st_magn_i2c.c iio: st_sensors: remove all driver remove functions 2021-09-14 12:00:31 +01:00
st_magn_spi.c iio: st_sensors: remove all driver remove functions 2021-09-14 12:00:31 +01:00
yamaha-yas530.c iio: Drop Duplicated "mount-matrix" parameter 2021-06-03 18:24:13 +01:00