@@ -385,21 +385,13 @@ struct slim_device *slim_get_device(struct slim_controller *ctrl,
}
EXPORT_SYMBOL_GPL(slim_get_device);
-static int of_slim_match_dev(struct device *dev, const void *data)
-{
- const struct device_node *np = data;
- struct slim_device *sbdev = to_slim_device(dev);
-
- return (sbdev->dev.of_node == np);
-}
-
static struct slim_device *of_find_slim_device(struct slim_controller *ctrl,
struct device_node *np)
{
struct slim_device *sbdev;
struct device *dev;
- dev = device_find_child(ctrl->dev, np, of_slim_match_dev);
+ dev = device_find_child(ctrl->dev, np, device_match_of_node);
if (dev) {
sbdev = to_slim_device(dev);
return sbdev;