mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
linuxkpi: Add ida_alloc_range()
The amdgpu DRM driver from Linux 6.9 started to use this function. Reviewed by: manu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50988
This commit is contained in:
parent
7e5d7b0e81
commit
c903f3756a
1 changed files with 7 additions and 0 deletions
|
|
@ -147,6 +147,13 @@ ida_alloc_max(struct ida *ida, unsigned int max, gfp_t gfp)
|
|||
return (ida_simple_get(ida, 0, max, gfp));
|
||||
}
|
||||
|
||||
static inline int
|
||||
ida_alloc_range(struct ida *ida, unsigned int min, unsigned int max, gfp_t gfp)
|
||||
{
|
||||
|
||||
return (ida_simple_get(ida, min, max, gfp));
|
||||
}
|
||||
|
||||
static inline int ida_alloc(struct ida *ida, gfp_t gfp)
|
||||
{
|
||||
return (ida_alloc_max(ida, ~0u, gfp));
|
||||
|
|
|
|||
Loading…
Reference in a new issue