Skip to content

Commit

Permalink
nvmem: core: Do not open-code existing functions
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Miquel Raynal authored and Greg Kroah-Hartman committed Aug 23, 2023
1 parent 81e1d9a commit b974009
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/nvmem/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit b974009

Please sign in to comment.