Skip to content

Commit b1852c5

Browse files
wangxiaoningnxpAndi Shyti
authored and
Andi Shyti
committed
i2c: imx-lpi2c: Fix clock count when probe defers
Deferred probe with pm_runtime_put() may delay clock disable, causing incorrect clock usage count. Use pm_runtime_put_sync() to ensure the clock is disabled immediately. Fixes: 13d6eb2 ("i2c: imx-lpi2c: add runtime pm support") Signed-off-by: Clark Wang <[email protected]> Signed-off-by: Carlos Song <[email protected]> Cc: <[email protected]> # v4.16+ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Andi Shyti <[email protected]>
1 parent b443265 commit b1852c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/i2c/busses/i2c-imx-lpi2c.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,9 +1380,9 @@ static int lpi2c_imx_probe(struct platform_device *pdev)
13801380
return 0;
13811381

13821382
rpm_disable:
1383-
pm_runtime_put(&pdev->dev);
1384-
pm_runtime_disable(&pdev->dev);
13851383
pm_runtime_dont_use_autosuspend(&pdev->dev);
1384+
pm_runtime_put_sync(&pdev->dev);
1385+
pm_runtime_disable(&pdev->dev);
13861386

13871387
return ret;
13881388
}

0 commit comments

Comments
 (0)