]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blame - lib/memregion.c
Merge tag 'tty-5.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
[mirror_ubuntu-hirsute-kernel.git] / lib / memregion.c
CommitLineData
33dd7075
DW
1// SPDX-License-Identifier: GPL-2.0-only
2/* identifiers for device / performance-differentiated memory regions */
3#include <linux/idr.h>
4#include <linux/types.h>
5
6static DEFINE_IDA(memregion_ids);
7
8int memregion_alloc(gfp_t gfp)
9{
10 return ida_alloc(&memregion_ids, gfp);
11}
12EXPORT_SYMBOL(memregion_alloc);
13
14void memregion_free(int id)
15{
16 ida_free(&memregion_ids, id);
17}
18EXPORT_SYMBOL(memregion_free);