Lines 3-8
Link Here
|
3 |
* Copyright (c) 2004-2005 Fabrice Bellard |
3 |
* Copyright (c) 2004-2005 Fabrice Bellard |
4 |
*/ |
4 |
*/ |
5 |
#include <linux/module.h> |
5 |
#include <linux/module.h> |
|
|
6 |
#ifndef MODULE_PARM |
7 |
#include <linux/moduleparam.h> |
8 |
#endif |
6 |
#include <linux/types.h> |
9 |
#include <linux/types.h> |
7 |
#include <linux/errno.h> |
10 |
#include <linux/errno.h> |
8 |
#include <linux/fs.h> |
11 |
#include <linux/fs.h> |
Lines 48-58
int page_alloc_count;
Link Here
|
48 |
/* if 0 is used, then devfs/udev is used to automatically create the |
51 |
/* if 0 is used, then devfs/udev is used to automatically create the |
49 |
device */ |
52 |
device */ |
50 |
int major = 250; |
53 |
int major = 250; |
51 |
MODULE_PARM(major,"i"); |
54 |
#ifdef MODULE_PARM |
|
|
55 |
MODULE_PARM(major,"i"); |
56 |
#else |
57 |
module_param(major, int, 0444); |
58 |
#endif |
52 |
|
59 |
|
53 |
/* configurable max_instances */ |
60 |
/* configurable max_instances */ |
54 |
int max_instances = 4; |
61 |
int max_instances = 4; |
55 |
MODULE_PARM(max_instances,"i"); |
62 |
#ifdef MODULE_PARM |
|
|
63 |
MODULE_PARM(max_instances,"i"); |
64 |
#else |
65 |
module_param(max_instances, int, 0444); |
66 |
#endif |
56 |
|
67 |
|
57 |
/* lock the page at virtual address 'user_addr' and return its |
68 |
/* lock the page at virtual address 'user_addr' and return its |
58 |
page index. Return -1 if error */ |
69 |
page index. Return -1 if error */ |