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

NAME

6       devres_get - Find devres, if non-existent, add one atomically
7

SYNOPSIS

9       void * devres_get(struct device * dev, void * new_res,
10                         dr_match_t match, void * match_data);
11

ARGUMENTS

13       dev
14           Device to lookup or add devres for
15
16       new_res
17           Pointer to new initialized devres to add if not found
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 which has the same release function as
27       new_res and for which match return 1. If found, new_res is freed;
28       otherwise, new_res is added atomically.
29

RETURNS

31       Pointer to found or added devres.
32
34Kernel Hackers Manual 3.10         June 2019                     DEVRES_GET(9)
Impressum