diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-09-06 09:40:21 +0100 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2007-09-06 09:40:21 +0100 |
commit | 241651d04d672fb685b2874707016cbbf95931e5 (patch) | |
tree | 6432d3ef181b83afc6c4f54d8ea0876367547348 /include/linux/mtd/cfi.h | |
parent | d15057b7034d9fdc4259b66a0367c9d8ffcf0620 (diff) | |
download | linux-stable-241651d04d672fb685b2874707016cbbf95931e5.tar.gz linux-stable-241651d04d672fb685b2874707016cbbf95931e5.tar.bz2 linux-stable-241651d04d672fb685b2874707016cbbf95931e5.zip |
[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/cfi.h')
-rw-r--r-- | include/linux/mtd/cfi.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/mtd/cfi.h b/include/linux/mtd/cfi.h index 123948b14547..e17c5343cf51 100644 --- a/include/linux/mtd/cfi.h +++ b/include/linux/mtd/cfi.h @@ -57,6 +57,15 @@ #define cfi_interleave_is_8(cfi) (0) #endif +#ifndef cfi_interleave +#warning No CONFIG_MTD_CFI_Ix selected. No NOR chip support can work. +static inline int cfi_interleave(void *cfi) +{ + BUG(); + return 0; +} +#endif + static inline int cfi_interleave_supported(int i) { switch (i) { |