Skip to content

Commit 4f4388a

Browse files
wangxiaoningnxpgregkh
authored andcommitted
i2c: imx-lpi2c: Fix clock count when probe defers
commit b1852c5 upstream. 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]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 833ef30 commit 4f4388a

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
@@ -652,9 +652,9 @@ static int lpi2c_imx_probe(struct platform_device *pdev)
652652
return 0;
653653

654654
rpm_disable:
655-
pm_runtime_put(&pdev->dev);
656-
pm_runtime_disable(&pdev->dev);
657655
pm_runtime_dont_use_autosuspend(&pdev->dev);
656+
pm_runtime_put_sync(&pdev->dev);
657+
pm_runtime_disable(&pdev->dev);
658658

659659
return ret;
660660
}

0 commit comments

Comments
 (0)