Lines 36-42
Link Here
|
36 |
#include <linux/sched.h> |
36 |
#include <linux/sched.h> |
37 |
#include <linux/dcache.h> |
37 |
#include <linux/dcache.h> |
38 |
#include <linux/mount.h> |
38 |
#include <linux/mount.h> |
39 |
#include <linux/devfs_fs_kernel.h> |
|
|
40 |
#include <linux/device.h> |
39 |
#include <linux/device.h> |
41 |
#if !defined(USE_TRYTOFREEZEVOID) && !defined(USE_SUSPEND2) |
40 |
#if !defined(USE_TRYTOFREEZEVOID) && !defined(USE_SUSPEND2) |
42 |
#include <linux/suspend.h> |
41 |
#include <linux/suspend.h> |
Lines 2090-2097
Link Here
|
2090 |
return dev_major; |
2089 |
return dev_major; |
2091 |
} |
2090 |
} |
2092 |
|
2091 |
|
2093 |
devfs_mk_cdev(MKDEV(dev_major, 0), S_IFCHR | S_IRUSR | S_IWUSR, DEVICE_NAME); |
|
|
2094 |
|
2095 |
#ifdef USE_CLASS |
2092 |
#ifdef USE_CLASS |
2096 |
dazuko_class = class_create(THIS_MODULE, "dazuko"); |
2093 |
dazuko_class = class_create(THIS_MODULE, "dazuko"); |
2097 |
#ifdef CLASS_class_device_create_2_6_15 |
2094 |
#ifdef CLASS_class_device_create_2_6_15 |
Lines 2271-2278
Link Here
|
2271 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) |
2268 |
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) |
2272 |
error = unregister_chrdev(dev_major, DEVICE_NAME); |
2269 |
error = unregister_chrdev(dev_major, DEVICE_NAME); |
2273 |
|
2270 |
|
2274 |
devfs_remove(DEVICE_NAME); |
|
|
2275 |
|
2276 |
#ifdef USE_CLASS |
2271 |
#ifdef USE_CLASS |
2277 |
class_device_destroy(dazuko_class, MKDEV(dev_major, 0)); |
2272 |
class_device_destroy(dazuko_class, MKDEV(dev_major, 0)); |
2278 |
class_destroy(dazuko_class); |
2273 |
class_destroy(dazuko_class); |