1CLASS_FIND_DEVICE(9)     Device drivers infrastructure    CLASS_FIND_DEVICE(9)
2
3
4

NAME

6       class_find_device - device iterator for locating a particular device
7

SYNOPSIS

9       struct device * class_find_device(struct class * class,
10                                         struct device * start, void * data,
11                                         int (*match) (struct device *, void *));
12

ARGUMENTS

14       class
15           the class we're iterating
16
17       start
18           Device to begin with
19
20       data
21           data for the match function
22
23       match
24           function to check device
25

DESCRIPTION

27       This is similar to the class_for_each_dev function above, but it
28       returns a reference to a device that is 'found' for later use, as
29       determined by the match callback.
30
31       The callback should return 0 if the device doesn't match and non-zero
32       if it does. If the callback returns non-zero, this function will return
33       to the caller and not iterate over any more devices.
34
35       Note, you will need to drop the reference with put_device after use.
36
37       fn is allowed to do anything including calling back into class code.
38       There's no locking restriction.
39
41Kernel Hackers Manual 2.6.       November 2011            CLASS_FIND_DEVICE(9)
Impressum