From patchwork Tue Jul 19 09:21:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 72281 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp570108qga; Tue, 19 Jul 2016 02:20:40 -0700 (PDT) X-Received: by 10.66.62.226 with SMTP id b2mr63530618pas.119.1468920033126; Tue, 19 Jul 2016 02:20:33 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x76si8510825pfd.200.2016.07.19.02.20.32; Tue, 19 Jul 2016 02:20:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753366AbcGSJU3 (ORCPT + 29 others); Tue, 19 Jul 2016 05:20:29 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:51262 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753104AbcGSJUR (ORCPT ); Tue, 19 Jul 2016 05:20:17 -0400 Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id u6J9JqMi000550; Tue, 19 Jul 2016 18:19:56 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com u6J9JqMi000550 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1468919996; bh=M74esWkA+Bh1yZEWxgr1CQ62rh1YtiR66k3Xac6gBOk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=w6riNejGfC/k3RQmpCQAaP3qxeLH/vAYO4jotfRE2FJWwVuukzPc2DtLag7W9QTVT BsXItX2shT14RTMPqF8sFdxBZsf7Faz8Dhu8x+xPnrciX7ceYf9slv42j6chDhYEnH ZXppARiUBz99FCyX47bs8ksbTjlbwyjQDBpcSs9PpviuoVD4isnPrkxzIiVSd4jnYq r4x5gaAXkTY/onKMOfeL/KALB6FQE38WVIxAE3+cANSk2Lp6AlkNNiKMCZDrdCu4gD TLmdy/5cl5nCPtZkQT3cyJ5EgsjLfcbY1H8JFUvMwpFAECg36L2U235CL2D/caLlKL fQvF6+lYJQ/LQ== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-clk@vger.kernel.org Cc: Masahiro Yamada , Stephen Boyd , Michael Turquette , 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 Message-Id: <1468920098-8553-6-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1468920098-8553-1-git-send-email-yamada.masahiro@socionext.com> References: <1468920098-8553-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/clk/clk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.9.1 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);