From patchwork Thu Feb 20 05:04:37 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 183653 Delivered-To: patches@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp140978ile; Wed, 19 Feb 2020 21:05:05 -0800 (PST) X-Received: by 2002:a17:90a:c592:: with SMTP id l18mr1423733pjt.105.1582175105269; Wed, 19 Feb 2020 21:05:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582175105; cv=none; d=google.com; s=arc-20160816; b=ZGOVLCPb/0T0jgpB/GzUnefBWbKC7Ap8Ain9SLKxusyPpuT9pfv2owawHZZxsM5hpb jRDqYjO3qKO9kw+nUqIT/MUc4EsaXxXOrdUzEp/9CZ0mZPGG1ZwqJi59Vm4b/SbtTyOA emdfaeq9tu1HP1PyFkdaRmUKQVSD6rsS6vaqM2bnHbH5Fp47tdl4GIcJUdOklBFe4qcH 11cS08xQ6seLDJmeX+Zrifg6kFM+uifpttLKmWzlK8NAqbq50wrIpZKQi6gSS7f5WQRT ASchUCKgdq8++I2Ck/KXH+44hgUNXwF0aYQxSaXgqjl9ACmQi+SqwohEsXjs7NHFEvXw 4XRg== 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; bh=wOHv+QxDznql2h/B9QPBonJ8+Ax46oQhAeGgxF/JNeY=; b=IiJ0O9qzHF0oAC2T9UP/u+H0OuW4cfetKspSOhU2Zk2+v61fwqtkjYqcRhxAKSFaD/ cOjR0CJ+7C+LntR0plxTAsr1aUtghV9fhPTnl4Oyufy1ONv8aAG0aLB8HG6/UaZ0nhVu esNGFQS7ekRG45dGBnlTADZYJFwytqyff5HSmBmLYU8wXbzn3GllZu697HyEe821yxHl QbDI/iLGXWmcKPH1AHHIZiOilHEArPnbPijyaiXdl6XeKTBqaJa2gqGOjl665LZBLZ2d nXpx/1Miis7dEeUdwGK41BzhL1HlWdhg7AxI2ROKiTrsgrCAE4RwMInaS6sXcEACjF9u 7d3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LH5XyaX9; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@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 w62sor1957068pfc.68.2020.02.19.21.05.05 for (Google Transport Security); Wed, 19 Feb 2020 21:05:05 -0800 (PST) Received-SPF: pass (google.com: domain of john.stultz@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=LH5XyaX9; spf=pass (google.com: domain of john.stultz@linaro.org designates 209.85.220.65 as permitted sender) smtp.mailfrom=john.stultz@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=wOHv+QxDznql2h/B9QPBonJ8+Ax46oQhAeGgxF/JNeY=; b=LH5XyaX9GkiXyqpCmh8o/RmVlUzm/wMIM4fbcM8puY7zZs3tkeCMoWyQvz1qRH9rB4 i+GNjONvTcEEgSua8Qg0qqz+ExgOjFXX0Zz280K+I6tcAeU2WJazEtGW2fESRdpvRMo0 SJquQgprFLgJJuJkbwYI06B7EzImZphVYtWdVcjSnGXh0xGPCyrnYzrOGJmYtS507qjq nmlxqkwq6rJCyydRmqB3PaFDprIyfqwvuK+REsrevHVvba+3784IwzSHng/r1IMUu+CH 8CRYOzTUlXmR8o9JOtoGocZDJEzk5+a7ipJP43AYUpOJlHCLgVBmw4ibGtoGvcMIsAjV peUA== 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=wOHv+QxDznql2h/B9QPBonJ8+Ax46oQhAeGgxF/JNeY=; b=Gp6gv/9nkAyLSFKLIqlCS1zLiGhGd8T2mhYSwgbqcQfIz8PMQUbPH8HSoz37FZUw+Y fjuXTozWpUoyL0z+xX+Fs2MqnkUCEO1WYIrVJ0anBDHv22ll0VR7izT1S+ww6acTK0vA bzqczrVyUaa1qLJFih1TAToy+6c6QFutSipfGX7bIiuRuNB/+70ac57vDXjTm8jzR/Qo zWEuT35LmEIIPuVnAla3SW6d00R1jUVlsLgujMwvBszINhTm359rfw/m1fKPjrEoG9ff m5ds6vAm0aREx+eGy274MYOqjL0w0VgS/Ct2FzPeubQcNjnbDckCkGpTno9HQHNQZeEd GP+A== X-Gm-Message-State: APjAAAVzxZeZmFwP762FP+0+EdYhZ4KYShvbo7GVjc0jxK711BVd6UAh bxIxSHfEzMu59A8H+rd35td/rrek X-Google-Smtp-Source: APXvYqzDQ6HAmjnhvjQifECUMimuCSlgupkPtgBhcHq5XHZ8TdmewbwVVAsZffG/RJMKQi2upxnz0A== X-Received: by 2002:aa7:9aa5:: with SMTP id x5mr30831744pfi.131.1582175104812; Wed, 19 Feb 2020 21:05:04 -0800 (PST) Return-Path: Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id z4sm1400847pfn.42.2020.02.19.21.05.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Feb 2020 21:05:04 -0800 (PST) From: John Stultz To: lkml Cc: John Stultz , Rob Herring , "Rafael J. Wysocki" , Kevin Hilman , Ulf Hansson , Pavel Machek , Len Brown , Todd Kjos , Bjorn Andersson , Liam Girdwood , Mark Brown , Thierry Reding , Linus Walleij , Greg Kroah-Hartman , linux-pm@vger.kernel.org Subject: [PATCH v4 3/6] pinctrl: Remove use of driver_deferred_probe_check_state_continue() Date: Thu, 20 Feb 2020 05:04:37 +0000 Message-Id: <20200220050440.45878-4-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200220050440.45878-1-john.stultz@linaro.org> References: <20200220050440.45878-1-john.stultz@linaro.org> With the earlier sanity fixes to driver_deferred_probe_check_state() it should be usable for the pinctrl logic here. So tweak the logic to use driver_deferred_probe_check_state() instead of driver_deferred_probe_check_state_continue() Cc: Rob Herring Cc: "Rafael J. Wysocki" Cc: Kevin Hilman Cc: Ulf Hansson Cc: Pavel Machek Cc: Len Brown Cc: Todd Kjos Cc: Bjorn Andersson Cc: Liam Girdwood Cc: Mark Brown Cc: Thierry Reding Cc: Linus Walleij Cc: Greg Kroah-Hartman Cc: linux-pm@vger.kernel.org Signed-off-by: John Stultz Change-Id: If72682e0a7641b33edf56f188fc067c68bbc571e --- drivers/pinctrl/devicetree.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) -- 2.17.1 diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c index 9357f7c46cf3..1ed20ac2243f 100644 --- a/drivers/pinctrl/devicetree.c +++ b/drivers/pinctrl/devicetree.c @@ -127,11 +127,12 @@ static int dt_to_map_one_config(struct pinctrl *p, np_pctldev = of_get_next_parent(np_pctldev); if (!np_pctldev || of_node_is_root(np_pctldev)) { of_node_put(np_pctldev); + ret = driver_deferred_probe_check_state(p->dev); /* keep deferring if modules are enabled unless we've timed out */ - if (IS_ENABLED(CONFIG_MODULES) && !allow_default) - return driver_deferred_probe_check_state_continue(p->dev); - - return driver_deferred_probe_check_state(p->dev); + if (IS_ENABLED(CONFIG_MODULES) && !allow_default && + (ret == -ENODEV)) + ret = -EPROBE_DEFER; + return ret; } /* If we're creating a hog we can use the passed pctldev */ if (hog_pctldev && (np_pctldev == p->dev->of_node)) {