Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions | Variables
cdev.h File Reference
#include <linux/kobject.h>
#include <linux/kdev_t.h>
#include <linux/list.h>

Go to the source code of this file.

Data Structures

struct  cdev
 

Functions

void cdev_init (struct cdev *, const struct file_operations *)
 
struct cdevcdev_alloc (void)
 
void cdev_put (struct cdev *p)
 
int cdev_add (struct cdev *, dev_t, unsigned)
 
void cdev_del (struct cdev *)
 
void cd_forget (struct inode *)
 

Variables

struct backing_dev_info directly_mappable_cdev_bdi
 

Function Documentation

void cd_forget ( struct inode )

Definition at line 420 of file char_dev.c.

int cdev_add ( struct cdev p,
dev_t  dev,
unsigned  count 
)

cdev_add() - add a char device to the system : the cdev structure for the device : the first device number for which this device is responsible : the number of consecutive minor numbers corresponding to this device

cdev_add() adds the device represented by to the system, making it live immediately. A negative error code is returned on failure.

Definition at line 472 of file char_dev.c.

struct cdev* cdev_alloc ( void  )
read

cdev_alloc() - allocate a cdev structure

Allocates and returns a cdev structure, or NULL on failure.

Definition at line 540 of file char_dev.c.

void cdev_del ( struct cdev p)

cdev_del() - remove a cdev from the system : the cdev structure to be removed

cdev_del() removes from the system, possibly freeing the structure itself.

Definition at line 501 of file char_dev.c.

void cdev_init ( struct cdev cdev,
const struct file_operations fops 
)

cdev_init() - initialize a cdev structure : the structure to initialize : the file_operations for this device

Initializes , remembering , making it ready to add to the system with cdev_add().

Definition at line 558 of file char_dev.c.

void cdev_put ( struct cdev p)

Definition at line 357 of file char_dev.c.

Variable Documentation

struct backing_dev_info directly_mappable_cdev_bdi

Definition at line 34 of file char_dev.c.