summaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorStephen Boyd2019-05-07 20:46:13 +0200
committerStephen Boyd2019-05-07 20:46:13 +0200
commitc1157f60d72e8b20efc670cef28883832f42406c (patch)
treee12b4aa8986f184cbf5a92a1816c210c23fdbbc9 /include/linux/device.h
parentMerge branch 'clk-ti' into clk-next (diff)
parentclk: Cache core in clk_fetch_parent_index() without names (diff)
downloadkernel-qcow2-linux-c1157f60d72e8b20efc670cef28883832f42406c.tar.gz
kernel-qcow2-linux-c1157f60d72e8b20efc670cef28883832f42406c.tar.xz
kernel-qcow2-linux-c1157f60d72e8b20efc670cef28883832f42406c.zip
Merge branch 'clk-parent-rewrite-1' into clk-next
- Rewrite how clk parents can be specified to be DT/clkdev based instead of just string based * clk-parent-rewrite-1: clk: Cache core in clk_fetch_parent_index() without names clk: fixed-factor: Initialize clk_init_data on stack clk: fixed-factor: Let clk framework find parent clk: Allow parents to be specified via clkspec index clk: Look for parents with clkdev based clk_lookups clk: Allow parents to be specified without string names clk: Add of_clk_hw_register() API for early clk drivers driver core: Let dev_of_node() accept a NULL dev clk: Prepare for clk registration API that uses DT nodes clkdev: Move clk creation outside of 'clocks_mutex'
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 4e6987e11f68..ad626df2e12e 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -1229,7 +1229,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;
}