linux-clk.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Boyd <sboyd@kernel.org>
To: Jeffrey Hugo <jhugo@codeaurora.org>,
	Michael Turquette <mturquette@baylibre.com>
Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
	Miquel Raynal <miquel.raynal@bootlin.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	Russell King <linux@armlinux.org.uk>,
	Chen-Yu Tsai <wens@csie.org>, Rob Herring <robh@kernel.org>
Subject: Re: [PATCH v3 3/7] clk: Add of_clk_hw_register() API for early clk drivers
Date: Wed, 10 Apr 2019 14:45:41 -0700	[thread overview]
Message-ID: <155493274113.20095.6283192313107751284@swboyd.mtv.corp.google.com> (raw)
In-Reply-To: <c529d12b-5212-7198-4f70-a3f771c0901f@codeaurora.org>

Quoting Jeffrey Hugo (2019-04-10 12:39:16)
> On 4/10/2019 10:53 AM, Stephen Boyd wrote:
> > Quoting Jeffrey Hugo (2019-04-08 14:46:11)
> >> On 4/4/2019 3:53 PM, Stephen Boyd wrote:
> >>> In some circumstances drivers register clks early and don't have access
> >>> to a struct device because the device model isn't initialized yet. Add
> >>> an API to let drivers register clks associated with a struct device_node
> >>> so that these drivers can participate in getting parent clks through DT.
> >>
> >> NACK.  This patch broke boot for me.  I had to pull the below from JTAG.
> >>    What do you need to debug this?
> >>
> > 
> > Here's a patch to try to squash in:
> 
> No dice.  Same issue.

Argh! dev_of_node() doesn't check for NULL device. :-/ I want to be
extremely lazy! Let's get this merged too. Thanks for the testing.

---8<---
diff --git a/include/linux/device.h b/include/linux/device.h
index b425a7ee04ce..0370dd0b3ae7 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -1231,7 +1231,7 @@ static inline void device_lock_assert(struct device *dev)
 
 static inline struct device_node *dev_of_node(struct device *dev)
 {
-	if (!IS_ENABLED(CONFIG_OF))
+	if (!IS_ENABLED(CONFIG_OF) || !dev)
 		return NULL;
 	return dev->of_node;
 }

  reply	other threads:[~2019-04-10 21:45 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-04 21:53 [PATCH v3 0/7] Rewrite clk parent handling Stephen Boyd
2019-04-04 21:53 ` [PATCH v3 1/7] clkdev: Hold clocks_mutex while iterating clocks list Stephen Boyd
2019-04-05  6:51   ` Vaittinen, Matti
2019-04-05 20:37     ` Stephen Boyd
2019-04-08 10:49       ` Matti Vaittinen
2019-04-08 17:00         ` Stephen Boyd
2019-04-08 22:21           ` Russell King - ARM Linux admin
2019-04-09  5:31             ` Vaittinen, Matti
2019-04-09  8:57               ` Russell King - ARM Linux admin
2019-04-10 16:45                 ` Stephen Boyd
2019-04-04 21:53 ` [PATCH v3 2/7] clk: Prepare for clk registration API that uses DT nodes Stephen Boyd
2019-04-04 21:53 ` [PATCH v3 3/7] clk: Add of_clk_hw_register() API for early clk drivers Stephen Boyd
2019-04-08 21:46   ` Jeffrey Hugo
2019-04-10 16:49     ` Stephen Boyd
2019-04-10 16:53     ` Stephen Boyd
2019-04-10 19:39       ` Jeffrey Hugo
2019-04-10 21:45         ` Stephen Boyd [this message]
2019-04-10 22:18           ` Jeffrey Hugo
2019-04-11 17:32             ` Jeffrey Hugo
2019-04-04 21:53 ` [PATCH v3 4/7] clk: Allow parents to be specified without string names Stephen Boyd
2019-04-04 21:53 ` [PATCH v3 5/7] clk: Look for parents with clkdev based clk_lookups Stephen Boyd
2019-04-04 21:53 ` [PATCH v3 6/7] clk: Allow parents to be specified via clkspec index Stephen Boyd
2019-04-04 21:53 ` [PATCH v3 7/7] clk: fixed-factor: Let clk framework find parent Stephen Boyd

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=155493274113.20095.6283192313107751284@swboyd.mtv.corp.google.com \
    --to=sboyd@kernel.org \
    --cc=jbrunet@baylibre.com \
    --cc=jhugo@codeaurora.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=miquel.raynal@bootlin.com \
    --cc=mturquette@baylibre.com \
    --cc=robh@kernel.org \
    --cc=wens@csie.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).