table of contents
DEVM_REQUEST_RESOURC(9) | Hardware Interfaces | DEVM_REQUEST_RESOURC(9) |
NAME¶
devm_request_resource - request and reserve an I/O or memory resource
SYNOPSIS¶
int devm_request_resource(struct device * dev, struct resource * root, struct resource * new);
ARGUMENTS¶
dev
root
new
DESCRIPTION¶
This is a device-managed version of request_resource. There is usually no need to release resources requested by this function explicitly since that will be taken care of when the device is unbound from its driver. If for some reason the resource needs to be released explicitly, because of ordering issues for example, drivers must call devm_release_resource rather than the regular release_resource.
When a conflict is detected between any existing resources and the newly requested resource, an error message will be printed.
Returns 0 on success or a negative error code on failure.
COPYRIGHT¶
June 2024 | Kernel Hackers Manual 3.10 |