projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
81e1d9a
)
nvmem: core: Do not open-code existing functions
author
Miquel Raynal
<miquel.raynal@bootlin.com>
Wed, 23 Aug 2023 13:27:43 +0000
(14:27 +0100)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Wed, 23 Aug 2023 14:34:02 +0000
(16:34 +0200)
Use of_nvmem_layout_get_container() instead of hardcoding it.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Michael Walle <michael@walle.cc>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link:
https://lore.kernel.org/r/20230823132744.350618-22-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvmem/core.c
patch
|
blob
|
history
diff --git
a/drivers/nvmem/core.c
b/drivers/nvmem/core.c
index
bc7ea00
..
12d05ae
100644
(file)
--- a/
drivers/nvmem/core.c
+++ b/
drivers/nvmem/core.c
@@
-785,10
+785,10
@@
EXPORT_SYMBOL_GPL(nvmem_layout_unregister);
static struct nvmem_layout *nvmem_layout_get(struct nvmem_device *nvmem)
{
- struct device_node *layout_np
, *np = nvmem->dev.of_node
;
+ struct device_node *layout_np;
struct nvmem_layout *l, *layout = ERR_PTR(-EPROBE_DEFER);
- layout_np = of_
get_child_by_name(np, "nvmem-layout"
);
+ layout_np = of_
nvmem_layout_get_container(nvmem
);
if (!layout_np)
return NULL;