From: Robert P. J. Day Date: Wed, 6 Feb 2008 09:36:51 +0000 (-0800) Subject: rd: use is_power_of_2() in drivers/block/rd.c. X-Git-Tag: v2.6.25-rc1~737 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=67a3b2b6ce09809b21f60401e81663f2c8131640;p=linux-2.6-omap-h63xx.git rd: use is_power_of_2() in drivers/block/rd.c. Signed-off-by: Robert P. J. Day Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/block/rd.c b/drivers/block/rd.c index 82f4eecc869..06e23be7090 100644 --- a/drivers/block/rd.c +++ b/drivers/block/rd.c @@ -56,6 +56,7 @@ #include #include #include +#include #include @@ -450,7 +451,7 @@ static int __init rd_init(void) err = -ENOMEM; if (rd_blocksize > PAGE_SIZE || rd_blocksize < 512 || - (rd_blocksize & (rd_blocksize-1))) { + !is_power_of_2(rd_blocksize)) { printk("RAMDISK: wrong blocksize %d, reverting to defaults\n", rd_blocksize); rd_blocksize = BLOCK_SIZE;