From patchwork Tue Feb 25 05:08:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 183811 Delivered-To: patches@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp1262897ile; Mon, 24 Feb 2020 21:08:45 -0800 (PST) X-Received: by 2002:a62:17c3:: with SMTP id 186mr55996777pfx.158.1582607325531; Mon, 24 Feb 2020 21:08:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582607325; cv=none; d=google.com; s=arc-20160816; b=ya5DA+tbYs+DsOsJ403PhP2ztNPPaLSlrF6efHWQdiaA1ow7jKA9yV7S4Xiu2HsYPN EUMeRBr2vvte4hS6H0DHmlC2xQ+XHbBzBijninyQR/zjEr7thRgQF9neEcflvAaoFk1t WlmRWN0+UxZ8Uwt1tptFZqQ765r/fTep751kea82jZQU5s2ezeGn18kZaQhwYimnxH0k 2xYGfjiax0f0p4WGnotGcodGft1KhWqrNpWu+AwOl3Y+yIMVr7uSIHv0GfXjvgQdkjrl nSUGzh92IN+mXyRsXc1J+MWHwqemmqw9F2vxKxEu02PG9I7IdwJ/4q27kYNRBDfgfn2r ygxQ== 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=UKu1DiH1aE4gWTyQt4rVDR13BTjgcFDoUNycgrJmwbg=; b=QEajcFV1SUfoECbrDDuKsD0JQ1rTGWX1kbdowzcsZx3OVoHh1YFV3U9z4GTnOzyMKN hn0bb9aRZIJOS45m/LCLj2buBuZlDxWtER3Mvn6LU0hiinRGxL4rDcu4VDfqdQV45YYz O8ORIxrRdHkJdDvxcQnISzdERsF1hKBXsU9NnE8a3PpAo1WINeFM7QQGMEEie5i+WjpJ LlaklC3u6iIipf7vZwWp1ZAw2iuO+07oSnnwBZmxwWvfhFDcCGp+MTSKSQN0pU1EUvhq b6ahX2cNyB9eLW0o6jr9F8Vrvz11mb+1y5jsFdqsiouoBr+rVl9KzDDqbvr8zD1L0i+4 653A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Cu6ZP2ZI; 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 z15sor16625135pfc.69.2020.02.24.21.08.45 for (Google Transport Security); Mon, 24 Feb 2020 21:08:45 -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=Cu6ZP2ZI; 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=UKu1DiH1aE4gWTyQt4rVDR13BTjgcFDoUNycgrJmwbg=; b=Cu6ZP2ZIv35GFagdY+/LcLqaOOw+CLP2oG+i36khDGnV8jZqR9+fcfjmtSi8rmir7L Jx1LaoZjn8k7/5orzjhIAxTgMTS++qpZ/WATeHeqfZ4jMF2TstYXaTiMIt63Hf5rFPkU HLBZsZV3viwEcdZFWD4uZ3ZgmCzB54Q6z++Xu2LdT8HN4JDEUwYeMU+o2G6oG5cftukM y7ej0sQ3QrmZg8WvRtkxYZ4OdyjLUJTBxEIivl+4yyyqBrytgZceKBvx4/TkxTvlIbFa dfRZhnCHnKcjjZePiKQqRzKAcc0sYa7DHxrLEP68JvuQDo+Me44fthyCMhq4WUVHAtib OSxg== 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=UKu1DiH1aE4gWTyQt4rVDR13BTjgcFDoUNycgrJmwbg=; b=Rwkfy/Ir5AtEuzRg2dfNlQ+HzHz5UjFMRTmJCsTOnHfJB3RRhXSGZ+2f6F+c3mq58F RVKyHqUusvEju7DNXc68sqMGvgWDOUH51Tq3aq8qlDtbDhyjyPityQkzFziQVrTKKIsY dXjaOPltv+S2cwxPPxcWcfJJ0vnN6WEr0bNAw00Yp+0v8HFuvgvQzwq/QyUBEcUCOomW uWfVq97vZIddb5PA/9DwGQDj+3lYvn6s66c74GTDtDbw/NZ5yeXywctVh/JsyOf0eiju sGOrNfIWdTXzkSMV3WiJbQI5m0ajt16kJPTcxQhoLU9XbdyORj4r/T6kpyEij4Eo3KU5 fP/A== X-Gm-Message-State: APjAAAXDGJp1WMXVmhZLcNm5a0HrIG9brBRwjyqPtfjldUn3PNqo5Ni2 8QYGsFtB4U8CAfR3BSVsj4DoXlU8 X-Google-Smtp-Source: APXvYqzJ+fEVi/wIlI9WBB1N7Ce1uB1pgPc8Gi+KC1Np/LBZigKmj6Z4U+C8cgQ72ykCwoffntxxsw== X-Received: by 2002:a62:5bc7:: with SMTP id p190mr53865844pfb.16.1582607325037; Mon, 24 Feb 2020 21:08:45 -0800 (PST) Return-Path: Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id r66sm15156450pfc.74.2020.02.24.21.08.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Feb 2020 21:08:44 -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 , Saravana Kannan , Bjorn Andersson , Liam Girdwood , Mark Brown , Thierry Reding , Linus Walleij , Greg Kroah-Hartman , linux-pm@vger.kernel.org Subject: [PATCH v5 3/6] pinctrl: Remove use of driver_deferred_probe_check_state_continue() Date: Tue, 25 Feb 2020 05:08:25 +0000 Message-Id: <20200225050828.56458-4-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200225050828.56458-1-john.stultz@linaro.org> References: <20200225050828.56458-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: Saravana Kannan 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 Acked-by: Linus Walleij Signed-off-by: John Stultz --- 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)) {