diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-09-06 04:40:21 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2007-09-06 04:40:21 -0400 |
commit | 241651d04d672fb685b2874707016cbbf95931e5 (patch) | |
tree | 6432d3ef181b83afc6c4f54d8ea0876367547348 /include/linux/mtd/map.h | |
parent | d15057b7034d9fdc4259b66a0367c9d8ffcf0620 (diff) |
[MTD] Fix CFI build error when no map width or interleave supported
When building NOR flash support, you have compile-time options for the
bus width and the number of individual chips which are interleaved
together onto that bus. The code to deal with arbitrary geometry is a
bit convoluted, and people want to just configure it for the specific
hardware they have, to avoid the runtime overhead.
Selecting _none_ of the available options doesn't make any sense. You
should have at least one. This makes it build though, since people
persist in trying.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'include/linux/mtd/map.h')
-rw-r--r-- | include/linux/mtd/map.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h index 81f3a314dd76..a9fae032ba81 100644 --- a/include/linux/mtd/map.h +++ b/include/linux/mtd/map.h | |||
@@ -125,7 +125,15 @@ | |||
125 | #endif | 125 | #endif |
126 | 126 | ||
127 | #ifndef map_bankwidth | 127 | #ifndef map_bankwidth |
128 | #error "No bus width supported. What's the point?" | 128 | #warning "No CONFIG_MTD_MAP_BANK_WIDTH_xx selected. No NOR chip support can work" |
129 | static inline int map_bankwidth(void *map) | ||
130 | { | ||
131 | BUG(); | ||
132 | return 0; | ||
133 | } | ||
134 | #define map_bankwidth_is_large(map) (0) | ||
135 | #define map_words(map) (0) | ||
136 | #define MAX_MAP_BANKWIDTH 1 | ||
129 | #endif | 137 | #endif |
130 | 138 | ||
131 | static inline int map_bankwidth_supported(int w) | 139 | static inline int map_bankwidth_supported(int w) |