Commit eea72d5fdf59879edb2c6639b0b7cc385e0df646
Committed by
David Woodhouse
1 parent
ee0e87b174
Exists in
master
and in
20 other branches
mtd: remove add_mtd_partitions, add_mtd_device and friends
These symbols are replaced with mtd_device_register() (and removal with mtd_device_unregister()) for public registration. Signed-off-by: Jamie Iles <jamie@jamieiles.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Showing 5 changed files with 9 additions and 17 deletions Side-by-side Diff
drivers/mtd/mtdcore.c
... | ... | @@ -393,7 +393,7 @@ |
393 | 393 | * if the requested device does not appear to be present in the list. |
394 | 394 | */ |
395 | 395 | |
396 | -int del_mtd_device (struct mtd_info *mtd) | |
396 | +int del_mtd_device(struct mtd_info *mtd) | |
397 | 397 | { |
398 | 398 | int ret; |
399 | 399 | struct mtd_notifier *not; |
... | ... | @@ -723,8 +723,6 @@ |
723 | 723 | return kmalloc(*size, GFP_KERNEL); |
724 | 724 | } |
725 | 725 | |
726 | -EXPORT_SYMBOL_GPL(add_mtd_device); | |
727 | -EXPORT_SYMBOL_GPL(del_mtd_device); | |
728 | 726 | EXPORT_SYMBOL_GPL(get_mtd_device); |
729 | 727 | EXPORT_SYMBOL_GPL(get_mtd_device_nm); |
730 | 728 | EXPORT_SYMBOL_GPL(__get_mtd_device); |
drivers/mtd/mtdcore.h
... | ... | @@ -10,6 +10,12 @@ |
10 | 10 | extern struct mutex mtd_table_mutex; |
11 | 11 | extern struct mtd_info *__mtd_next_device(int i); |
12 | 12 | |
13 | +extern int add_mtd_device(struct mtd_info *mtd); | |
14 | +extern int del_mtd_device(struct mtd_info *mtd); | |
15 | +extern int add_mtd_partitions(struct mtd_info *, const struct mtd_partition *, | |
16 | + int); | |
17 | +extern int del_mtd_partitions(struct mtd_info *); | |
18 | + | |
13 | 19 | #define mtd_for_each_device(mtd) \ |
14 | 20 | for ((mtd) = __mtd_next_device(0); \ |
15 | 21 | (mtd) != NULL; \ |
drivers/mtd/mtdpart.c
... | ... | @@ -31,6 +31,8 @@ |
31 | 31 | #include <linux/mtd/partitions.h> |
32 | 32 | #include <linux/err.h> |
33 | 33 | |
34 | +#include "mtdcore.h" | |
35 | + | |
34 | 36 | /* Our partition linked list */ |
35 | 37 | static LIST_HEAD(mtd_partitions); |
36 | 38 | static DEFINE_MUTEX(mtd_partitions_mutex); |
... | ... | @@ -376,7 +378,6 @@ |
376 | 378 | |
377 | 379 | return err; |
378 | 380 | } |
379 | -EXPORT_SYMBOL(del_mtd_partitions); | |
380 | 381 | |
381 | 382 | static struct mtd_part *allocate_partition(struct mtd_info *master, |
382 | 383 | const struct mtd_partition *part, int partno, |
... | ... | @@ -671,7 +672,6 @@ |
671 | 672 | |
672 | 673 | return 0; |
673 | 674 | } |
674 | -EXPORT_SYMBOL(add_mtd_partitions); | |
675 | 675 | |
676 | 676 | static DEFINE_SPINLOCK(part_parser_lock); |
677 | 677 | static LIST_HEAD(part_parsers); |
include/linux/mtd/mtd.h
... | ... | @@ -322,9 +322,6 @@ |
322 | 322 | |
323 | 323 | /* Kernel-side ioctl definitions */ |
324 | 324 | |
325 | -extern int add_mtd_device(struct mtd_info *mtd); | |
326 | -extern int del_mtd_device (struct mtd_info *mtd); | |
327 | - | |
328 | 325 | struct mtd_partition; |
329 | 326 | |
330 | 327 | extern int mtd_device_register(struct mtd_info *master, |
include/linux/mtd/partitions.h
... | ... | @@ -49,9 +49,6 @@ |
49 | 49 | |
50 | 50 | struct mtd_info; |
51 | 51 | |
52 | -int add_mtd_partitions(struct mtd_info *, const struct mtd_partition *, int); | |
53 | -int del_mtd_partitions(struct mtd_info *); | |
54 | - | |
55 | 52 | /* |
56 | 53 | * Functions dealing with the various ways of partitioning the space |
57 | 54 | */ |
... | ... | @@ -84,12 +81,6 @@ |
84 | 81 | { |
85 | 82 | return 0; |
86 | 83 | } |
87 | -#endif | |
88 | - | |
89 | -#ifdef CONFIG_MTD_PARTITIONS | |
90 | -static inline int mtd_has_partitions(void) { return 1; } | |
91 | -#else | |
92 | -static inline int mtd_has_partitions(void) { return 0; } | |
93 | 84 | #endif |
94 | 85 | |
95 | 86 | #ifdef CONFIG_MTD_CMDLINE_PARTS |