From patchwork Thu Apr 26 08:53:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 134426 Delivered-To: patches@linaro.org Received: by 10.46.151.6 with SMTP id r6csp1973308lji; Thu, 26 Apr 2018 01:53:20 -0700 (PDT) X-Received: by 2002:a19:cf89:: with SMTP id f131-v6mr15833468lfg.130.1524732800304; Thu, 26 Apr 2018 01:53:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524732800; cv=none; d=google.com; s=arc-20160816; b=DYZsQMLOmj36VtGSn+wa61AkSAZNmhjXdaT8I8tPXZ5lGvh1IPphN3BI7aWUG9XMLL oaTGB/x8Rj54Kc4F6M1ZA3QgKgFyfVhUuCcoRMcpUA94kGtg+GN0TkBpHmfdHGaooL7M O6Y2DJtYq8yof6ZzAWbln3QulqFsfRgpyRadqmk2Iwaow/gh6rn8WtV8AJfYFgW4pexh dNtfq92SehCrNo3VnAUw6IScSRQO+akANy9epEZbcRhi2EOWISZ0eo6NrEQo4l6b72vw h3/GEZYoO42O0X4HMJy1N5nSz4j4BMm+bmzmErur2MOy99h7fKB6umXbC/eNTVnea7Fh AlwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=592d1ZuHzXITHjPuFb/XpT9ecoVcy1aDhYaYmkB2pFg=; b=o6hdaPkcJepdrBmcQ+UBiHgYuij62syFSitPjKXLuU9ubDAgEkiQagrMDFVUUxy2Bg Yt0+9duK3Ltuo8iKuYiF/+IHIwiHAkx69j/Gl9KLcw9830jCgjNUJgvYK9iN31BqoSle KCkf91CMfkmxf6CgparKd+OWuTKBN5ebGYmrl4ojiZ1gkxuIXLIF2HEVUssnBFEUWErk Wu+TLQ3xFCoX3Dj8G/6nBxFiit4HBokGkxMDULJU0gXDmGAaA85kJTv0RJpee3RDNGHP TMvvAr4bNRzINCcwLNNtTmFJ6WcyHtHDUHdTtlxv06fQtME3R8edHc5Yb4fj0j7xlZTG 9qfg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bgxQbXgk; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id l67-v6sor3363602lfk.16.2018.04.26.01.53.20 for (Google Transport Security); Thu, 26 Apr 2018 01:53:20 -0700 (PDT) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bgxQbXgk; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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=a9cRsn1NNdMM4oiUnZWoMynlJ2cjy4VOgLRZpiYUGAVl4G4WuE8G7Ssn1XaUZ5KD4f 2q7BowZCh/BQNaErBdP4Cw7g8E2tmIbyIpGenZyEjaXjZe9P5n1QpqSUDaamqo8VyEIW 0xTAqjeCQT/RU31mZVSWA8lKQ1aKTHq8KP+v4AhuKTa6opybwQ/+4KDM3Raz0VKh5XXM UdFmchj+u7BfamLm7CVSmBQc9RzKSqEUZMcGR19HFsnOwMfcnG9cqzKspGcRsSXTjWTo qtAauuNEcToT/6oGGMmVYQT4ZDZG7yZbV85tvWJVpRiJ7mu195FqtHtUF1UeQeSqGd7V QjCQ== X-Gm-Message-State: ALQs6tBSEtgU9XSHtJZJuQ8iVhGEQB2ETjcEds1IGiDvmAJLesRzQh0D z1A9ozBqPh5OgO9XNBI2a71US7pc X-Google-Smtp-Source: AB8JxZpmEFysc1YWVrAwbCtS0RNgYGZBA9lukz8bbM5jIWBv95xCe8brHRdkbkBv4p+Eg3Rwv0BB6Q== X-Received: by 2002:a19:5c05:: with SMTP id q5-v6mr15645875lfb.14.1524732799969; Thu, 26 Apr 2018 01:53:19 -0700 (PDT) Return-Path: 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> 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(-) -- 2.7.4 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) {