All of lore.kernel.org
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: linux-clk@vger.kernel.org
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Michael Turquette <mturquette@baylibre.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 5/5] clk: return -EINVAL if clock provider has no .get callback
Date: Tue, 19 Jul 2016 18:21:38 +0900	[thread overview]
Message-ID: <1468920098-8553-6-git-send-email-yamada.masahiro@socionext.com> (raw)
In-Reply-To: <1468920098-8553-1-git-send-email-yamada.masahiro@socionext.com>

Currently, __of_clk_get_hw_from_provider() returns -EPROBE_DEFER
if neither .get_hw nor .get is registered for the given provider.
This means of_clk_add(_hw)_provider() has been already called for
the node in a wrong way; it is not deferred probing at all.  EINVAL
is a better fit for the case.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 drivers/clk/clk.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 2207098..3004388 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -3136,7 +3136,7 @@ __of_clk_get_hw_from_provider(struct of_clk_provider *provider,
 			      struct of_phandle_args *clkspec)
 {
 	struct clk *clk;
-	struct clk_hw *hw = ERR_PTR(-EPROBE_DEFER);
+	struct clk_hw *hw = ERR_PTR(-EINVAL);
 
 	if (provider->get_hw) {
 		hw = provider->get_hw(clkspec, provider->data);
-- 
1.9.1

      parent reply	other threads:[~2016-07-19  9:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-19  9:21 [PATCH 0/5] clk: forbit multiple adding of clock providers and fix false positive EPROBE_DEFER Masahiro Yamada
2016-07-19  9:21 ` [PATCH 1/5] clk: add a helper function __of_clk_find_provider() Masahiro Yamada
2016-07-19  9:21 ` [PATCH 2/5] clk: avoid adding clock provider multiple times for one node Masahiro Yamada
2016-07-19  9:21 ` [PATCH 3/5] clk: refactor of_clk_del_provider() Masahiro Yamada
2016-07-19  9:21 ` [PATCH 4/5] clk: fix false positive EPROBE_DEFER of __of_clk_get_hw_from_provider() Masahiro Yamada
2016-07-19  9:21 ` Masahiro Yamada [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1468920098-8553-6-git-send-email-yamada.masahiro@socionext.com \
    --to=yamada.masahiro@socionext.com \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=sboyd@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.