centos man page for __register_chrdev

Query: __register_chrdev

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

__REGISTER_CHRDEV(9)						   Char devices 					      __REGISTER_CHRDEV(9)

NAME
__register_chrdev - create and register a cdev occupying a range of minors
SYNOPSIS
int __register_chrdev(unsigned int major, unsigned int baseminor, unsigned int count, const char * name, const struct file_operations * fops);
ARGUMENTS
major major device number or 0 for dynamic allocation baseminor first of the requested range of minor numbers count the number of minor numbers required name name of this range of devices fops file operations associated with this devices
DESCRIPTION
If major == 0 this functions will dynamically allocate a major and return its number. If major > 0 this function will attempt to reserve a device with the given major number and will return zero on success. Returns a -ve errno on failure. The name of this device has nothing to do with the name of the device in /dev. It only helps to keep track of the different owners of devices. If your module name has only one type of devices it's ok to use e.g. the name of the module here.
COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 __REGISTER_CHRDEV(9)
Related Man Pages
autopush(1m) - debian
autopush(1m) - centos
autopush(1m) - x11r4
autopush(1m) - plan9
autopush(1m) - v7
Similar Topics in the Unix Linux Community
Device driver request_region 0xcf8 fails
device number registration
Kernel panics : trying to write / read on tiny tty driver