Merge branch 'regulator-5.4' into regulator-5.5
[linux-2.6-microblaze.git] / drivers / regulator / of_regulator.c
index ef7198b..87637eb 100644 (file)
@@ -471,16 +471,11 @@ error:
        return NULL;
 }
 
-static int of_node_match(struct device *dev, const void *data)
-{
-       return dev->of_node == data;
-}
-
 struct regulator_dev *of_find_regulator_by_node(struct device_node *np)
 {
        struct device *dev;
 
-       dev = class_find_device(&regulator_class, NULL, np, of_node_match);
+       dev = class_find_device_by_of_node(&regulator_class, np);
 
        return dev ? dev_to_rdev(dev) : NULL;
 }