Received: by 10.192.165.148 with SMTP id m20csp1773282imm; Thu, 26 Apr 2018 01:58:22 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+qDuLlrN7e/3svaLsWmrH5gsPx3o1FiJxE4qcYTNm+aUE5tWWTjGwb6eAMF84n/UP6/pHQ X-Received: by 10.98.63.78 with SMTP id m75mr31026305pfa.176.1524733102394; Thu, 26 Apr 2018 01:58:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524733102; cv=none; d=google.com; s=arc-20160816; b=KJa32vpDVjqLajWai6U0fYu4h46MOOmjbHJiUCAYfXe5HKc2tIgAcu83QQSIJ76+m1 oQPlDh7HPlmr58xz2QRQKSeiKcykDRfqrvKR0SFHnFHr0CdQ8xf6hGue5vL+4tS511PD lORCPfqHrDAgMhrJ0BEXXw32G0LuQ8XKaueal1n9fzycrwwlPD9Iz8h8s4TYbHJngGfR 9t1RefikSf0oYhm35boxd3d1K78QBppyXd2OimC9utXNpHSyrMHFMfcLfuzTz9ndYLl9 LELSjhbGmQpuL7qnkGv77+qAG6XPvIM6OmDykP1JO/WVRyJ0fP4aqJW04plnhEkb78un mVnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=592d1ZuHzXITHjPuFb/XpT9ecoVcy1aDhYaYmkB2pFg=; b=L5x4KIdGatoPonkjKyjWrcR1j5i+nS5q0sKieIHINNz0I0d4l3qoTSkMnD/SUAqnL6 +0OCue774ZXzIqYZnUVTsfmHKMcx746w8TbDKkoou2+XM946RVEABTFL2VmW1Xiqa8wN RmzBPF2PKXrIu3rLgqTuH1Dx1AM2U0313OqePqGDY2/nFfpsaui3ZD09NsbItiK6MEkG wsTuyo2BDxZ7kiEKKVAhapWMTS9R1M/EyZnVQdh1OI202UJDjwTMG66xAO+ZsZKRaK7/ /SnqCBcq/a2mKci19TJW1ZYz9PwDExzvJFvhvAhk0FIIGCUxEsAvct+SmwOWgZKE6scN EvCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bgxQbXgk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w9-v6si17871257plp.389.2018.04.26.01.58.08; Thu, 26 Apr 2018 01:58:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bgxQbXgk; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755182AbeDZI4V (ORCPT + 99 others); Thu, 26 Apr 2018 04:56:21 -0400 Received: from mail-lf0-f67.google.com ([209.85.215.67]:33158 "EHLO mail-lf0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754625AbeDZIxV (ORCPT ); Thu, 26 Apr 2018 04:53:21 -0400 Received: by mail-lf0-f67.google.com with SMTP id m18-v6so12232188lfb.0 for ; Thu, 26 Apr 2018 01:53:20 -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:in-reply-to:references; bh=592d1ZuHzXITHjPuFb/XpT9ecoVcy1aDhYaYmkB2pFg=; b=bgxQbXgkUl9kjuonovDbW0cvR9tFPdjH+rJ9mmG3egXz0cf9O4lFiNqwqlqll4iF65 EQjE5ZX/Twj9lX5+ivfDIXkkl6OkrUEQLIhUgIEkDeUy9FcM1Wg98REY/x08AxmOIVbp zr15KMgEQkhZCqRg90WO94L+fZqa5lYPTWYus= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=592d1ZuHzXITHjPuFb/XpT9ecoVcy1aDhYaYmkB2pFg=; b=A5mPnUje+UFl+6xF6aO729Bklc31nNpkYRw/8bfqa7zxfeRVOkX/oUjyCCMvHIEA0a w9SqmToWia0wmETEq0zrzKpSvPwY27VCWpYol/BMF85SJWD4cP5XelqLA9K0+qjPu06Y tyClYA8wTYb+Bc8t5JjI45yX7gdfZiYHTUJ7fAGCwvkjG/ntbpkAC3tuCgBZtjE8hlVL 5Kqlh62cUD8J1R/4O2poMD4reSiFJDhMMXkulIkDpQOj9/56N3Xsws+z48Mk8SGpoTxv vgHvPy3v42ANljK2vHq3gLSpdTbV/Pk2bLgQluJlTyotIwzVLVwVFgz5ISCEx1oCR4e5 gwjQ== X-Gm-Message-State: ALQs6tDiNXdNpTe/tQAjkTUFmGGjTNBdIGNCFmuLTZgeeFcO4Xt+OaWf 20iyt1C+GnuElxF1Th5QxJhBvw== X-Received: by 2002:a19:5c05:: with SMTP id q5-v6mr15645875lfb.14.1524732799969; Thu, 26 Apr 2018 01:53:19 -0700 (PDT) Received: from localhost.localdomain (h-158-174-22-210.NA.cust.bahnhof.se. [158.174.22.210]) by smtp.gmail.com with ESMTPSA id u83-v6sm681097lff.65.2018.04.26.01.53.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 26 Apr 2018 01:53:19 -0700 (PDT) From: Ulf Hansson To: "Rafael J . Wysocki" , Greg Kroah-Hartman , linux-pm@vger.kernel.org Cc: Ulf Hansson , Kevin Hilman , Geert Uytterhoeven , Viresh Kumar , Vincent Guittot , Mark Brown , Vinod Koul , Sanyog Kale , Pierre-Louis Bossart , Wolfram Sang , Russell King , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH 03/11] PM / Domains: Drop redundant code in genpd while attaching devices Date: Thu, 26 Apr 2018 10:53:02 +0200 Message-Id: <1524732790-2234-4-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1524732790-2234-1-git-send-email-ulf.hansson@linaro.org> References: <1524732790-2234-1-git-send-email-ulf.hansson@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The driver core together with the PM core, nowadays deals with deferring all probes during the device system sleep phases. Therefore genpd no longer need to care about this situation, so let's drop the corresponding code. Signed-off-by: Ulf Hansson --- drivers/base/power/domain.c | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index d3703a1..d4b96ed 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c @@ -1377,7 +1377,7 @@ static int genpd_add_device(struct generic_pm_domain *genpd, struct device *dev, struct gpd_timing_data *td) { struct generic_pm_domain_data *gpd_data; - int ret = 0; + int ret; dev_dbg(dev, "%s()\n", __func__); @@ -1390,11 +1390,6 @@ static int genpd_add_device(struct generic_pm_domain *genpd, struct device *dev, genpd_lock(genpd); - if (genpd->prepared_count > 0) { - ret = -EAGAIN; - goto out; - } - ret = genpd->attach_dev ? genpd->attach_dev(genpd, dev) : 0; if (ret) goto out; @@ -2194,7 +2189,6 @@ int genpd_dev_pm_attach(struct device *dev) { struct of_phandle_args pd_args; struct generic_pm_domain *pd; - unsigned int i; int ret; if (!dev->of_node) @@ -2220,14 +2214,7 @@ int genpd_dev_pm_attach(struct device *dev) dev_dbg(dev, "adding to PM domain %s\n", pd->name); - for (i = 1; i < GENPD_RETRY_MAX_MS; i <<= 1) { - ret = genpd_add_device(pd, dev, NULL); - if (ret != -EAGAIN) - break; - - mdelay(i); - cond_resched(); - } + ret = genpd_add_device(pd, dev, NULL); mutex_unlock(&gpd_list_lock); if (ret < 0) { -- 2.7.4