diff options
author | David Brownell <dbrownell@users.sourceforge.net> | 2009-03-04 15:01:41 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-03-20 09:16:44 -0400 |
commit | a4b6d516a6079c6ba8dc97d185371439035a35d0 (patch) | |
tree | b53616a18b80d9d35a865ece4d4e3711c8dea074 /drivers/mtd/nand | |
parent | 7ed8c7d440d497913a2218831a67b5897e0e86e1 (diff) |
[MTD] partitioning utility predicates
Move mtd_has_partitions() and mtd_has_cmdlinepart() inlines from a
DaVinci-specific driver to the <linux/mtd/partitions.h> header.
Use those to eliminate #ifdefs in two drivers which had their own
definitions of mtd_has_partitions().
Quite a lot of other MTD drivers could benefit from using use one or both
of these to remove #ifdeffery. Maybe some Janitors would like to help.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r-- | drivers/mtd/nand/davinci_nand.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c index 4034ac945041..81f7ecd23c60 100644 --- a/drivers/mtd/nand/davinci_nand.c +++ b/drivers/mtd/nand/davinci_nand.c | |||
@@ -38,19 +38,6 @@ | |||
38 | #include <asm/mach-types.h> | 38 | #include <asm/mach-types.h> |
39 | 39 | ||
40 | 40 | ||
41 | #ifdef CONFIG_MTD_PARTITIONS | ||
42 | static inline int mtd_has_partitions(void) { return 1; } | ||
43 | #else | ||
44 | static inline int mtd_has_partitions(void) { return 0; } | ||
45 | #endif | ||
46 | |||
47 | #ifdef CONFIG_MTD_CMDLINE_PARTS | ||
48 | static inline int mtd_has_cmdlinepart(void) { return 1; } | ||
49 | #else | ||
50 | static inline int mtd_has_cmdlinepart(void) { return 0; } | ||
51 | #endif | ||
52 | |||
53 | |||
54 | /* | 41 | /* |
55 | * This is a device driver for the NAND flash controller found on the | 42 | * This is a device driver for the NAND flash controller found on the |
56 | * various DaVinci family chips. It handles up to four SoC chipselects, | 43 | * various DaVinci family chips. It handles up to four SoC chipselects, |