]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mtd: drop of_mtd_parse_partitions()
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Sun, 29 May 2011 21:05:33 +0000 (01:05 +0400)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Sun, 11 Sep 2011 12:02:12 +0000 (15:02 +0300)
All users have been converted to call of_mtd_parse_partitions through
parse_mtd_partitions() multiplexer. Drop obsolete API.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
drivers/mtd/ofpart.c
include/linux/mtd/partitions.h

index 7c2c926e0bd7a6a9da8f73c704b08314de63f053..24007f3c2c2f9d212fe348d2da4cfacf9033d2f6 100644 (file)
@@ -24,20 +24,19 @@ static int parse_ofpart_partitions(struct mtd_info *master,
                                   struct mtd_partition **pparts,
                                   struct mtd_part_parser_data *data)
 {
-       if (!data || !data->of_node)
-               return 0;
-
-       return of_mtd_parse_partitions(NULL, data->of_node, pparts);
-}
-
-int of_mtd_parse_partitions(struct device *dev,
-                                      struct device_node *node,
-                                      struct mtd_partition **pparts)
-{
+       struct device_node *node;
        const char *partname;
        struct device_node *pp;
        int nr_parts, i;
 
+
+       if (!data)
+               return 0;
+
+       node = data->of_node;
+       if (!node)
+               return 0;
+
        /* First count the subnodes */
        pp = NULL;
        nr_parts = 0;
@@ -87,7 +86,6 @@ int of_mtd_parse_partitions(struct device *dev,
 
        return nr_parts;
 }
-EXPORT_SYMBOL(of_mtd_parse_partitions);
 
 static struct mtd_part_parser ofpart_parser = {
        .owner = THIS_MODULE,
index ec60fd14670c6e2057521a4e6c561ea7fb3e4682..a8a961a8c8ff76360430c4880f7c229c126556e0 100644 (file)
@@ -84,22 +84,6 @@ extern int parse_mtd_partitions(struct mtd_info *master, const char **types,
 
 #define put_partition_parser(p) do { module_put((p)->owner); } while(0)
 
-struct device;
-struct device_node;
-
-#ifdef CONFIG_MTD_OF_PARTS
-int of_mtd_parse_partitions(struct device *dev,
-                                      struct device_node *node,
-                                      struct mtd_partition **pparts);
-#else
-static inline int of_mtd_parse_partitions(struct device *dev,
-                                         struct device_node *node,
-                                         struct mtd_partition **pparts)
-{
-       return 0;
-}
-#endif
-
 int mtd_is_partition(struct mtd_info *mtd);
 int mtd_add_partition(struct mtd_info *master, char *name,
                      long long offset, long long length);