resources: Add lookup_resource()
Add a function to find an existing resource by a resource start address. This allows to implement simple allocators (with a malloc/free-alike API) on top of the resource system. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
This commit is contained in:
parent
88efd0bbc0
commit
1c388919d8
2 changed files with 22 additions and 0 deletions
|
@ -132,6 +132,7 @@ extern int allocate_resource(struct resource *root, struct resource *new,
|
|||
resource_size_t,
|
||||
resource_size_t),
|
||||
void *alignf_data);
|
||||
struct resource *lookup_resource(struct resource *root, resource_size_t start);
|
||||
int adjust_resource(struct resource *res, resource_size_t start,
|
||||
resource_size_t size);
|
||||
resource_size_t resource_alignment(struct resource *res);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue