]> git.ipfire.org Git - thirdparty/linux.git/commit
i2c: designware: Use runtime PM macro for auto-cleanup
authorBenoît Monin <benoit.monin@bootlin.com>
Fri, 30 Jan 2026 15:52:30 +0000 (16:52 +0100)
committerAndi Shyti <andi.shyti@kernel.org>
Wed, 4 Feb 2026 01:16:16 +0000 (02:16 +0100)
commit4a5aa00980131c2de520e6fe3fae9b8fe16f93a5
treee2f711209d9cb2751a1f8060416cd5fd4b0280a6
parent470f1a71e60cf94202c66c96a658944b58beac45
i2c: designware: Use runtime PM macro for auto-cleanup

Simplify runtime PM handling in i2c_dw_xfer_common() by using the
pm_runtime_active_auto_try guard. This adds the proper handling for
runtime PM resume errors and allows us to get rid of the done and
done_nolock labels.

Also use the dedicated PM_RUNTIME macros in amd_i2c_dw_xfer_quirk()
instead of ACQUIRE()/ACQUIRE_ERR().

Signed-off-by: Benoît Monin <benoit.monin@bootlin.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Link: https://lore.kernel.org/r/20260130-i2c-dw-v6-2-08ca1e9ece07@bootlin.com
drivers/i2c/busses/i2c-designware-master.c