[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230823132744.350618-22-srinivas.kandagatla@linaro.org>
Date: Wed, 23 Aug 2023 14:27:43 +0100
From: srinivas.kandagatla@...aro.org
To: gregkh@...uxfoundation.org
Cc: linux-kernel@...r.kernel.org,
Miquel Raynal <miquel.raynal@...tlin.com>,
Michael Walle <michael@...le.cc>,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Subject: [PATCH v2 21/22] nvmem: core: Do not open-code existing functions
From: Miquel Raynal <miquel.raynal@...tlin.com>
Use of_nvmem_layout_get_container() instead of hardcoding it.
Signed-off-by: Miquel Raynal <miquel.raynal@...tlin.com>
Reviewed-by: Michael Walle <michael@...le.cc>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
---
drivers/nvmem/core.c | 4 ++--
1 file 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;
--
2.25.1
Powered by blists - more mailing lists