[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1559577023-558-8-git-send-email-suzuki.poulose@arm.com>
Date: Mon, 3 Jun 2019 16:49:33 +0100
From: Suzuki K Poulose <suzuki.poulose@....com>
To: linux-kernel@...r.kernel.org
Cc: gregkh@...uxfoundation.org, rafael@...nel.org,
suzuki.poulose@....com,
Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Subject: [RFC PATCH 07/57] drivers: nvmem: Use bus_find_device_by_of_node helper
Switch to using the bus_find_device_by_of_node helper
Cc: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@....com>
---
drivers/nvmem/core.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index c7892c3..63947d3 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -76,11 +76,6 @@ static struct bus_type nvmem_bus_type = {
.name = "nvmem",
};
-static int of_nvmem_match(struct device *dev, void *nvmem_np)
-{
- return dev->of_node == nvmem_np;
-}
-
static struct nvmem_device *of_nvmem_find(struct device_node *nvmem_np)
{
struct device *d;
@@ -88,7 +83,7 @@ static struct nvmem_device *of_nvmem_find(struct device_node *nvmem_np)
if (!nvmem_np)
return NULL;
- d = bus_find_device(&nvmem_bus_type, NULL, nvmem_np, of_nvmem_match);
+ d = bus_find_device_by_of_node(&nvmem_bus_type, NULL, nvmem_np);
if (!d)
return NULL;
--
2.7.4
Powered by blists - more mailing lists