From patchwork Tue Jun 10 10:51:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 31633 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qg0-f69.google.com (mail-qg0-f69.google.com [209.85.192.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2FD3F20675 for ; Tue, 10 Jun 2014 10:52:35 +0000 (UTC) Received: by mail-qg0-f69.google.com with SMTP id f51sf18847449qge.0 for ; Tue, 10 Jun 2014 03:52:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=LqYQ23k09HU9gowDZsz6Qf6NW39/oRUwO8HQvi/e5aQ=; b=dqkA5qhF2u7uHoaetG2snzDF4vWsFx1xE0FZnGc70vZtfY9r2B95CveZL5owMF64P3 i2UpkS5iCUtapOtqpswA/uJyyGGYcSwRNFJJeCRAMkw2wCQdR/zC0G/ihQKJY1GNGtHO pFQhodE3aM0/TLr+VoVeybs0i8SctBGGI8so05MOpIdUkWxSHqr5cLsZbt+CirC9MGMz j8m+FFdT63F3Zo9rTZmQfOY8wc7y/uhBJ4qxjxe5qHE8ZN6N+Wa2ZdWjx+MkUBvfTo7l JIZqN92UJqxf8e168j+97dAK2oG4asoeDnXkkKyGJC5QQ/ILev0iVNbIuEkuoC1q7RJu GpwQ== X-Gm-Message-State: ALoCoQkEhdqFFFUo71g7qmq9rawUmaL/A8akhOZ2D6SBxP0+JCHhzlDo6rF+hFw/SFKZE/0sI39y X-Received: by 10.58.46.101 with SMTP id u5mr1868517vem.16.1402397555038; Tue, 10 Jun 2014 03:52:35 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.93.115 with SMTP id c106ls2035653qge.55.gmail; Tue, 10 Jun 2014 03:52:34 -0700 (PDT) X-Received: by 10.58.152.234 with SMTP id vb10mr9515183veb.21.1402397554861; Tue, 10 Jun 2014 03:52:34 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id cp6si12901968vdc.95.2014.06.10.03.52.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Jun 2014 03:52:34 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.169 as permitted sender) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id la4so7783994vcb.0 for ; Tue, 10 Jun 2014 03:52:34 -0700 (PDT) X-Received: by 10.58.152.234 with SMTP id vb10mr9515174veb.21.1402397554757; Tue, 10 Jun 2014 03:52:34 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp215545vcb; Tue, 10 Jun 2014 03:52:34 -0700 (PDT) X-Received: by 10.112.146.202 with SMTP id te10mr926030lbb.75.1402397553698; Tue, 10 Jun 2014 03:52:33 -0700 (PDT) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com [209.85.217.181]) by mx.google.com with ESMTPS id j8si41875991lbp.20.2014.06.10.03.52.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Jun 2014 03:52:33 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; Received: by mail-lb0-f181.google.com with SMTP id q8so3773276lbi.40 for ; Tue, 10 Jun 2014 03:52:33 -0700 (PDT) X-Received: by 10.152.19.133 with SMTP id f5mr22271429lae.30.1402397553150; Tue, 10 Jun 2014 03:52:33 -0700 (PDT) Received: from linaro-ulf.lan (90-231-160-185-no158.tbcn.telia.com. [90.231.160.185]) by mx.google.com with ESMTPSA id y6sm18329925laj.17.2014.06.10.03.52.30 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Jun 2014 03:52:32 -0700 (PDT) From: Ulf Hansson To: "Rafael J. Wysocki" , Len Brown , Pavel Machek , linux-pm@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Kevin Hilman , Alan Stern , Greg Kroah-Hartman , Daniel Lezcano , Tomasz Figa , devicetree@vger.kernel.org, Linus Walleij , Simon Horman , Magnus Damm , Ben Dooks , Kukjin Kim , Stephen Boyd , Philipp Zabel , Mark Brown , Ulf Hansson Subject: [PATCH 12/24] PM / Domains: Remove pm_genpd_syscore_switch() API Date: Tue, 10 Jun 2014 12:51:25 +0200 Message-Id: <1402397497-26737-13-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1402397497-26737-1-git-send-email-ulf.hansson@linaro.org> References: <1402397497-26737-1-git-send-email-ulf.hansson@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ulf.hansson@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.169 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The pm_genpd_syscore_poweroff() API and pm_genpd_syscore_poweron() API makes the pm_genpd_syscore_switch() API redundant. Moreover, since there are no active users, let's just remove it. Signed-off-by: Ulf Hansson --- drivers/base/power/domain.c | 17 ++++++++++++++--- include/linux/pm_domain.h | 16 ++++------------ 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 3b29477..2d20766 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -1293,13 +1293,13 @@ static void pm_genpd_complete(struct device *dev) } /** - * pm_genpd_syscore_switch - Switch power during system core suspend or resume. + * genpd_syscore_switch - Switch power during system core suspend or resume. * @dev: Device that normally is marked as "always on" to switch power for. * * This routine may only be called during the system core (syscore) suspend or * resume phase for devices whose "always on" flags are set. */ -void pm_genpd_syscore_switch(struct device *dev, bool suspend) +static void genpd_syscore_switch(struct device *dev, bool suspend) { struct generic_pm_domain *genpd; @@ -1315,7 +1315,18 @@ void pm_genpd_syscore_switch(struct device *dev, bool suspend) genpd->suspended_count--; } } -EXPORT_SYMBOL_GPL(pm_genpd_syscore_switch); + +void pm_genpd_syscore_poweroff(struct device *dev) +{ + genpd_syscore_switch(dev, true); +} +EXPORT_SYMBOL_GPL(pm_genpd_syscore_poweroff); + +void pm_genpd_syscore_poweron(struct device *dev) +{ + genpd_syscore_switch(dev, false); +} +EXPORT_SYMBOL_GPL(pm_genpd_syscore_poweron); #else diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index 0e6205e..eacf6a1 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h @@ -249,21 +249,13 @@ static inline void pm_genpd_poweroff_unused(void) {} #endif #ifdef CONFIG_PM_GENERIC_DOMAINS_SLEEP -extern void pm_genpd_syscore_switch(struct device *dev, bool suspend); +extern void pm_genpd_syscore_poweroff(struct device *dev); +extern void pm_genpd_syscore_poweron(struct device *dev); #else -static inline void pm_genpd_syscore_switch(struct device *dev, bool suspend) {} +static inline void pm_genpd_syscore_poweroff(struct device *dev) {} +static inline void pm_genpd_syscore_poweron(struct device *dev) {} #endif -static inline void pm_genpd_syscore_poweroff(struct device *dev) -{ - pm_genpd_syscore_switch(dev, true); -} - -static inline void pm_genpd_syscore_poweron(struct device *dev) -{ - pm_genpd_syscore_switch(dev, false); -} - /* OF power domain providers */ struct of_device_id;