device_node_to_regmap is the current upstream API for this and is more general, because it allocates a regmap on demand if none exists. As of_node_to_regmap is unused anywhere, remove it. Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx> --- drivers/base/regmap/regmap.c | 20 -------------------- include/regmap.h | 1 - 2 files changed, 21 deletions(-) diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index ee5120fd7465..6613670263f6 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -132,26 +132,6 @@ struct regmap *dev_get_regmap(struct device_d *dev, const char *name) return ERR_PTR(-ENOENT); } -/* - * of_node_to_regmap - get a regmap from a device node - * - * node: The device node - * - * Returns a pointer to the regmap or a ERR_PTR if the node has no - * regmap attached. - */ -struct regmap *of_node_to_regmap(struct device_node *node) -{ - struct regmap *map; - - list_for_each_entry(map, ®maps, list) { - if (map->dev && map->dev->device_node == node) - return map; - } - - return ERR_PTR(-ENOENT); -} - /* * regmap_write - write a register in a map * diff --git a/include/regmap.h b/include/regmap.h index d950971b7d48..a34a9d2324c2 100644 --- a/include/regmap.h +++ b/include/regmap.h @@ -96,7 +96,6 @@ struct clk *regmap_mmio_detach_clk(struct regmap *map); void regmap_exit(struct regmap *map); struct regmap *dev_get_regmap(struct device_d *dev, const char *name); -struct regmap *of_node_to_regmap(struct device_node *node); int regmap_register_cdev(struct regmap *map, const char *name); -- 2.26.0.rc2 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox