aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/card/block.c
diff options
context:
space:
mode:
authorBen Collins <ben.collins@canonical.com>2008-06-05 19:10:21 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-06-05 19:14:17 -0400
commit203c80187eba037f2d6562e0d5847014746726dd (patch)
tree10b1d75a17760d866f7737245c328424e1a319bf /drivers/mmc/card/block.c
parentb2ab26ab28cfed076ee8a83627d008472f6ac54f (diff)
mmc: Fix crash in mmc_block on 64-bit
Fairly simple. "dev_use" was being allocated as a zero length array because of bad math on 64-bit systems, causing a crash in find_first_zero_bit(). One-liner follows: Signed-off-by: Ben Collins <ben.collins@canonical.com> Acked-by: Pierre Ossman <drzeus@drzeus.cx> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/mmc/card/block.c')
-rw-r--r--drivers/mmc/card/block.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/card/block.c b/drivers/mmc/card/block.c
index 91ded3e82401..f9ad960d7c1a 100644
--- a/drivers/mmc/card/block.c
+++ b/drivers/mmc/card/block.c
@@ -46,7 +46,7 @@
46#define MMC_SHIFT 3 46#define MMC_SHIFT 3
47#define MMC_NUM_MINORS (256 >> MMC_SHIFT) 47#define MMC_NUM_MINORS (256 >> MMC_SHIFT)
48 48
49static unsigned long dev_use[MMC_NUM_MINORS/(8*sizeof(unsigned long))]; 49static DECLARE_BITMAP(dev_use, MMC_NUM_MINORS);
50 50
51/* 51/*
52 * There is one mmc_blk_data per slot. 52 * There is one mmc_blk_data per slot.