From patchwork Mon Sep 29 11:58:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 38070 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9894E201F1 for ; Mon, 29 Sep 2014 11:58:54 +0000 (UTC) Received: by mail-la0-f70.google.com with SMTP id ge10sf1932417lab.5 for ; Mon, 29 Sep 2014 04:58:53 -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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=Dvbv3RxY1k4nMU6lxdHbZrmHGYSoyLurnL2QaaVVUFI=; b=KD53EnU4HljJ1Bf+yuoq6PwDbjLKRx79EyGZEOD4gylmu/7tNVxsS/awu+Ls7cC1iY a4s7Otgitlgfa5Hzsw9bx/i1Cp5xH4sRtVHQC9UjqVioyv7ylOndGEIXraMBZIASPsAZ KFiCc+6ZbPxf5JIxZ6txJ8b5F3twm3Q0YItyeidLo+eufJhvC3zPPBefyTYDiAvY551I LUQAaVdhjRvTeQ8gaeLZlfVQaDB5OfNXqeMmmelaT+VBeh+1bXTT2qd5471asWJFIRdx Hc/PT5RV6ChrhZu5zNdoGNnh0TWHCV8npCw+gryAJpl7KL5lX1ppGtcljjTmAOzFVfwC VsYQ== X-Gm-Message-State: ALoCoQllm237SQ+E90r6RINC+a+rR4KH4kMZYrq/WKk+HdmuRJztEC+8r7oIB8nsaoILOaHgaFcO X-Received: by 10.112.162.138 with SMTP id ya10mr22118lbb.21.1411991932934; Mon, 29 Sep 2014 04:58:52 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.100 with SMTP id z4ls121890laz.60.gmail; Mon, 29 Sep 2014 04:58:52 -0700 (PDT) X-Received: by 10.152.116.44 with SMTP id jt12mr39316629lab.7.1411991932676; Mon, 29 Sep 2014 04:58:52 -0700 (PDT) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com [209.85.215.42]) by mx.google.com with ESMTPS id lm5si13045429lac.87.2014.09.29.04.58.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Sep 2014 04:58:52 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.42 as permitted sender) client-ip=209.85.215.42; Received: by mail-la0-f42.google.com with SMTP id mk6so1552956lab.15 for ; Mon, 29 Sep 2014 04:58:52 -0700 (PDT) X-Received: by 10.152.7.73 with SMTP id h9mr7138382laa.27.1411991932537; Mon, 29 Sep 2014 04:58:52 -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.112.130.169 with SMTP id of9csp158689lbb; Mon, 29 Sep 2014 04:58:52 -0700 (PDT) X-Received: by 10.194.60.240 with SMTP id k16mr3008425wjr.109.1411991931943; Mon, 29 Sep 2014 04:58:51 -0700 (PDT) Received: from mail-wg0-f51.google.com (mail-wg0-f51.google.com [74.125.82.51]) by mx.google.com with ESMTPS id ez11si12074193wid.107.2014.09.29.04.58.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 29 Sep 2014 04:58:51 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 74.125.82.51 as permitted sender) client-ip=74.125.82.51; Received: by mail-wg0-f51.google.com with SMTP id b13so4154204wgh.34 for ; Mon, 29 Sep 2014 04:58:51 -0700 (PDT) X-Received: by 10.194.185.199 with SMTP id fe7mr44645092wjc.7.1411991931707; Mon, 29 Sep 2014 04:58:51 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id w10sm15491334wje.10.2014.09.29.04.58.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 29 Sep 2014 04:58:50 -0700 (PDT) From: Ulf Hansson To: "Rafael J. Wysocki" , Len Brown , Pavel Machek , linux-pm@vger.kernel.org Cc: Geert Uytterhoeven , Kevin Hilman , Tomasz Figa , Philipp Zabel , Russell King , Mark Brown , Wolfram Sang , Greg Kroah-Hartman , Dmitry Torokhov , Ulf Hansson Subject: [PATCH] PM / Domains: Move dev_pm_domain_attach|detach() to pm_domain.h Date: Mon, 29 Sep 2014 13:58:47 +0200 Message-Id: <1411991927-19654-1-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 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.215.42 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 commit below, started using errno values in pm.h header file. It also failed to include the header for these, thus it caused compiler errors. 46420dd73b800f87a19af13af5883855cf38cb08 (PM / Domains: Add APIs to attach/detach a PM domain for a device) Instead of including the errno header to pm.h, let's move the functions to pm_domain.h, since it's a better match. Signed-off-by: Ulf Hansson Acked-by: Geert Uytterhoeven Acked-by: Wolfram Sang Acked-by: Mark Brown --- drivers/amba/bus.c | 1 + drivers/base/platform.c | 1 + drivers/i2c/i2c-core.c | 1 + drivers/mmc/core/sdio_bus.c | 1 + drivers/spi/spi.c | 1 + include/linux/pm.h | 11 ----------- include/linux/pm_domain.h | 11 +++++++++++ 7 files changed, 16 insertions(+), 11 deletions(-) diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index 8f52393..47bbdc1 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 904be3d..b2afc29 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index 3cd8f11..e61a6c5 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c @@ -48,6 +48,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/mmc/core/sdio_bus.c b/drivers/mmc/core/sdio_bus.c index 1df0fc6..65cf7a7 100644 --- a/drivers/mmc/core/sdio_bus.c +++ b/drivers/mmc/core/sdio_bus.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 72a0beb..3907f14 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include diff --git a/include/linux/pm.h b/include/linux/pm.h index c4cbf48..1022ba1 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h @@ -622,17 +622,6 @@ struct dev_pm_domain { void (*detach)(struct device *dev, bool power_off); }; -#ifdef CONFIG_PM -extern int dev_pm_domain_attach(struct device *dev, bool power_on); -extern void dev_pm_domain_detach(struct device *dev, bool power_off); -#else -static inline int dev_pm_domain_attach(struct device *dev, bool power_on) -{ - return -ENODEV; -} -static inline void dev_pm_domain_detach(struct device *dev, bool power_off) {} -#endif - /* * The PM_EVENT_ messages are also used by drivers implementing the legacy * suspend framework, based on the ->suspend() and ->resume() callbacks common diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index ed4f4a7..9004743 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h @@ -301,4 +301,15 @@ static inline int of_genpd_add_provider_onecell(struct device_node *np, return __of_genpd_add_provider(np, __of_genpd_xlate_onecell, data); } +#ifdef CONFIG_PM +extern int dev_pm_domain_attach(struct device *dev, bool power_on); +extern void dev_pm_domain_detach(struct device *dev, bool power_off); +#else +static inline int dev_pm_domain_attach(struct device *dev, bool power_on) +{ + return -ENODEV; +} +static inline void dev_pm_domain_detach(struct device *dev, bool power_off) {} +#endif + #endif /* _LINUX_PM_DOMAIN_H */