|
|
* Copyright (c) 2004-2005 Fabrice Bellard | * Copyright (c) 2004-2005 Fabrice Bellard |
*/ | */ |
#include <linux/module.h> | #include <linux/module.h> |
|
#ifndef MODULE_PARM |
|
#include <linux/moduleparam.h> |
|
#endif |
#include <linux/types.h> | #include <linux/types.h> |
#include <linux/errno.h> | #include <linux/errno.h> |
#include <linux/fs.h> | #include <linux/fs.h> |
|
|
/* if 0 is used, then devfs/udev is used to automatically create the | /* if 0 is used, then devfs/udev is used to automatically create the |
device */ | device */ |
int major = 250; | int major = 250; |
MODULE_PARM(major,"i"); |
#ifdef MODULE_PARM |
|
MODULE_PARM(major,"i"); |
|
#else |
|
module_param(major, int, 0444); |
|
#endif |
| |
/* configurable max_instances */ | /* configurable max_instances */ |
int max_instances = 4; | int max_instances = 4; |
MODULE_PARM(max_instances,"i"); |
#ifdef MODULE_PARM |
|
MODULE_PARM(max_instances,"i"); |
|
#else |
|
module_param(max_instances, int, 0444); |
|
#endif |
| |
/* lock the page at virtual address 'user_addr' and return its | /* lock the page at virtual address 'user_addr' and return its |
page index. Return -1 if error */ | page index. Return -1 if error */ |