[PATCH] i2c: i2c-s3c2410: fix runtime PM cleanup
Jiawen Liu
1298662399 at qq.com
Tue Aug 18 06:11:57 PDT 2026
Keep clock enabled until adapter teardown.
The remove path disables the controller clock before unregistering the
I2C adapter, so adapter teardown can run after the hardware clock has
already been turned off.
Move I2C teardown before clock release (pm_runtime_disable,
clk_unprepare) in s3c24xx_i2c_remove.
Signed-off-by: jiawen <1298662399 at qq.com>
---
diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -1136,11 +1136,9 @@
{
struct s3c24xx_i2c *i2c = platform_get_drvdata(pdev);
+ i2c_del_adapter(&i2c->adap);
+ pm_runtime_disable(&pdev->dev);
clk_unprepare(i2c->clk);
-
- pm_runtime_disable(&pdev->dev);
-
- i2c_del_adapter(&i2c->adap);
}
static int s3c24xx_i2c_suspend_noirq(struct device *dev)
More information about the linux-arm-kernel
mailing list