Use the generic helper to find a device matching the of_node. Cc: Liam Girdwood <lgirdw...@gmail.com> Cc: Mark Brown <broo...@kernel.org> Signed-off-by: Suzuki K Poulose <suzuki.poul...@arm.com> --- drivers/regulator/of_regulator.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/regulator/of_regulator.c b/drivers/regulator/of_regulator.c index 0ead116..1485f6e 100644 --- a/drivers/regulator/of_regulator.c +++ b/drivers/regulator/of_regulator.c @@ -442,16 +442,11 @@ struct regulator_init_data *regulator_of_get_init_data(struct device *dev, 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(®ulator_class, NULL, np, of_node_match); + dev = class_find_device_by_of_node(®ulator_class, NULL, np); return dev ? dev_to_rdev(dev) : NULL; } -- 2.7.4