diff options
Diffstat (limited to 'lib/genalloc.c')
| -rw-r--r-- | lib/genalloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/genalloc.c b/lib/genalloc.c index e67f97495dd5..1923f1490e72 100644 --- a/lib/genalloc.c +++ b/lib/genalloc.c | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | * Version 2. See the file COPYING for more details. | 10 | * Version 2. See the file COPYING for more details. |
| 11 | */ | 11 | */ |
| 12 | 12 | ||
| 13 | #include <linux/slab.h> | ||
| 13 | #include <linux/module.h> | 14 | #include <linux/module.h> |
| 14 | #include <linux/bitmap.h> | 15 | #include <linux/bitmap.h> |
| 15 | #include <linux/genalloc.h> | 16 | #include <linux/genalloc.h> |
| @@ -127,7 +128,6 @@ unsigned long gen_pool_alloc(struct gen_pool *pool, size_t size) | |||
| 127 | chunk = list_entry(_chunk, struct gen_pool_chunk, next_chunk); | 128 | chunk = list_entry(_chunk, struct gen_pool_chunk, next_chunk); |
| 128 | 129 | ||
| 129 | end_bit = (chunk->end_addr - chunk->start_addr) >> order; | 130 | end_bit = (chunk->end_addr - chunk->start_addr) >> order; |
| 130 | end_bit -= nbits + 1; | ||
| 131 | 131 | ||
| 132 | spin_lock_irqsave(&chunk->lock, flags); | 132 | spin_lock_irqsave(&chunk->lock, flags); |
| 133 | start_bit = bitmap_find_next_zero_area(chunk->bits, end_bit, 0, | 133 | start_bit = bitmap_find_next_zero_area(chunk->bits, end_bit, 0, |
