X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Fmtd%2Fmap.h;h=278d0f30de20fa8e8c9902c525a3454e2167be2b;hb=9e1bf581d67d87a1d7fc0ea500729e3a03643a26;hp=a960be2cc33c7192c8e079419441984f868b40ba;hpb=8d40237c730b8be87c1b80a5d96b9c603fefa829;p=linux-2.6.git diff --git a/include/linux/mtd/map.h b/include/linux/mtd/map.h index a960be2cc..278d0f30d 100644 --- a/include/linux/mtd/map.h +++ b/include/linux/mtd/map.h @@ -1,6 +1,6 @@ /* Overhauled routines for dealing with different mmap regions of flash */ -/* $Id: map.h,v 1.45 2004/09/21 14:31:17 bjd Exp $ */ +/* $Id: map.h,v 1.43 2004/07/14 13:30:27 dwmw2 Exp $ */ #ifndef __LINUX_MTD_MAP_H__ #define __LINUX_MTD_MAP_H__ @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include @@ -56,11 +55,6 @@ #define map_bankwidth_is_4(map) (0) #endif -/* ensure we never evaluate anything shorted than an unsigned long - * to zero, and ensure we'll never miss the end of an comparison (bjd) */ - -#define map_calc_words(map) ((map_bankwidth(map) + (sizeof(unsigned long)-1))/ sizeof(unsigned long)) - #ifdef CONFIG_MTD_MAP_BANK_WIDTH_8 # ifdef map_bankwidth # undef map_bankwidth @@ -69,12 +63,12 @@ # undef map_bankwidth_is_large # define map_bankwidth_is_large(map) (map_bankwidth(map) > BITS_PER_LONG/8) # undef map_words -# define map_words(map) map_calc_words(map) +# define map_words(map) (map_bankwidth(map) / sizeof(unsigned long)) # endif # else # define map_bankwidth(map) 8 # define map_bankwidth_is_large(map) (BITS_PER_LONG < 64) -# define map_words(map) map_calc_words(map) +# define map_words(map) (map_bankwidth(map) / sizeof(unsigned long)) # endif #define map_bankwidth_is_8(map) (map_bankwidth(map) == 8) #undef MAX_MAP_BANKWIDTH @@ -90,11 +84,11 @@ # undef map_bankwidth_is_large # define map_bankwidth_is_large(map) (map_bankwidth(map) > BITS_PER_LONG/8) # undef map_words -# define map_words(map) map_calc_words(map) +# define map_words(map) (map_bankwidth(map) / sizeof(unsigned long)) # else # define map_bankwidth(map) 16 # define map_bankwidth_is_large(map) (1) -# define map_words(map) map_calc_words(map) +# define map_words(map) (map_bankwidth(map) / sizeof(unsigned long)) # endif #define map_bankwidth_is_16(map) (map_bankwidth(map) == 16) #undef MAX_MAP_BANKWIDTH @@ -110,11 +104,11 @@ # undef map_bankwidth_is_large # define map_bankwidth_is_large(map) (map_bankwidth(map) > BITS_PER_LONG/8) # undef map_words -# define map_words(map) map_calc_words(map) +# define map_words(map) (map_bankwidth(map) / sizeof(unsigned long)) # else # define map_bankwidth(map) 32 # define map_bankwidth_is_large(map) (1) -# define map_words(map) map_calc_words(map) +# define map_words(map) (map_bankwidth(map) / sizeof(unsigned long)) # endif #define map_bankwidth_is_32(map) (map_bankwidth(map) == 32) #undef MAX_MAP_BANKWIDTH