[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <155493274113.20095.6283192313107751284@swboyd.mtv.corp.google.com>
Date: Wed, 10 Apr 2019 14:45:41 -0700
From: Stephen Boyd <sboyd@...nel.org>
To: Jeffrey Hugo <jhugo@...eaurora.org>,
Michael Turquette <mturquette@...libre.com>
Cc: linux-kernel@...r.kernel.org, linux-clk@...r.kernel.org,
Miquel Raynal <miquel.raynal@...tlin.com>,
Jerome Brunet <jbrunet@...libre.com>,
Russell King <linux@...linux.org.uk>,
Chen-Yu Tsai <wens@...e.org>, Rob Herring <robh@...nel.org>
Subject: Re: [PATCH v3 3/7] clk: Add of_clk_hw_register() API for early clk drivers
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;
}
Powered by blists - more mailing lists