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:
Jean-Sébastien Pédron 2025-06-20 18:51:10 +02:00
parent 7e5d7b0e81
commit c903f3756a
No known key found for this signature in database
GPG key ID: 39E99761A5FD94CC

View file

@ -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));