Merge tag 'regulator-fix-v5.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git...
[sfrench/cifs-2.6.git] / drivers / regulator / of_regulator.c
index ef7198b76e50d3fe9f1bd8691553e20571edb7a2..87637eb6bcbcb9ce2e50278f21bb5dfae315d004 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;
 }