From 05f3844293d89cbae47908c525181ef9495614f7 Mon Sep 17 00:00:00 2001 From: "Guoniu.Zhou" Date: Fri, 8 Dec 2017 19:32:34 +0800 Subject: [PATCH] MLK-16549-2: ISI: fix suspend/resume error issue Because ISI runtime suspend has disable clock before system suspend. If driver does not know that and disable clock again in system suspend callback. It will lead to isi clk count mis- match. Reviewed-by: Sandor.Yu Signed-off-by: Guoniu.Zhou --- drivers/media/platform/imx8/mxc-isi-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/imx8/mxc-isi-core.c b/drivers/media/platform/imx8/mxc-isi-core.c index 1ddf3d9f6759..29a1999edfe5 100644 --- a/drivers/media/platform/imx8/mxc-isi-core.c +++ b/drivers/media/platform/imx8/mxc-isi-core.c @@ -209,7 +209,8 @@ static int mxc_isi_pm_suspend(struct device *dev) { struct mxc_isi_dev *mxc_isi = dev_get_drvdata(dev); - if (mxc_isi->flags & MXC_ISI_PM_SUSPENDED) + if ((mxc_isi->flags & MXC_ISI_PM_SUSPENDED) || + (mxc_isi->flags & MXC_ISI_RUNTIME_SUSPEND)) return 0; clk_disable_unprepare(mxc_isi->clk); -- 2.17.1