[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200225050828.56458-4-john.stultz@linaro.org>
Date: Tue, 25 Feb 2020 05:08:25 +0000
From: John Stultz <john.stultz@...aro.org>
To: lkml <linux-kernel@...r.kernel.org>
Cc: John Stultz <john.stultz@...aro.org>,
Rob Herring <robh@...nel.org>,
"Rafael J. Wysocki" <rjw@...ysocki.net>,
Kevin Hilman <khilman@...nel.org>,
Ulf Hansson <ulf.hansson@...aro.org>,
Pavel Machek <pavel@....cz>, Len Brown <len.brown@...el.com>,
Todd Kjos <tkjos@...gle.com>,
Saravana Kannan <saravanak@...gle.com>,
Bjorn Andersson <bjorn.andersson@...aro.org>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Thierry Reding <treding@...dia.com>,
Linus Walleij <linus.walleij@...aro.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-pm@...r.kernel.org
Subject: [PATCH v5 3/6] pinctrl: Remove use of driver_deferred_probe_check_state_continue()
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 <robh@...nel.org>
Cc: "Rafael J. Wysocki" <rjw@...ysocki.net>
Cc: Kevin Hilman <khilman@...nel.org>
Cc: Ulf Hansson <ulf.hansson@...aro.org>
Cc: Pavel Machek <pavel@....cz>
Cc: Len Brown <len.brown@...el.com>
Cc: Todd Kjos <tkjos@...gle.com>
Cc: Saravana Kannan <saravanak@...gle.com>
Cc: Bjorn Andersson <bjorn.andersson@...aro.org>
Cc: Liam Girdwood <lgirdwood@...il.com>
Cc: Mark Brown <broonie@...nel.org>
Cc: Thierry Reding <treding@...dia.com>
Cc: Linus Walleij <linus.walleij@...aro.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-pm@...r.kernel.org
Acked-by: Linus Walleij <linus.walleij@...aro.org>
Signed-off-by: John Stultz <john.stultz@...aro.org>
---
drivers/pinctrl/devicetree.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
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)) {
--
2.17.1
Powered by blists - more mailing lists