From patchwork Tue Oct 31 18:11:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 10035121 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 28D85603B5 for ; Tue, 31 Oct 2017 18:19:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2329022B27 for ; Tue, 31 Oct 2017 18:19:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 174C62785D; Tue, 31 Oct 2017 18:19:07 +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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C605328047 for ; Tue, 31 Oct 2017 18:19:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=G8D8zTxyjsIlHY8UQ5ntA8tS/9Dlz0htrlDdTSXDvNk=; b=O84ivfczb9/Q8R0b/b/6co/0pr p7E9aEP2CwuM6vdr7VehCU17uP2h/gpdkKVMC+dlIsv0FSc9qvhXCquE+pqWa7TxvhLt+L1OUXSCG Zynk6Ik0YZcPofxpbEZcNooZ10Xrk/bL6zJJa6AxAdqhVoNAWaMePMOzVGvh+vR3Rfd4YrOpGt3/X G38ijpjZ88KS/DtqYDPOJw+TqsEF4hQLoUCoxCGZ589c4lO9rMHzbBfu8GSsFM9ah6/kF+Ei4c383 0ocjGtgw5xK/4Ln8GnU4P+nh1M0ihqPwmP9c5pn+YJTBK28n0ass1KDjcm5lY07pl4cSf/Rw8cfLq JsCboLsg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e9b7y-0007qC-0O; Tue, 31 Oct 2017 18:19:06 +0000 Received: from xavier.telenet-ops.be ([2a02:1800:120:4::f00:14]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e9b1F-0003c5-OL for linux-mediatek@lists.infradead.org; Tue, 31 Oct 2017 18:12:12 +0000 Received: from ayla.of.borg ([84.195.106.246]) by xavier.telenet-ops.be with bizsmtp id UJBf1w00v5JzmfG01JBf4t; Tue, 31 Oct 2017 19:11:43 +0100 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.86_2) (envelope-from ) id 1e9b0l-0001Gj-Lh; Tue, 31 Oct 2017 19:11:39 +0100 Received: from geert by ramsan with local (Exim 4.86_2) (envelope-from ) id 1e9b0l-00059U-Hn; Tue, 31 Oct 2017 19:11:39 +0100 From: Geert Uytterhoeven To: "Rafael J . Wysocki" , Ulf Hansson , Kevin Hilman Subject: [PATCH v2 5/5] [RFC] PM / Domains: Remove gpd_dev_ops.active_wakeup() callback Date: Tue, 31 Oct 2017 19:11:34 +0100 Message-Id: <1509473494-19740-6-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1509473494-19740-1-git-send-email-geert+renesas@glider.be> References: <1509473494-19740-1-git-send-email-geert+renesas@glider.be> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171031_111210_066432_11BF87BA X-CRM114-Status: UNSURE ( 9.06 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , Geert Uytterhoeven , linux-pm@vger.kernel.org, Magnus Damm , linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, linux-rockchip@lists.infradead.org, Simon Horman , linux-mediatek@lists.infradead.org, Matthias Brugger MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP There are no more users left of the gpd_dev_ops.active_wakeup() callback. All have been converted to GENPD_FLAG_ACTIVE_WAKEUP. Hence remove the callback. Signed-off-by: Geert Uytterhoeven Reviewed-by: Kevin Hilman --- This must not be applied before all users of active_wakup have been converted, hence the "RFC". v2: - New. --- drivers/base/power/domain.c | 14 +++----------- include/linux/pm_domain.h | 1 - 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index c5172d70b742f288..8768e56ecf101203 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -864,14 +864,6 @@ static bool genpd_present(const struct generic_pm_domain *genpd) #ifdef CONFIG_PM_SLEEP -static bool genpd_dev_active_wakeup(const struct generic_pm_domain *genpd, - struct device *dev) -{ - if (genpd_is_active_wakeup(genpd)) - return true; - return GENPD_DEV_CALLBACK(genpd, bool, active_wakeup, dev); -} - /** * genpd_sync_power_off - Synchronously power off a PM domain and its masters. * @genpd: PM domain to power off, if possible. @@ -976,7 +968,7 @@ static bool resume_needed(struct device *dev, if (!device_can_wakeup(dev)) return false; - active_wakeup = genpd_dev_active_wakeup(genpd, dev); + active_wakeup = genpd_is_active_wakeup(genpd); return device_may_wakeup(dev) ? active_wakeup : !active_wakeup; } @@ -1045,7 +1037,7 @@ static int genpd_finish_suspend(struct device *dev, bool poweroff) if (IS_ERR(genpd)) return -EINVAL; - if (dev->power.wakeup_path && genpd_dev_active_wakeup(genpd, dev)) + if (dev->power.wakeup_path && genpd_is_active_wakeup(genpd)) return 0; if (poweroff) @@ -1100,7 +1092,7 @@ static int genpd_resume_noirq(struct device *dev) if (IS_ERR(genpd)) return -EINVAL; - if (dev->power.wakeup_path && genpd_dev_active_wakeup(genpd, dev)) + if (dev->power.wakeup_path && genpd_is_active_wakeup(genpd)) return 0; genpd_lock(genpd); diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index 28c24c58d479e3b4..04dbef9847d3ad3b 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h @@ -36,7 +36,6 @@ struct dev_power_governor { struct gpd_dev_ops { int (*start)(struct device *dev); int (*stop)(struct device *dev); - bool (*active_wakeup)(struct device *dev); }; struct genpd_power_state {