commit d1edce71135cc6d98c0a4b5729774542b676e769 Author: sophgo-forum-service <forum_service@sophgo.com> Date: Fri Mar 15 16:07:33 2024 +0800 [fix] recommend using ssh method to clone repo. [fix] fix sensor driver repo branch name.
20 lines
429 B
C
20 lines
429 B
C
// SPDX-License-Identifier: GPL-2.0-only
|
|
/* identifiers for device / performance-differentiated memory regions */
|
|
#include <linux/idr.h>
|
|
#include <linux/types.h>
|
|
#include <linux/memregion.h>
|
|
|
|
static DEFINE_IDA(memregion_ids);
|
|
|
|
int memregion_alloc(gfp_t gfp)
|
|
{
|
|
return ida_alloc(&memregion_ids, gfp);
|
|
}
|
|
EXPORT_SYMBOL(memregion_alloc);
|
|
|
|
void memregion_free(int id)
|
|
{
|
|
ida_free(&memregion_ids, id);
|
|
}
|
|
EXPORT_SYMBOL(memregion_free);
|