Hello Sylwester, Thanks a lot for your feedback. On 03/27/2015 03:36 PM, Sylwester Nawrocki wrote: >> * GIC wake-up support >> @@ -374,6 +376,16 @@ static void exynos5420_pm_prepare(void) >> { >> unsigned int tmp; >> >> + /* >> + * Exynos5420 requires the MDMA0 controller clock to be >> + * ungated on suspend in order to be resumed correctly. >> + */ >> + clk = clk_get(NULL, "mdma0"); >> + if (IS_ERR(clk)) >> + pr_warn("Failed to get mdma0 clk (%ld)\n", PTR_ERR(clk)); > > I suppose you want this clk_get() call in exynos_pm_init(), now there Well I wanted to do it in an exynos5420 specific function to avoid having an of_machine_is_compatible("samsung,exynos5420") but I can move there if that is preferred. > is clk_put() missing and this will cause a memory leak. > duh, I wonder how I missed that. Thanks for pointing it out. >> + else >> + clk_prepare_enable(clk); >> + >> /* Set wake-up mask registers */ >> exynos_pm_set_wakeup_mask(); >> >> @@ -516,6 +528,9 @@ static void exynos5420_pm_resume(void) >> { >> unsigned long tmp; >> >> + if (!IS_ERR_OR_NULL(clk)) > > This should be just IS_ERR(). > Ok. >> + clk_disable_unprepare(clk); >> + >> /* Restore the CPU0 low power state register */ >> tmp = pmu_raw_readl(EXYNOS5_ARM_CORE0_SYS_PWR_REG); >> pmu_raw_writel(tmp | S5P_CORE_LOCAL_PWR_EN, > > -- > Regards, > Sylwester > Best regards, Javier -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html