diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-04-22 09:07:34 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-04-22 09:25:33 +0200 |
commit | 66cd90abe728418afdd01c52502781021748e3e6 (patch) | |
tree | 51f710f10ad6f198928f1fc4ac5ddfaf705a4c51 /include | |
parent | 812dc942d537011c00370215294324ca30cd37e5 (diff) | |
download | barebox-66cd90abe728418afdd01c52502781021748e3e6.tar.gz barebox-66cd90abe728418afdd01c52502781021748e3e6.tar.xz |
of: partitions: pass struct cdev as argument
pass a struct cdev instead of the cdev name to of_parse_partitions.
This is available to the caller anyway and makes it easier to use
additional stuff from the cdev (like knowing whether it's a mtd
device).
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/of.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/of.h b/include/of.h index 9349e6a30a..4dcf37e140 100644 --- a/include/of.h +++ b/include/of.h @@ -170,9 +170,10 @@ struct device_node *of_create_node(struct device_node *root, const char *path); struct device_node *of_get_root_node(void); int of_set_root_node(struct device_node *); +struct cdev; + #ifdef CONFIG_OFTREE -int of_parse_partitions(const char *cdevname, - struct device_node *node); +int of_parse_partitions(struct cdev *cdev, struct device_node *node); int of_alias_get_id(struct device_node *np, const char *stem); int of_device_is_stdout_path(struct device_d *dev); @@ -180,7 +181,7 @@ const char *of_get_model(void); void *of_flatten_dtb(struct device_node *node); int of_add_memory(struct device_node *node, bool dump); #else -static inline int of_parse_partitions(const char *cdevname, +static inline int of_parse_partitions(struct cdev *cdev, struct device_node *node) { return -EINVAL; |