Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
misc.c File Reference
#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.


#define DYNAMIC_MINORS   64 /* like dynamic majors */


int misc_register (struct miscdevice *misc)
int misc_deregister (struct miscdevice *misc)
 EXPORT_SYMBOL (misc_register)
 EXPORT_SYMBOL (misc_deregister)
 subsys_initcall (misc_init)

Macro Definition Documentation

#define DYNAMIC_MINORS   64 /* like dynamic majors */

Definition at line 62 of file misc.c.

Function Documentation

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.

Definition at line 242 of file misc.c.

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.

Definition at line 184 of file misc.c.

subsys_initcall ( misc_init  )