mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
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: Yury Norov <yury.norov@gmail.com>
This commit is contained in:
parent
b085f969ed
commit
eae5acbd75
1 changed files with 4 additions and 1 deletions
|
@ -838,9 +838,12 @@ EXPORT_SYMBOL(bitmap_release_region);
|
||||||
*/
|
*/
|
||||||
int bitmap_allocate_region(unsigned long *bitmap, unsigned int pos, int order)
|
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))
|
if (!__reg_op(bitmap, pos, order, REG_OP_ISFREE))
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
return __reg_op(bitmap, pos, order, REG_OP_ALLOC);
|
bitmap_set(bitmap, pos, len);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(bitmap_allocate_region);
|
EXPORT_SYMBOL(bitmap_allocate_region);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue