Linux Kernel
3.7.1
|
#include <linux/module.h>
#include <linux/fs.h>
#include <linux/errno.h>
#include <linux/miscdevice.h>
#include <linux/kernel.h>
#include <linux/major.h>
#include <linux/mutex.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/stat.h>
#include <linux/init.h>
#include <linux/device.h>
#include <linux/tty.h>
#include <linux/kmod.h>
#include <linux/gfp.h>
Go to the source code of this file.
Macros | |
#define | DYNAMIC_MINORS 64 /* like dynamic majors */ |
Functions | |
int | misc_register (struct miscdevice *misc) |
int | misc_deregister (struct miscdevice *misc) |
EXPORT_SYMBOL (misc_register) | |
EXPORT_SYMBOL (misc_deregister) | |
subsys_initcall (misc_init) | |
EXPORT_SYMBOL | ( | misc_register | ) |
EXPORT_SYMBOL | ( | misc_deregister | ) |
int misc_deregister | ( | struct miscdevice * | misc | ) |
misc_deregister - unregister a miscellaneous device : device to unregister
Unregister a miscellaneous device that was previously successfully registered with misc_register(). Success is indicated by a zero return, a negative errno code indicates an error.
int misc_register | ( | struct miscdevice * | misc | ) |
misc_register - register a miscellaneous device : device structure
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.
A zero is returned on success and a negative errno code for failure.
subsys_initcall | ( | misc_init | ) |