1DEVRES_DESTROY(9)                Driver Basics               DEVRES_DESTROY(9)
2
3
4

NAME

6       devres_destroy - Find a device resource and destroy it
7

SYNOPSIS

9       int devres_destroy(struct device * dev, dr_release_t release,
10                          dr_match_t match, void * match_data);
11

ARGUMENTS

13       dev
14           Device to find resource from
15
16       release
17           Look for resources associated with this release function
18
19       match
20           Match function (optional)
21
22       match_data
23           Data for the match function
24

DESCRIPTION

26       Find the latest devres of dev associated with release and for which
27       match returns 1. If match is NULL, it's considered to match all. If
28       found, the resource is removed atomically and freed.
29
30       Note that the release function for the resource will not be called,
31       only the devres-allocated data will be freed. The caller becomes
32       responsible for freeing any other data.
33

RETURNS

35       0 if devres is found and freed, -ENOENT if not found.
36
38Kernel Hackers Manual 3.10         June 2019                 DEVRES_DESTROY(9)
Impressum