1DEVM_REQUEST_RESOURC(9) Hardware Interfaces DEVM_REQUEST_RESOURC(9)
2
3
4
6 devm_request_resource - request and reserve an I/O or memory resource
7
9 int devm_request_resource(struct device * dev, struct resource * root,
10 struct resource * new);
11
13 dev
14 device for which to request the resource
15
16 root
17 root of the resource tree from which to request the resource
18
19 new
20 descriptor of the resource to request
21
23 This is a device-managed version of request_resource. There is usually
24 no need to release resources requested by this function explicitly
25 since that will be taken care of when the device is unbound from its
26 driver. If for some reason the resource needs to be released
27 explicitly, because of ordering issues for example, drivers must call
28 devm_release_resource rather than the regular release_resource.
29
30 When a conflict is detected between any existing resources and the
31 newly requested resource, an error message will be printed.
32
33 Returns 0 on success or a negative error code on failure.
34
36Kernel Hackers Manual 3.10 June 2019 DEVM_REQUEST_RESOURC(9)