From patchwork Fri Apr 8 10:44:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 65393 Delivered-To: patches@linaro.org Received: by 10.112.43.237 with SMTP id z13csp597052lbl; Fri, 8 Apr 2016 03:46:04 -0700 (PDT) X-Received: by 10.112.136.201 with SMTP id qc9mr3384541lbb.35.1460112364064; Fri, 08 Apr 2016 03:46:04 -0700 (PDT) Return-Path: Received: from mail-lb0-x236.google.com (mail-lb0-x236.google.com. [2a00:1450:4010:c04::236]) by mx.google.com with ESMTPS id od2si6613457lbb.142.2016.04.08.03.46.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 08 Apr 2016 03:46:03 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c04::236 as permitted sender) client-ip=2a00:1450:4010:c04::236; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c04::236 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-lb0-x236.google.com with SMTP id os9so22652217lbb.2 for ; Fri, 08 Apr 2016 03:46:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=I2Nq5ChQGYZTGPjtp16tEkK6T+BR5kJGUIt3JmbHo3o=; b=MZzR+kxjFFHk12KsAMBCtrrZ1B+HmtNuUVXsYRlJ3lqe3ETPgyNLCNbdqL3kIDV/10 hbqFR43+zPLuYjcC6JAa743IzANlvKq0VKEIqUCAeIun3v3LKsLuBIcVcWXdhzLG/7bH 9VQEaimZn9mg63y2ODS48E8i3ent5rg2Z6yVw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=I2Nq5ChQGYZTGPjtp16tEkK6T+BR5kJGUIt3JmbHo3o=; b=SF1xu4dgG2TRIt+tHNr7HGQaNVfJZpfDU/S3oONIYFvY9DRCms4l+C8PEUSomdxX3k DBg4TsZxNZTFUBmJESFuxsYMrfPrDP5tEegB7sv8ahZiebJRzzidzkyMyun0FTDfxMlG G9/xFPd2PnRkUE9K577FavbxSEDkDTh2Ew7V7ugQUV6s6xYhUSmJTEwqulyw+ikF3Aow MvkOcIYuXmoSRMg63UHCdiDDKBZk3Bh6nSgE2zf1Y1OI37FoGRNZyyFuQZjlSNcW4Y5R TyHLP54Je6BE457qhnF6zGmKJYtaaKUZpHH5rglzfQLzJ9uZXPcZC9q9h4mNGiwobrtW lH2A== X-Gm-Message-State: AD7BkJIhiY+37uNSeu/+hCXEjkucqIE7psE2WAKFe9ZYokMHeBQEIfkvWzscvsSgq7Z3KymoOS0= X-Received: by 10.112.188.134 with SMTP id ga6mr3366131lbc.77.1460112363746; Fri, 08 Apr 2016 03:46:03 -0700 (PDT) Return-Path: Received: from localhost.localdomain (h-155-4-128-67.na.cust.bahnhof.se. [155.4.128.67]) by smtp.gmail.com with ESMTPSA id um4sm1952429lbb.1.2016.04.08.03.46.01 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 08 Apr 2016 03:46:02 -0700 (PDT) From: Ulf Hansson To: "Rafael J. Wysocki" , linux-pm@vger.kernel.org Cc: Greg Kroah-Hartman , Kevin Hilman , Len Brown , Pavel Machek , Linus Walleij , Ulf Hansson Subject: [PATCH] PM / Runtime: Move ignore_children flag under CONFIG_PM Date: Fri, 8 Apr 2016 12:44:36 +0200 Message-Id: <1460112276-5897-1-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 The ignore_children flag is used only when CONFIG_PM is set, so let's move it into that section within the struct dev_pm_info. Move also the corresponding pm_suspend_ignore_children() API out of device.h into pm_runtime.h, to be consistent with similar APIs. Signed-off-by: Ulf Hansson --- include/linux/device.h | 5 ----- include/linux/pm.h | 2 +- include/linux/pm_runtime.h | 6 ++++++ 3 files changed, 7 insertions(+), 6 deletions(-) -- 1.9.1 diff --git a/include/linux/device.h b/include/linux/device.h index 002c597..b130304 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -956,11 +956,6 @@ static inline bool device_async_suspend_enabled(struct device *dev) return !!dev->power.async_suspend; } -static inline void pm_suspend_ignore_children(struct device *dev, bool enable) -{ - dev->power.ignore_children = enable; -} - static inline void dev_pm_syscore_device(struct device *dev, bool val) { #ifdef CONFIG_PM_SLEEP diff --git a/include/linux/pm.h b/include/linux/pm.h index 6a5d654..06eb353 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h @@ -563,7 +563,6 @@ struct dev_pm_info { bool is_suspended:1; /* Ditto */ bool is_noirq_suspended:1; bool is_late_suspended:1; - bool ignore_children:1; bool early_init:1; /* Owned by the PM core */ bool direct_complete:1; /* Owned by the PM core */ spinlock_t lock; @@ -591,6 +590,7 @@ struct dev_pm_info { unsigned int deferred_resume:1; unsigned int run_wake:1; unsigned int runtime_auto:1; + bool ignore_children:1; unsigned int no_callbacks:1; unsigned int irq_safe:1; unsigned int use_autosuspend:1; diff --git a/include/linux/pm_runtime.h b/include/linux/pm_runtime.h index 7af093d..2e14d26 100644 --- a/include/linux/pm_runtime.h +++ b/include/linux/pm_runtime.h @@ -56,6 +56,11 @@ extern void pm_runtime_update_max_time_suspended(struct device *dev, s64 delta_ns); extern void pm_runtime_set_memalloc_noio(struct device *dev, bool enable); +static inline void pm_suspend_ignore_children(struct device *dev, bool enable) +{ + dev->power.ignore_children = enable; +} + static inline bool pm_children_suspended(struct device *dev) { return dev->power.ignore_children @@ -156,6 +161,7 @@ static inline void __pm_runtime_disable(struct device *dev, bool c) {} static inline void pm_runtime_allow(struct device *dev) {} static inline void pm_runtime_forbid(struct device *dev) {} +static inline void pm_suspend_ignore_children(struct device *dev, bool enable) {} static inline bool pm_children_suspended(struct device *dev) { return false; } static inline void pm_runtime_get_noresume(struct device *dev) {} static inline void pm_runtime_put_noidle(struct device *dev) {}