From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 7/7] clk: qcom: Return error pointers for unimplemented clocks
Date: Fri, 16 May 2014 16:07:14 -0700 [thread overview]
Message-ID: <1400281634-9313-8-git-send-email-sboyd@codeaurora.org> (raw)
In-Reply-To: <1400281634-9313-1-git-send-email-sboyd@codeaurora.org>
Not all clocks are implemented but client drivers can still
request them. Currently we will return a NULL pointer to them if
the clock isn't implemented in software but NULL pointers are
valid clock pointers. Return an error pointer so that driver's
don't proceed without a clock they may actually need.
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
drivers/clk/qcom/common.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c
index 86b45fba5f90..9b5a1cfc6b91 100644
--- a/drivers/clk/qcom/common.c
+++ b/drivers/clk/qcom/common.c
@@ -62,8 +62,10 @@ int qcom_cc_probe(struct platform_device *pdev, const struct qcom_cc_desc *desc)
data->clk_num = num_clks;
for (i = 0; i < num_clks; i++) {
- if (!rclks[i])
+ if (!rclks[i]) {
+ clks[i] = ERR_PTR(-ENOENT);
continue;
+ }
clk = devm_clk_register_regmap(dev, rclks[i]);
if (IS_ERR(clk))
return PTR_ERR(clk);
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
hosted by The Linux Foundation
next prev parent reply other threads:[~2014-05-16 23:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-16 23:07 [PATCH 0/7] qcom clock updates Stephen Boyd
2014-05-16 23:07 ` [PATCH 1/7] clk: qcom: Fix clk_rcg2_is_enabled() check Stephen Boyd
2014-05-16 23:07 ` [PATCH 2/7] clk: qcom: Fix mmcc-8974's PLL configurations Stephen Boyd
2014-05-16 23:07 ` [PATCH 3/7] clk: qcom: Return highest rate when round_rate() exceeds plan Stephen Boyd
2014-05-16 23:07 ` [PATCH 4/7] clk: qcom: Support display RCG clocks Stephen Boyd
2014-05-16 23:07 ` [PATCH 5/7] clk: qcom: Properly support display clocks on msm8974 Stephen Boyd
2014-05-16 23:07 ` [PATCH 6/7] clk: qcom: Support msm8974pro global clock control hardware Stephen Boyd
2014-05-16 23:07 ` Stephen Boyd [this message]
2014-05-29 4:53 ` [PATCH 0/7] qcom clock updates Mike Turquette
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=1400281634-9313-8-git-send-email-sboyd@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).