qos_kernel_dep.h File Reference

Portability across different kernel versions. More...

#include <linux/kernel.h>
#include <linux/version.h>
#include <linux/types.h>
#include <linux/kdev_t.h>
#include <linux/fs.h>
#include <linux/aquosa/qos_debug.h>
#include <linux/cdev.h>
#include <linux/kobject.h>

Go to the source code of this file.

Data Structures

struct  qos_dev_info_t
 Kernel-dependent information about a registered virtual device. More...

Defines

#define KERN_INCREMENT   try_module_get(THIS_MODULE)
 Increment module usage counter within the kernel.
#define KERN_DECREMENT   module_put(THIS_MODULE)
 Decrement module usage counter within the kernel.

Functions

qos_rv qos_dev_register (qos_dev_info_t *dev_info, char *dev_name, int def_major, struct file_operations *Fops)
 kernel-dependent registration of a virtual device
qos_rv qos_dev_unregister (qos_dev_info_t *dev_info)
 kernel-dependent registration of a virtual device

Detailed Description

Portability across different kernel versions.

Purpose of this file is to provide a set of macros and static inline functions which allow module code to be compiled with different kernel versions.

Definition in file qos_kernel_dep.h.


Define Documentation

#define KERN_DECREMENT   module_put(THIS_MODULE)

Decrement module usage counter within the kernel.

Definition at line 46 of file qos_kernel_dep.h.

Referenced by device_release(), and qsup_device_release().

#define KERN_INCREMENT   try_module_get(THIS_MODULE)

Increment module usage counter within the kernel.

Definition at line 44 of file qos_kernel_dep.h.

Referenced by device_open(), and qsup_device_open().


Function Documentation

qos_rv qos_dev_register ( qos_dev_info_t dev_info,
char *  dev_name,
int  def_major,
struct file_operations *  Fops 
)

kernel-dependent registration of a virtual device

Definition at line 53 of file qos_kernel_dep.c.

References qos_dev_info_t::cdev, qos_dev_info_t::dev_name, qos_dev_info_t::dev_num, QOS_E_GENERIC, and QOS_OK.

Referenced by qres_init_module(), and qsup_dev_register().

qos_rv qos_dev_unregister ( qos_dev_info_t dev_info  ) 

kernel-dependent registration of a virtual device

Definition at line 81 of file qos_kernel_dep.c.

References qos_dev_info_t::cdev, qos_dev_info_t::dev_num, and QOS_OK.

Referenced by qres_cleanup_module(), and qsup_dev_unregister().

Generated on Mon Aug 2 22:39:17 2010 for qosres by  doxygen 1.6.3