diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 13:23:43 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 13:23:43 -0500 |
commit | 60d9aa758c00f20ade0cb1951f6a934f628dd2d7 (patch) | |
tree | e3bdfa4ec0d3f9a29a822810b8b9188c7d613cbd /drivers/mtd/maps/vmu-flash.c | |
parent | b2adf0cbec4cf0934c63f48f893e0cebde380d0c (diff) | |
parent | 2e16cfca6e17ae37ae21feca080a6f2eca9087dc (diff) |
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (90 commits)
jffs2: Fix long-standing bug with symlink garbage collection.
mtd: OneNAND: Fix test of unsigned in onenand_otp_walk()
mtd: cfi_cmdset_0002, fix lock imbalance
Revert "mtd: move mxcnd_remove to .exit.text"
mtd: m25p80: add support for Macronix MX25L4005A
kmsg_dump: fix build for CONFIG_PRINTK=n
mtd: nandsim: add support for 4KiB pages
mtd: mtdoops: refactor as a kmsg_dumper
mtd: mtdoops: make record size configurable
mtd: mtdoops: limit the maximum mtd partition size
mtd: mtdoops: keep track of used/unused pages in an array
mtd: mtdoops: several minor cleanups
core: Add kernel message dumper to call on oopses and panics
mtd: add ARM pismo support
mtd: pxa3xx_nand: Fix PIO data transfer
mtd: nand: fix multi-chip suspend problem
mtd: add support for switching old SST chips into QRY mode
mtd: fix M29W800D dev_id and uaddr
mtd: don't use PF_MEMALLOC
mtd: Add bad block table overrides to Davinci NAND driver
...
Fixed up conflicts (mostly trivial) in
drivers/mtd/devices/m25p80.c
drivers/mtd/maps/pcmciamtd.c
drivers/mtd/nand/pxa3xx_nand.c
kernel/printk.c
Diffstat (limited to 'drivers/mtd/maps/vmu-flash.c')
-rw-r--r-- | drivers/mtd/maps/vmu-flash.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/mtd/maps/vmu-flash.c b/drivers/mtd/maps/vmu-flash.c index 1f73297e7776..82afad0ddd72 100644 --- a/drivers/mtd/maps/vmu-flash.c +++ b/drivers/mtd/maps/vmu-flash.c | |||
@@ -612,16 +612,15 @@ static int __devinit vmu_connect(struct maple_device *mdev) | |||
612 | 612 | ||
613 | test_flash_data = be32_to_cpu(mdev->devinfo.function); | 613 | test_flash_data = be32_to_cpu(mdev->devinfo.function); |
614 | /* Need to count how many bits are set - to find out which | 614 | /* Need to count how many bits are set - to find out which |
615 | * function_data element has details of the memory card: | 615 | * function_data element has details of the memory card |
616 | * using Brian Kernighan's/Peter Wegner's method */ | 616 | */ |
617 | for (c = 0; test_flash_data; c++) | 617 | c = hweight_long(test_flash_data); |
618 | test_flash_data &= test_flash_data - 1; | ||
619 | 618 | ||
620 | basic_flash_data = be32_to_cpu(mdev->devinfo.function_data[c - 1]); | 619 | basic_flash_data = be32_to_cpu(mdev->devinfo.function_data[c - 1]); |
621 | 620 | ||
622 | card = kmalloc(sizeof(struct memcard), GFP_KERNEL); | 621 | card = kmalloc(sizeof(struct memcard), GFP_KERNEL); |
623 | if (!card) { | 622 | if (!card) { |
624 | error = ENOMEM; | 623 | error = -ENOMEM; |
625 | goto fail_nomem; | 624 | goto fail_nomem; |
626 | } | 625 | } |
627 | 626 | ||