1DEVICE_ADD(9) Device drivers infrastructure DEVICE_ADD(9)
2
3
4
6 device_add - add device to device hierarchy.
7
9 int device_add(struct device * dev);
10
12 dev
13 device.
14
16 This is part 2 of device_register, though may be called separately
17 _iff_ device_initialize has been called separately.
18
19 This adds dev to the kobject hierarchy via kobject_add, adds it to the
20 global and sibling lists for the device, then adds it to the other
21 relevant subsystems of the driver model.
22
24 _Never_ directly free dev after calling this function, even if it
25 returned an error! Always use put_device to give up your reference
26 instead.
27
29Kernel Hackers Manual 2.6. June 2019 DEVICE_ADD(9)