From: Fabio Estevam <festevam@gmail.com>
To: mturquette@baylibre.com
Cc: sboyd@codeaurora.org, linux@arm.linux.org.uk,
linux-clk@vger.kernel.org, Fabio Estevam <fabio.estevam@nxp.com>
Subject: [PATCH] clk: gpio: Fix buggy merge
Date: Fri, 19 Feb 2016 15:29:16 -0200 [thread overview]
Message-ID: <1455902956-10016-1-git-send-email-festevam@gmail.com> (raw)
From: Fabio Estevam <fabio.estevam@nxp.com>
Clock maintainer mis-merged Russell King's commit 7ed88aa2efa54
("clk: fix clk-gpio.c with optional clock= DT property")
causing the gpio-gate-clock not to be registered.
Adjust the code, so that it looks like Russell's original submission.
With this fix in place, Wifi chip can be successfully probed on a
imx6q-cubox-i.
Suggested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
drivers/clk/clk-gpio.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/clk/clk-gpio.c b/drivers/clk/clk-gpio.c
index 19fed65..05cca92 100644
--- a/drivers/clk/clk-gpio.c
+++ b/drivers/clk/clk-gpio.c
@@ -287,15 +287,12 @@ static void __init of_gpio_clk_setup(struct device_node *node,
const char **parent_names;
int i, num_parents;
- num_parents = of_clk_get_parent_count(node);
- if (num_parents < 0)
- return;
-
data = kzalloc(sizeof(*data), GFP_KERNEL);
if (!data)
return;
- if (num_parents) {
+ num_parents = of_clk_get_parent_count(node);
+ if (num_parents > 0) {
parent_names = kcalloc(num_parents, sizeof(char *), GFP_KERNEL);
if (!parent_names) {
kfree(data);
--
1.9.1
reply other threads:[~2016-02-19 17:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1455902956-10016-1-git-send-email-festevam@gmail.com \
--to=festevam@gmail.com \
--cc=fabio.estevam@nxp.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--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 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).