devm_request_resource (9) - Linux Manuals
devm_request_resource: request and reserve an I/O or memory resource
devm_request_resource - request and reserve an I/O or memory resource
int devm_request_resource(struct device
* dev, struct resource * root, struct resource * new);
- device for which to request the resource
- root of the resource tree from which to request the resource
- descriptor of the resource to request
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.