lkml.org 
[lkml]   [2019]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[RFC PATCH 39/57] drivers: mux: Use class_find_device_by_of_node helper
Date
Use the generic helper to find a device matching the of_node.

Cc: Peter Rosin <peda@axentia.se>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
drivers/mux/core.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/mux/core.c b/drivers/mux/core.c
index d1271c1..3591e40 100644
--- a/drivers/mux/core.c
+++ b/drivers/mux/core.c
@@ -405,18 +405,12 @@ int mux_control_deselect(struct mux_control *mux)
}
EXPORT_SYMBOL_GPL(mux_control_deselect);

-static int of_dev_node_match(struct device *dev, const void *data)
-{
- return dev->of_node == data;
-}
-
/* Note this function returns a reference to the mux_chip dev. */
static struct mux_chip *of_find_mux_chip_by_node(struct device_node *np)
{
struct device *dev;

- dev = class_find_device(&mux_class, NULL, np, of_dev_node_match);
-
+ dev = class_find_device_by_of_node(&mux_class, NULL, np);
return dev ? to_mux_chip(dev) : NULL;
}

--
2.7.4
\
 
 \ /
  Last update: 2019-06-03 17:52    [W:0.070 / U:1.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site