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

NAME

6       __root_device_register - allocate and register a root device
7

SYNOPSIS

9       struct device * __root_device_register(const char * name,
10                                              struct module * owner);
11

ARGUMENTS

13       name
14           root device name
15
16       owner
17           owner module of the root device, usually THIS_MODULE
18

DESCRIPTION

20       This function allocates a root device and registers it using
21       device_register. In order to free the returned device, use
22       root_device_unregister.
23
24       Root devices are dummy devices which allow other devices to be grouped
25       under /sys/devices. Use this function to allocate a root device and
26       then use it as the parent of any device which should appear under
27       /sys/devices/{name}
28
29       The /sys/devices/{name} directory will also contain a 'module' symlink
30       which points to the owner directory in sysfs.
31
32       Returns struct device pointer on success, or ERR_PTR on error.
33

NOTE

35       You probably want to use root_device_register.
36
38Kernel Hackers Manual 3.10         June 2019           __ROOT_DEVICE_REGIST(9)
Impressum