diff options
author | Miquel Raynal <miquel.raynal@bootlin.com> | 2023-08-23 14:27:43 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-08-23 16:34:02 +0200 |
commit | b97400912a08dae6c1c1779a05157f2ab0180f4f (patch) | |
tree | ddc5ec3a60b354fe11c4dcb3f44eb822d9364ed2 /drivers/nvmem | |
parent | 81e1d9a39569d315f747c2af19ce502cd08645ed (diff) |
nvmem: core: Do not open-code existing functions
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>
Diffstat (limited to 'drivers/nvmem')
-rw-r--r-- | drivers/nvmem/core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c index bc7ea001a446..12d05aea0b41 100644 --- 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; |