From patchwork Tue Jun 10 10:51:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 31632 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f71.google.com (mail-qa0-f71.google.com [209.85.216.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C4D6720675 for ; Tue, 10 Jun 2014 10:52:32 +0000 (UTC) Received: by mail-qa0-f71.google.com with SMTP id s7sf8550071qap.10 for ; Tue, 10 Jun 2014 03:52:32 -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=TDT1GQmIJDpCSZP3egqQ7XOyGKIOYdQ2cdvKi0JKY9o=; b=iD+csIpgjpJPNnP4iGJ+iQ33nUnIZXBAk/g0tuZV3mrCRmbV2UMS8+2Gf0D3KQAKkS Xixh8XehxAR/MOonMiguMUfEL8KVNWDYy2bKkEXlkZahpp2b91ihHC2/5k7kXVfdUhTh jU5y4wVaAUivrhnTyaQsjTs3IChn2dhav352zlhECkltiwuCpyQxlgx7DQ+gZUVt4xQv ExHQ7ksZ1J/ey++c01EAB0WShc2u9j4czOLoN9uTrebBsqk2c+xL8E0sRvP/uNQNX5sM EcRGtOnJONCzn4sjA7gIFuyFN6EMFkfcxUGDIvqy+qEOVckC2OmVXAOCNtcFLlbhXXhk lKxA== X-Gm-Message-State: ALoCoQmAIv9Fi06zWrJKKwYicL3y2UrKQHHur2FnDQj6dwI4ixq6K1Vp07buuM4/gCBdTqHlTNGg X-Received: by 10.224.70.10 with SMTP id b10mr2408844qaj.8.1402397552658; Tue, 10 Jun 2014 03:52:32 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.91.99 with SMTP id y90ls2059387qgd.82.gmail; Tue, 10 Jun 2014 03:52:32 -0700 (PDT) X-Received: by 10.58.209.233 with SMTP id mp9mr32994644vec.30.1402397552568; Tue, 10 Jun 2014 03:52:32 -0700 (PDT) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id na9si11675760vcb.64.2014.06.10.03.52.32 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Jun 2014 03:52:32 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.171 as permitted sender) client-ip=209.85.128.171; Received: by mail-ve0-f171.google.com with SMTP id jz11so3824316veb.30 for ; Tue, 10 Jun 2014 03:52:32 -0700 (PDT) X-Received: by 10.58.29.198 with SMTP id m6mr31588962veh.15.1402397552387; Tue, 10 Jun 2014 03:52:32 -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 vs6csp215539vcb; Tue, 10 Jun 2014 03:52:31 -0700 (PDT) X-Received: by 10.153.5.37 with SMTP id cj5mr1625288lad.48.1402397550978; Tue, 10 Jun 2014 03:52:30 -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 dq5si41878098lbc.18.2014.06.10.03.52.30 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Jun 2014 03:52:30 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@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 el20so3865074lab.29 for ; Tue, 10 Jun 2014 03:52:30 -0700 (PDT) X-Received: by 10.152.37.166 with SMTP id z6mr963336laj.70.1402397550462; Tue, 10 Jun 2014 03:52:30 -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.27 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Jun 2014 03:52:29 -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 11/24] PM / Domains: Remove legacy API for adding devices through DT Date: Tue, 10 Jun 2014 12:51:24 +0200 Message-Id: <1402397497-26737-12-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.128.171 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: , There are no active clients of the legacy API and we now also have a sophisticated way, where driver core deals with adding devices to genpd while probing. So, let's remove the legacy API. Signed-off-by: Ulf Hansson --- drivers/base/power/domain.c | 33 --------------------------------- include/linux/pm_domain.h | 17 ----------------- 2 files changed, 50 deletions(-) diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 0362360..3b29477 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -1433,39 +1433,6 @@ int __pm_genpd_add_device(struct generic_pm_domain *genpd, struct device *dev, } /** - * __pm_genpd_of_add_device - Add a device to an I/O PM domain. - * @genpd_node: Device tree node pointer representing a PM domain to which the - * the device is added to. - * @dev: Device to be added. - * @td: Set of PM QoS timing parameters to attach to the device. - */ -int __pm_genpd_of_add_device(struct device_node *genpd_node, struct device *dev, - struct gpd_timing_data *td) -{ - struct generic_pm_domain *genpd = NULL, *gpd; - - dev_dbg(dev, "%s()\n", __func__); - - if (IS_ERR_OR_NULL(genpd_node) || IS_ERR_OR_NULL(dev)) - return -EINVAL; - - mutex_lock(&gpd_list_lock); - list_for_each_entry(gpd, &gpd_list, gpd_list_node) { - if (gpd->of_node == genpd_node) { - genpd = gpd; - break; - } - } - mutex_unlock(&gpd_list_lock); - - if (!genpd) - return -EINVAL; - - return __pm_genpd_add_device(genpd, dev, td); -} - - -/** * __pm_genpd_name_add_device - Find I/O PM domain and add a device to it. * @domain_name: Name of the PM domain to add the device to. * @dev: Device to be added. diff --git a/include/linux/pm_domain.h b/include/linux/pm_domain.h index 7aadf40..0e6205e 100644 --- a/include/linux/pm_domain.h +++ b/include/linux/pm_domain.h @@ -71,7 +71,6 @@ struct generic_pm_domain { s64 max_off_time_ns; /* Maximum allowed "suspended" time. */ bool max_off_time_changed; bool cached_power_down_ok; - struct device_node *of_node; /* Node in device tree */ struct gpd_cpu_data *cpu_data; }; @@ -124,10 +123,6 @@ extern int __pm_genpd_add_device(struct generic_pm_domain *genpd, struct device *dev, struct gpd_timing_data *td); -extern int __pm_genpd_of_add_device(struct device_node *genpd_node, - struct device *dev, - struct gpd_timing_data *td); - extern int __pm_genpd_name_add_device(const char *domain_name, struct device *dev, struct gpd_timing_data *td); @@ -170,12 +165,6 @@ static inline int __pm_genpd_add_device(struct generic_pm_domain *genpd, { return -ENOSYS; } -static inline int __pm_genpd_of_add_device(struct device_node *genpd_node, - struct device *dev, - struct gpd_timing_data *td) -{ - return -ENOSYS; -} static inline int __pm_genpd_name_add_device(const char *domain_name, struct device *dev, struct gpd_timing_data *td) @@ -245,12 +234,6 @@ static inline int pm_genpd_add_device(struct generic_pm_domain *genpd, return __pm_genpd_add_device(genpd, dev, NULL); } -static inline int pm_genpd_of_add_device(struct device_node *genpd_node, - struct device *dev) -{ - return __pm_genpd_of_add_device(genpd_node, dev, NULL); -} - static inline int pm_genpd_name_add_device(const char *domain_name, struct device *dev) {