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: 5720111 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C20B3C058D for ; Tue, 27 Jan 2015 20:14:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DE6AF2024D for ; Tue, 27 Jan 2015 20:14:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 12C2820253 for ; Tue, 27 Jan 2015 20:14:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759575AbbA0UO3 (ORCPT ); Tue, 27 Jan 2015 15:14:29 -0500 Received: from mail-la0-f53.google.com ([209.85.215.53]:40552 "EHLO mail-la0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759610AbbA0UOO (ORCPT ); Tue, 27 Jan 2015 15:14:14 -0500 Received: by mail-la0-f53.google.com with SMTP id gq15so15325617lab.12 for ; Tue, 27 Jan 2015 12:14:13 -0800 (PST) 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:in-reply-to :references; bh=gTyrpSyHbqzdRL6VwtW3chLBNp94eDUPPT9ZNVJCeeE=; b=Ux9NXjXcSK2jMZcIIgHLcf2qg4Ro6dRoQ+ml3VBLt4lkaKdaaF7BCylyHV2U0kqj0N NYdTI+JC0I6DsxfU3xik+3Q6COJGN6UeSKoT2Cx+N0KGO6ht3libjxIrL3iBdNzBWSrE H89csox6PEoZ85gYv/yHcwV5jUUhm/xC60G4psJqwlB7xTca3XdN6sXhFLYE3Wk9SH76 H7pTpKM0mga//hBHJBqASdV9zoiLd+AokWZPkdrKsN9OTCQIwgdTf8bjFg8TA1sthYTR selgPODTg68KcPJRPVsutHr7ouPHkXj3q2LzIjkjSrNrUW6MLIZRRtdxmYEENOXSB+Tw sb9g== X-Gm-Message-State: ALoCoQm6E1NEPk4WdnPEn9rtwZL6pUD3oV755rh7oztL7AtORJYjJLBNhf05AEe5ulj3wt4Gcw7y 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> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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;