projects
/
platform
/
kernel
/
linux-starfive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nvmem: Do not expect fixed layouts to grab a layout driver
[platform/kernel/linux-starfive.git]
/
drivers
/
nvmem
/
core.c
diff --git
a/drivers/nvmem/core.c
b/drivers/nvmem/core.c
index
eaf6a3f
..
5b3955a
100644
(file)
--- a/
drivers/nvmem/core.c
+++ b/
drivers/nvmem/core.c
@@
-796,6
+796,12
@@
static struct nvmem_layout *nvmem_layout_get(struct nvmem_device *nvmem)
if (!layout_np)
return NULL;
if (!layout_np)
return NULL;
+ /* Fixed layouts don't have a matching driver */
+ if (of_device_is_compatible(layout_np, "fixed-layout")) {
+ of_node_put(layout_np);
+ return NULL;
+ }
+
/*
* In case the nvmem device was built-in while the layout was built as a
* module, we shall manually request the layout driver loading otherwise
/*
* In case the nvmem device was built-in while the layout was built as a
* module, we shall manually request the layout driver loading otherwise