Commit eae5acbd authored by Yury Norov's avatar Yury Norov

bitmap: replace _reg_op(REG_OP_ALLOC) with bitmap_set()

_reg_op(REG_OP_ALLOC) duplicates bitmap_set().

CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
CC: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: default avatarYury Norov <yury.norov@gmail.com>
parent b085f969
......@@ -838,9 +838,12 @@ EXPORT_SYMBOL(bitmap_release_region);
*/
int bitmap_allocate_region(unsigned long *bitmap, unsigned int pos, int order)
{
unsigned int len = BIT(order);
if (!__reg_op(bitmap, pos, order, REG_OP_ISFREE))
return -EBUSY;
return __reg_op(bitmap, pos, order, REG_OP_ALLOC);
bitmap_set(bitmap, pos, len);
return 0;
}
EXPORT_SYMBOL(bitmap_allocate_region);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment