From patchwork Tue Jan 27 20:13:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 43845 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C803E23FFF for ; Tue, 27 Jan 2015 20:14:26 +0000 (UTC) Received: by mail-lb0-f198.google.com with SMTP id l4sf8851630lbv.1 for ; Tue, 27 Jan 2015 12:14:25 -0800 (PST) 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=gTyrpSyHbqzdRL6VwtW3chLBNp94eDUPPT9ZNVJCeeE=; b=PuTlAdmvCuLhJgLgUq7AWuGpneCImOCWaUmq/nQiU9p/ufVnQv6pugPqaNILHuvsa/ aHRzKJi585z0fUV8Z2/bC3GDnJhu1xdA+GGWJSlgv2/AtxQ54koRmjvIRr6+Sge0DSgM 6PqVm6s1ljqoEMNW13AJ8tqyoF3nfK7WqZoRfECTmWSTl8FJvgj7RcEifAhhjk2sHC8A 0ErjcMVV5sDOr3PqdMajEOA1V9f2J43VUA/frMbHVg6Wa/qi9t+KlOMpA6k8RmGSKEEe /80WMC9cvZcbVyCmQpkYYHQJsL1myxTFQj8sGmp09RWy1bMkD/vAXkz0+P5cjLSbvbzG M5MA== X-Gm-Message-State: ALoCoQlcqCW5VqNGkG2+88bJWzF2QmNfqRW9jvhMl44MgcpTQwQi6KjmafqpHjETCsrInGBSu2n3 X-Received: by 10.180.98.199 with SMTP id ek7mr2882786wib.1.1422389665731; Tue, 27 Jan 2015 12:14:25 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.21.9 with SMTP id r9ls83951lae.31.gmail; Tue, 27 Jan 2015 12:14:25 -0800 (PST) X-Received: by 10.112.130.34 with SMTP id ob2mr4002218lbb.78.1422389665555; Tue, 27 Jan 2015 12:14:25 -0800 (PST) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id tf9si2270802lbb.67.2015.01.27.12.14.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 27 Jan 2015 12:14:25 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by mail-la0-f45.google.com with SMTP id gd6so15299765lab.4 for ; Tue, 27 Jan 2015 12:14:25 -0800 (PST) X-Received: by 10.112.131.1 with SMTP id oi1mr3965802lbb.2.1422389665479; Tue, 27 Jan 2015 12:14:25 -0800 (PST) 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.35.133 with SMTP id h5csp1213826lbj; Tue, 27 Jan 2015 12:14:25 -0800 (PST) X-Received: by 10.152.45.65 with SMTP id k1mr4053208lam.14.1422389653237; Tue, 27 Jan 2015 12:14:13 -0800 (PST) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com. [209.85.217.172]) by mx.google.com with ESMTPS id rx8si2297666lbb.33.2015.01.27.12.14.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 27 Jan 2015 12:14:13 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172; Received: by mail-lb0-f172.google.com with SMTP id l4so15124810lbv.3 for ; Tue, 27 Jan 2015 12:14:13 -0800 (PST) X-Received: by 10.112.163.229 with SMTP id yl5mr3994389lbb.60.1422389653043; Tue, 27 Jan 2015 12:14:13 -0800 (PST) Received: from uffe-Latitude-E6430s.lan (90-231-160-185-no158.tbcn.telia.com. [90.231.160.185]) by mx.google.com with ESMTPSA id ya4sm713470lbb.32.2015.01.27.12.14.10 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 27 Jan 2015 12:14:11 -0800 (PST) From: Ulf Hansson To: "Rafael J. Wysocki" , Len Brown , Pavel Machek , Kevin Hilman , linux-pm@vger.kernel.org Cc: Geert Uytterhoeven , Dmitry Torokhov , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, Ulf Hansson Subject: [PATCH 4/8] PM / Domains: Don't check for an existing device when adding a new Date: Tue, 27 Jan 2015 21:13:41 +0100 Message-Id: <1422389625-11730-5-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1422389625-11730-1-git-send-email-ulf.hansson@linaro.org> References: <1422389625-11730-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.215.45 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: , When adding a device to a genpd, we no longer need to walk genpd's list of existing devices to verify it hasn't already been added. Instead we can now rely on the verification of not allowing existing generic_pm_domain_data for a device, since that has the same meaning. Signed-off-by: Ulf Hansson --- drivers/base/power/domain.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 76eb0c3..88198ba 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -1415,7 +1415,6 @@ int __pm_genpd_add_device(struct generic_pm_domain *genpd, struct device *dev, struct gpd_timing_data *td) { struct generic_pm_domain_data *gpd_data_new, *gpd_data = NULL; - struct pm_domain_data *pdd; int ret = 0; dev_dbg(dev, "%s()\n", __func__); @@ -1434,12 +1433,6 @@ int __pm_genpd_add_device(struct generic_pm_domain *genpd, struct device *dev, goto out; } - list_for_each_entry(pdd, &genpd->dev_list, list_node) - if (pdd->dev == dev) { - ret = -EINVAL; - goto out; - } - ret = dev_pm_get_subsys_data(dev); if (ret) goto out;