table of contents
other versions
- stretch 4.9.168-1
MISC_REGISTER(9) | Miscellaneous Devices | MISC_REGISTER(9) |
NAME¶
misc_register - register a miscellaneous deviceSYNOPSIS¶
int misc_register(struct miscdevice * misc);
ARGUMENTS¶
miscdevice structure
DESCRIPTION¶
Register a miscellaneous device with the kernel. If the minor number is set to MISC_DYNAMIC_MINOR a minor number is assigned and placed in the minor field of the structure. For other cases the minor number requested is used.The structure passed is linked into the kernel and may not be destroyed until it has been unregistered. By default, an open syscall to the device sets file->private_data to point to the structure. Drivers don't need open in fops for this.
A zero is returned on success and a negative errno code for failure.
COPYRIGHT¶
April 2019 | Kernel Hackers Manual 4.9. |