diff options
-rw-r--r-- | drivers/block/rd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/rd.c b/drivers/block/rd.c index 82f4eecc8699..06e23be70904 100644 --- a/drivers/block/rd.c +++ b/drivers/block/rd.c | |||
@@ -56,6 +56,7 @@ | |||
56 | #include <linux/backing-dev.h> | 56 | #include <linux/backing-dev.h> |
57 | #include <linux/blkpg.h> | 57 | #include <linux/blkpg.h> |
58 | #include <linux/writeback.h> | 58 | #include <linux/writeback.h> |
59 | #include <linux/log2.h> | ||
59 | 60 | ||
60 | #include <asm/uaccess.h> | 61 | #include <asm/uaccess.h> |
61 | 62 | ||
@@ -450,7 +451,7 @@ static int __init rd_init(void) | |||
450 | err = -ENOMEM; | 451 | err = -ENOMEM; |
451 | 452 | ||
452 | if (rd_blocksize > PAGE_SIZE || rd_blocksize < 512 || | 453 | if (rd_blocksize > PAGE_SIZE || rd_blocksize < 512 || |
453 | (rd_blocksize & (rd_blocksize-1))) { | 454 | !is_power_of_2(rd_blocksize)) { |
454 | printk("RAMDISK: wrong blocksize %d, reverting to defaults\n", | 455 | printk("RAMDISK: wrong blocksize %d, reverting to defaults\n", |
455 | rd_blocksize); | 456 | rd_blocksize); |
456 | rd_blocksize = BLOCK_SIZE; | 457 | rd_blocksize = BLOCK_SIZE; |