From patchwork Tue Jun 20 12:05:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mikko Perttunen X-Patchwork-Id: 9799347 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 126D4601BC for ; Tue, 20 Jun 2017 12:06:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 045D42846B for ; Tue, 20 Jun 2017 12:06:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED2352847F; Tue, 20 Jun 2017 12:06:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6033C2846B for ; Tue, 20 Jun 2017 12:06:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751094AbdFTMGm (ORCPT ); Tue, 20 Jun 2017 08:06:42 -0400 Received: from hqemgate16.nvidia.com ([216.228.121.65]:7960 "EHLO hqemgate16.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751075AbdFTMGl (ORCPT ); Tue, 20 Jun 2017 08:06:41 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate16.nvidia.com id ; Tue, 20 Jun 2017 05:06:42 -0700 Received: from HQMAIL106.nvidia.com ([172.20.13.39]) by hqpgpgate101.nvidia.com (PGP Universal service); Tue, 20 Jun 2017 05:06:40 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Tue, 20 Jun 2017 05:06:40 -0700 Received: from HQMAIL108.nvidia.com (172.18.146.13) by HQMAIL106.nvidia.com (172.18.146.12) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 20 Jun 2017 12:06:40 +0000 Received: from hqnvemgw02.nvidia.com (172.16.227.111) by HQMAIL108.nvidia.com (172.18.146.13) with Microsoft SMTP Server id 15.0.1263.5 via Frontend Transport; Tue, 20 Jun 2017 12:06:40 +0000 Received: from mperttunen-lnx.Nvidia.com (Not Verified[10.21.26.175]) by hqnvemgw02.nvidia.com with Trustwave SEG (v7, 5, 5, 8150) id ; Tue, 20 Jun 2017 05:06:39 -0700 From: Mikko Perttunen To: , , CC: , , Mikko Perttunen Subject: [PATCH] PM / Domains: Call driver's noirq callbacks Date: Tue, 20 Jun 2017 15:05:27 +0300 Message-ID: <1497960327-22832-1-git-send-email-mperttunen@nvidia.com> X-Mailer: git-send-email 2.1.4 X-NVConfidentiality: public MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Currently genpd installs its own suspend_noirq and resume_noirq callbacks, but never calls down to the driver's corresponding callbacks. Add these calls. Signed-off-by: Mikko Perttunen --- drivers/base/power/domain.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index d3f1d96f75e9..c3b6e6018c02 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -925,6 +925,10 @@ static int pm_genpd_suspend_noirq(struct device *dev) return ret; } + ret = pm_generic_suspend_noirq(dev); + if (ret) + return ret; + genpd_lock(genpd); genpd->suspended_count++; genpd_sync_power_off(genpd, true, 0); @@ -958,6 +962,10 @@ static int pm_genpd_resume_noirq(struct device *dev) genpd->suspended_count--; genpd_unlock(genpd); + ret = pm_generic_resume_noirq(dev); + if (ret) + return ret; + if (genpd->dev_ops.stop && genpd->dev_ops.start) ret = pm_runtime_force_resume(dev);