One of the first things that the driver's pm_runtime_resume callback does is to write zero to the OMAP_I2C_CON_REG register. So there is no need to have the device resumed just to write to the OMAP_I2C_CON_REG register and the call to pm_runtime_resume_and_get() can be dropped. The intended side effect of this commit is to remove an error path of the function resulting in the remove callback returning a mostly ignored error code. This prepares changing the prototype of struct platform_driver's remove callback to return void. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> --- Hello, I'm not completely sure that the reasing in the commit log is sound. There might at least theoretical side effects of the register write that are different if the device is fully resumed. Best regards Uwe drivers/i2c/busses/i2c-omap.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c index f9ae520aed22..a572f6d994ca 100644 --- a/drivers/i2c/busses/i2c-omap.c +++ b/drivers/i2c/busses/i2c-omap.c @@ -1522,16 +1522,12 @@ omap_i2c_probe(struct platform_device *pdev) static int omap_i2c_remove(struct platform_device *pdev) { struct omap_i2c_dev *omap = platform_get_drvdata(pdev); - int ret; i2c_del_adapter(&omap->adapter); - ret = pm_runtime_resume_and_get(&pdev->dev); - if (ret < 0) - return ret; omap_i2c_write_reg(omap, OMAP_I2C_CON_REG, 0); + pm_runtime_dont_use_autosuspend(&pdev->dev); - pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); return 0; } base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6 -- 2.39.2