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

NAME

6       device_register - register a device with the system.
7

SYNOPSIS

9       int device_register(struct device * dev);
10

ARGUMENTS

12       dev
13           pointer to the device structure
14

DESCRIPTION

16       This happens in two clean steps - initialize the device and add it to
17       the system. The two steps can be called separately, but this is the
18       easiest and most common. I.e. you should only call the two helpers
19       separately if have a clearly defined need to use and refcount the
20       device before it is added to the hierarchy.
21

NOTE

23       _Never_ directly free dev after calling this function, even if it
24       returned an error! Always use put_device to give up the reference
25       initialized in this function instead.
26
28Kernel Hackers Manual 2.6.       November 2011              DEVICE_REGISTER(9)
Impressum