mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 08:03:01 +09:00
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
81e1d9a395
commit
b97400912a
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user