table of contents
other versions
DEVM_REQUEST_RESOURC(9) | Hardware Interfaces | DEVM_REQUEST_RESOURC(9) |
NAME¶
devm_request_resource - request and reserve an I/O or memory resourceSYNOPSIS¶
int
devm_request_resource(struct device * dev,
struct resource * root,
struct resource * new);
ARGUMENTS¶
devdevice for which to request the resource
root
root of the resource tree from which to request the
resource
new
descriptor of the resource to request
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¶
January 2017 | Kernel Hackers Manual 4.8. |