summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2012-11-15 16:41:21 (GMT)
committerArnd Bergmann <arnd@arndb.de>2012-11-15 16:41:21 (GMT)
commit8dbd2879e33be37adf40f747a5fb80ef1a6cd150 (patch)
treec688d7980be8c1c0dbf5e411caaf2c102120102e /lib
parentb770ea523d95837e968d46c7fe09a3f5edd9bb27 (diff)
parentd308ba50a1234b299a00e63a95e61fdeb2f1a2df (diff)
downloadlinux-fsl-qoriq-8dbd2879e33be37adf40f747a5fb80ef1a6cd150.tar.xz
Merge branch 'omap/dt' into next/drivers
Needed for the omap timer changes. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/genalloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/genalloc.c b/lib/genalloc.c
index ca208a9..5492043 100644
--- a/lib/genalloc.c
+++ b/lib/genalloc.c
@@ -178,7 +178,7 @@ int gen_pool_add_virt(struct gen_pool *pool, unsigned long virt, phys_addr_t phy
struct gen_pool_chunk *chunk;
int nbits = size >> pool->min_alloc_order;
int nbytes = sizeof(struct gen_pool_chunk) +
- (nbits + BITS_PER_BYTE - 1) / BITS_PER_BYTE;
+ BITS_TO_LONGS(nbits) * sizeof(long);
chunk = kmalloc_node(nbytes, GFP_KERNEL | __GFP_ZERO, nid);
if (unlikely(chunk == NULL))