diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2009-12-16 13:36:10 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2009-12-16 13:36:10 +1100 |
commit | 65490f513d336f8171bec59f77137cdfff536be1 (patch) | |
tree | a8fae6318a664ba7bf561de351f0c57131f450be /drivers/mtd/nand/alauda.c | |
parent | 0bc51a0a56d793afbddf37057a135cfd061d11ee (diff) | |
parent | caf0e8e028516253afce6e40c52f0c193a221f8a (diff) |
Merge remote branch 'mtd/master'
Conflicts:
drivers/mtd/devices/m25p80.c
drivers/mtd/maps/pcmciamtd.c
drivers/mtd/nand/excite_nandflash.c
drivers/mtd/nand/pxa3xx_nand.c
kernel/printk.c
Diffstat (limited to 'drivers/mtd/nand/alauda.c')
-rw-r--r-- | drivers/mtd/nand/alauda.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/mtd/nand/alauda.c b/drivers/mtd/nand/alauda.c index 6d9649159a18..2d6773281fd9 100644 --- a/drivers/mtd/nand/alauda.c +++ b/drivers/mtd/nand/alauda.c @@ -372,15 +372,6 @@ static int alauda_read_oob(struct mtd_info *mtd, loff_t from, void *oob) return __alauda_read_page(mtd, from, ignore_buf, oob); } -static int popcount8(u8 c) -{ - int ret = 0; - - for ( ; c; c>>=1) - ret += c & 1; - return ret; -} - static int alauda_isbad(struct mtd_info *mtd, loff_t ofs) { u8 oob[16]; @@ -391,7 +382,7 @@ static int alauda_isbad(struct mtd_info *mtd, loff_t ofs) return err; /* A block is marked bad if two or more bits are zero */ - return popcount8(oob[5]) >= 7 ? 0 : 1; + return hweight8(oob[5]) >= 7 ? 0 : 1; } static int alauda_bounce_read(struct mtd_info *mtd, loff_t from, size_t len, |