From 885a1cf27e6ae7a39113dd6c707d400c1585b35c Mon Sep 17 00:00:00 2001 From: Marc Kleine-Budde Date: Wed, 22 Apr 2015 10:20:12 +0200 Subject: of_path: of_find_path(): add possibility to return .bb device This patch adds a flags argument to the of_find_path() function. The only flag defined for now is OF_FIND_PATH_FLAGS_BB. When used on NAND devices, the function returns the bad block aware device (the ".bb" device). Signed-off-by: Marc Kleine-Budde Signed-off-by: Sascha Hauer --- include/of.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/of.h') diff --git a/include/of.h b/include/of.h index 7235138f30..2dcb613a77 100644 --- a/include/of.h +++ b/include/of.h @@ -240,7 +240,8 @@ int of_add_memory(struct device_node *node, bool dump); void of_add_memory_bank(struct device_node *node, bool dump, int r, u64 base, u64 size); struct device_d *of_find_device_by_node_path(const char *path); -int of_find_path(struct device_node *node, const char *propname, char **outpath); +#define OF_FIND_PATH_FLAGS_BB 1 /* return .bb device if available */ +int of_find_path(struct device_node *node, const char *propname, char **outpath, unsigned flags); int of_register_fixup(int (*fixup)(struct device_node *, void *), void *context); struct device_node *of_find_node_by_alias(struct device_node *root, const char *alias); -- cgit v1.2.3