centos man page for device_initialize

Query: device_initialize

OS: centos

Section: 9

Links: centos man pages   all man pages

Forums: unix linux community   forum categories

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

DEVICE_INITIALIZE(9)					   Device drivers infrastructure				      DEVICE_INITIALIZE(9)

NAME
device_initialize - init device structure.
SYNOPSIS
void device_initialize(struct device * dev);
ARGUMENTS
dev device.
DESCRIPTION
This prepares the device for use by other layers by initializing its fields. It is the first half of device_register, if called by that function, though it can also be called separately, so one may use dev's fields. In particular, get_device/put_device may be used for reference counting of dev after calling this function. All fields in dev must be initialized by the caller to 0, except for those explicitly set to some other value. The simplest approach is to use kzalloc to allocate the structure containing dev.
NOTE
Use put_device to give up your reference instead of freeing dev directly once you have called this function.
COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 DEVICE_INITIALIZE(9)
Related Man Pages
struct_input_polled_dev(9) - centos
dev(7fs) - opensolaris
mkdevalloc(1m) - mojave
mkdevalloc(1m) - osx
mkdevalloc(1m) - linux
Similar Topics in the Unix Linux Community
Compiling virtual network adapter driver problem (net_device struct)