Added support for building as modules or as part of monolithic kernel
parent
1d3c4d2ed2
commit
c459c9ead3
|
@ -127,6 +127,14 @@ typedef struct wait_queue *wait_queue_head_t;
|
||||||
#endif
|
#endif
|
||||||
#ifndef NOPAGE_OOM
|
#ifndef NOPAGE_OOM
|
||||||
#define NOPAGE_OOM 0
|
#define NOPAGE_OOM 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* module_init/module_exit added in 2.3.13 */
|
||||||
|
#ifndef module_init
|
||||||
|
#define module_init(x) int init_module(void) { return x(); }
|
||||||
|
#endif
|
||||||
|
#ifndef module_exit
|
||||||
|
#define module_exit(x) void cleanup_module(void) { x(); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Generic cmpxchg added in 2.3.x */
|
/* Generic cmpxchg added in 2.3.x */
|
||||||
|
|
|
@ -123,47 +123,29 @@ static drm_ioctl_desc_t i810_ioctls[] = {
|
||||||
#define I810_IOCTL_COUNT DRM_ARRAY_SIZE(i810_ioctls)
|
#define I810_IOCTL_COUNT DRM_ARRAY_SIZE(i810_ioctls)
|
||||||
|
|
||||||
#ifdef MODULE
|
#ifdef MODULE
|
||||||
int init_module(void);
|
|
||||||
void cleanup_module(void);
|
|
||||||
static char *i810 = NULL;
|
static char *i810 = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
MODULE_AUTHOR("Precision Insight, Inc., Cedar Park, Texas.");
|
MODULE_AUTHOR("VA Linux Systems, Inc.");
|
||||||
MODULE_DESCRIPTION("Intel I810");
|
MODULE_DESCRIPTION("Intel I810");
|
||||||
MODULE_PARM(i810, "s");
|
MODULE_PARM(i810, "s");
|
||||||
|
|
||||||
/* init_module is called when insmod is used to load the module */
|
module_init(i810_init);
|
||||||
|
module_exit(i810_cleanup);
|
||||||
int init_module(void)
|
|
||||||
{
|
|
||||||
DRM_DEBUG("doing i810_init()\n");
|
|
||||||
return i810_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* cleanup_module is called when rmmod is used to unload the module */
|
|
||||||
|
|
||||||
void cleanup_module(void)
|
|
||||||
{
|
|
||||||
i810_cleanup();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MODULE
|
#ifndef MODULE
|
||||||
/* i810_setup is called by the kernel to parse command-line options passed
|
/* i810_options is called by the kernel to parse command-line options
|
||||||
* via the boot-loader (e.g., LILO). It calls the insmod option routine,
|
* passed via the boot-loader (e.g., LILO). It calls the insmod option
|
||||||
* drm_parse_drm.
|
* routine, drm_parse_drm.
|
||||||
*
|
*/
|
||||||
* This is not currently supported, since it requires changes to
|
|
||||||
* linux/init/main.c. */
|
|
||||||
|
|
||||||
|
static int __init i810_options(char *str, int *ints)
|
||||||
void __init i810_setup(char *str, int *ints)
|
|
||||||
{
|
{
|
||||||
if (ints[0] != 0) {
|
|
||||||
DRM_ERROR("Illegal command line format, ignored\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
drm_parse_options(str);
|
drm_parse_options(str);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__setup("i810=", i810_options);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int i810_setup(drm_device_t *dev)
|
static int i810_setup(drm_device_t *dev)
|
||||||
|
|
|
@ -122,47 +122,29 @@ static drm_ioctl_desc_t mga_ioctls[] = {
|
||||||
#define MGA_IOCTL_COUNT DRM_ARRAY_SIZE(mga_ioctls)
|
#define MGA_IOCTL_COUNT DRM_ARRAY_SIZE(mga_ioctls)
|
||||||
|
|
||||||
#ifdef MODULE
|
#ifdef MODULE
|
||||||
int init_module(void);
|
|
||||||
void cleanup_module(void);
|
|
||||||
static char *mga = NULL;
|
static char *mga = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
MODULE_AUTHOR("Precision Insight, Inc., Cedar Park, Texas.");
|
MODULE_AUTHOR("VA Linux Systems, Inc.");
|
||||||
MODULE_DESCRIPTION("Matrox g200/g400");
|
MODULE_DESCRIPTION("Matrox g200/g400");
|
||||||
MODULE_PARM(mga, "s");
|
MODULE_PARM(mga, "s");
|
||||||
|
|
||||||
/* init_module is called when insmod is used to load the module */
|
module_init(mga_init);
|
||||||
|
module_exit(mga_cleanup);
|
||||||
int init_module(void)
|
|
||||||
{
|
|
||||||
DRM_DEBUG("doing mga_init()\n");
|
|
||||||
return mga_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* cleanup_module is called when rmmod is used to unload the module */
|
|
||||||
|
|
||||||
void cleanup_module(void)
|
|
||||||
{
|
|
||||||
mga_cleanup();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MODULE
|
#ifndef MODULE
|
||||||
/* mga_setup is called by the kernel to parse command-line options passed
|
/* mga_options is called by the kernel to parse command-line options passed
|
||||||
* via the boot-loader (e.g., LILO). It calls the insmod option routine,
|
* via the boot-loader (e.g., LILO). It calls the insmod option routine,
|
||||||
* drm_parse_drm.
|
* drm_parse_drm.
|
||||||
*
|
*/
|
||||||
* This is not currently supported, since it requires changes to
|
|
||||||
* linux/init/main.c. */
|
|
||||||
|
|
||||||
|
static int __init mga_options(char *str, int *ints)
|
||||||
void __init mga_setup(char *str, int *ints)
|
|
||||||
{
|
{
|
||||||
if (ints[0] != 0) {
|
|
||||||
DRM_ERROR("Illegal command line format, ignored\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
drm_parse_options(str);
|
drm_parse_options(str);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__setup("mga=", mga_options);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int mga_setup(drm_device_t *dev)
|
static int mga_setup(drm_device_t *dev)
|
||||||
|
|
|
@ -118,46 +118,29 @@ static drm_ioctl_desc_t r128_ioctls[] = {
|
||||||
#define R128_IOCTL_COUNT DRM_ARRAY_SIZE(r128_ioctls)
|
#define R128_IOCTL_COUNT DRM_ARRAY_SIZE(r128_ioctls)
|
||||||
|
|
||||||
#ifdef MODULE
|
#ifdef MODULE
|
||||||
int init_module(void);
|
|
||||||
void cleanup_module(void);
|
|
||||||
static char *r128 = NULL;
|
static char *r128 = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
MODULE_AUTHOR("Precision Insight, Inc., Cedar Park, Texas.");
|
MODULE_AUTHOR("VA Linux Systems, Inc.");
|
||||||
MODULE_DESCRIPTION("r128");
|
MODULE_DESCRIPTION("r128");
|
||||||
MODULE_PARM(r128, "s");
|
MODULE_PARM(r128, "s");
|
||||||
|
|
||||||
/* init_module is called when insmod is used to load the module */
|
module_init(r128_init);
|
||||||
|
module_exit(r128_cleanup);
|
||||||
int init_module(void)
|
|
||||||
{
|
|
||||||
return r128_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* cleanup_module is called when rmmod is used to unload the module */
|
|
||||||
|
|
||||||
void cleanup_module(void)
|
|
||||||
{
|
|
||||||
r128_cleanup();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MODULE
|
#ifndef MODULE
|
||||||
/* r128_setup is called by the kernel to parse command-line options passed
|
/* r128_options is called by the kernel to parse command-line options
|
||||||
* via the boot-loader (e.g., LILO). It calls the insmod option routine,
|
* passed via the boot-loader (e.g., LILO). It calls the insmod option
|
||||||
* drm_parse_drm.
|
* routine, drm_parse_drm.
|
||||||
*
|
*/
|
||||||
* This is not currently supported, since it requires changes to
|
|
||||||
* linux/init/main.c. */
|
|
||||||
|
|
||||||
|
static int __init r128_options(char *str, int *ints)
|
||||||
void __init r128_setup(char *str, int *ints)
|
|
||||||
{
|
{
|
||||||
if (ints[0] != 0) {
|
|
||||||
DRM_ERROR("Illegal command line format, ignored\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
drm_parse_options(str);
|
drm_parse_options(str);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__setup("r128=", r128_options);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int r128_setup(drm_device_t *dev)
|
static int r128_setup(drm_device_t *dev)
|
||||||
|
|
|
@ -106,46 +106,29 @@ static drm_ioctl_desc_t tdfx_ioctls[] = {
|
||||||
#define TDFX_IOCTL_COUNT DRM_ARRAY_SIZE(tdfx_ioctls)
|
#define TDFX_IOCTL_COUNT DRM_ARRAY_SIZE(tdfx_ioctls)
|
||||||
|
|
||||||
#ifdef MODULE
|
#ifdef MODULE
|
||||||
int init_module(void);
|
|
||||||
void cleanup_module(void);
|
|
||||||
static char *tdfx = NULL;
|
static char *tdfx = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
MODULE_AUTHOR("Precision Insight, Inc., Cedar Park, Texas.");
|
MODULE_AUTHOR("VA Linux Systems, Inc.");
|
||||||
MODULE_DESCRIPTION("tdfx");
|
MODULE_DESCRIPTION("tdfx");
|
||||||
MODULE_PARM(tdfx, "s");
|
MODULE_PARM(tdfx, "s");
|
||||||
|
|
||||||
/* init_module is called when insmod is used to load the module */
|
module_init(tdfx_init);
|
||||||
|
module_exit(tdfx_cleanup);
|
||||||
int init_module(void)
|
|
||||||
{
|
|
||||||
return tdfx_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* cleanup_module is called when rmmod is used to unload the module */
|
|
||||||
|
|
||||||
void cleanup_module(void)
|
|
||||||
{
|
|
||||||
tdfx_cleanup();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MODULE
|
#ifndef MODULE
|
||||||
/* tdfx_setup is called by the kernel to parse command-line options passed
|
/* tdfx_options is called by the kernel to parse command-line options
|
||||||
* via the boot-loader (e.g., LILO). It calls the insmod option routine,
|
* passed via the boot-loader (e.g., LILO). It calls the insmod option
|
||||||
* drm_parse_drm.
|
* routine, drm_parse_drm.
|
||||||
*
|
*/
|
||||||
* This is not currently supported, since it requires changes to
|
|
||||||
* linux/init/main.c. */
|
|
||||||
|
|
||||||
|
static int __init tdfx_options(char *str, int *ints)
|
||||||
void __init tdfx_setup(char *str, int *ints)
|
|
||||||
{
|
{
|
||||||
if (ints[0] != 0) {
|
|
||||||
DRM_ERROR("Illegal command line format, ignored\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
drm_parse_options(str);
|
drm_parse_options(str);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__setup("tdfx=", tdfx_options);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int tdfx_setup(drm_device_t *dev)
|
static int tdfx_setup(drm_device_t *dev)
|
||||||
|
|
|
@ -127,6 +127,14 @@ typedef struct wait_queue *wait_queue_head_t;
|
||||||
#endif
|
#endif
|
||||||
#ifndef NOPAGE_OOM
|
#ifndef NOPAGE_OOM
|
||||||
#define NOPAGE_OOM 0
|
#define NOPAGE_OOM 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* module_init/module_exit added in 2.3.13 */
|
||||||
|
#ifndef module_init
|
||||||
|
#define module_init(x) int init_module(void) { return x(); }
|
||||||
|
#endif
|
||||||
|
#ifndef module_exit
|
||||||
|
#define module_exit(x) void cleanup_module(void) { x(); }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Generic cmpxchg added in 2.3.x */
|
/* Generic cmpxchg added in 2.3.x */
|
||||||
|
|
|
@ -110,49 +110,34 @@ static drm_ioctl_desc_t gamma_ioctls[] = {
|
||||||
#define GAMMA_IOCTL_COUNT DRM_ARRAY_SIZE(gamma_ioctls)
|
#define GAMMA_IOCTL_COUNT DRM_ARRAY_SIZE(gamma_ioctls)
|
||||||
|
|
||||||
#ifdef MODULE
|
#ifdef MODULE
|
||||||
int init_module(void);
|
|
||||||
void cleanup_module(void);
|
|
||||||
static char *gamma = NULL;
|
static char *gamma = NULL;
|
||||||
static int devices = 0;
|
static int devices = 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
MODULE_AUTHOR("Precision Insight, Inc., Cedar Park, Texas.");
|
MODULE_AUTHOR("VA Linux Systems, Inc.");
|
||||||
MODULE_DESCRIPTION("3dlabs GMX 2000");
|
MODULE_DESCRIPTION("3dlabs GMX 2000");
|
||||||
MODULE_PARM(gamma, "s");
|
MODULE_PARM(gamma, "s");
|
||||||
MODULE_PARM(devices, "i");
|
MODULE_PARM(devices, "i");
|
||||||
MODULE_PARM_DESC(devices, "devices=x, where x is the number of MX chips on your card\n");
|
MODULE_PARM_DESC(devices,
|
||||||
|
"devices=x, where x is the number of MX chips on card\n");
|
||||||
|
|
||||||
/* init_module is called when insmod is used to load the module */
|
module_init(gamma_init);
|
||||||
|
module_exit(gamma_cleanup);
|
||||||
int init_module(void)
|
|
||||||
{
|
|
||||||
return gamma_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* cleanup_module is called when rmmod is used to unload the module */
|
|
||||||
|
|
||||||
void cleanup_module(void)
|
|
||||||
{
|
|
||||||
gamma_cleanup();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MODULE
|
#ifndef MODULE
|
||||||
/* gamma_setup is called by the kernel to parse command-line options passed
|
/* gamma_options is called by the kernel to parse command-line options
|
||||||
* via the boot-loader (e.g., LILO). It calls the insmod option routine,
|
* passed via the boot-loader (e.g., LILO). It calls the insmod option
|
||||||
* drm_parse_options.
|
* routine, drm_parse_options.
|
||||||
*
|
*/
|
||||||
* This is not currently supported, since it requires changes to
|
|
||||||
* linux/init/main.c. */
|
|
||||||
|
|
||||||
|
|
||||||
void __init gamma_setup(char *str, int *ints)
|
static int __init gamma_options(char *str, int *ints)
|
||||||
{
|
{
|
||||||
if (ints[0] != 0) {
|
|
||||||
DRM_ERROR("Illegal command line format, ignored\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
drm_parse_options(str);
|
drm_parse_options(str);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__setup("gamma=", gamma_options);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int gamma_setup(drm_device_t *dev)
|
static int gamma_setup(drm_device_t *dev)
|
||||||
|
|
|
@ -123,47 +123,29 @@ static drm_ioctl_desc_t i810_ioctls[] = {
|
||||||
#define I810_IOCTL_COUNT DRM_ARRAY_SIZE(i810_ioctls)
|
#define I810_IOCTL_COUNT DRM_ARRAY_SIZE(i810_ioctls)
|
||||||
|
|
||||||
#ifdef MODULE
|
#ifdef MODULE
|
||||||
int init_module(void);
|
|
||||||
void cleanup_module(void);
|
|
||||||
static char *i810 = NULL;
|
static char *i810 = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
MODULE_AUTHOR("Precision Insight, Inc., Cedar Park, Texas.");
|
MODULE_AUTHOR("VA Linux Systems, Inc.");
|
||||||
MODULE_DESCRIPTION("Intel I810");
|
MODULE_DESCRIPTION("Intel I810");
|
||||||
MODULE_PARM(i810, "s");
|
MODULE_PARM(i810, "s");
|
||||||
|
|
||||||
/* init_module is called when insmod is used to load the module */
|
module_init(i810_init);
|
||||||
|
module_exit(i810_cleanup);
|
||||||
int init_module(void)
|
|
||||||
{
|
|
||||||
DRM_DEBUG("doing i810_init()\n");
|
|
||||||
return i810_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* cleanup_module is called when rmmod is used to unload the module */
|
|
||||||
|
|
||||||
void cleanup_module(void)
|
|
||||||
{
|
|
||||||
i810_cleanup();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MODULE
|
#ifndef MODULE
|
||||||
/* i810_setup is called by the kernel to parse command-line options passed
|
/* i810_options is called by the kernel to parse command-line options
|
||||||
* via the boot-loader (e.g., LILO). It calls the insmod option routine,
|
* passed via the boot-loader (e.g., LILO). It calls the insmod option
|
||||||
* drm_parse_drm.
|
* routine, drm_parse_drm.
|
||||||
*
|
*/
|
||||||
* This is not currently supported, since it requires changes to
|
|
||||||
* linux/init/main.c. */
|
|
||||||
|
|
||||||
|
static int __init i810_options(char *str, int *ints)
|
||||||
void __init i810_setup(char *str, int *ints)
|
|
||||||
{
|
{
|
||||||
if (ints[0] != 0) {
|
|
||||||
DRM_ERROR("Illegal command line format, ignored\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
drm_parse_options(str);
|
drm_parse_options(str);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__setup("i810=", i810_options);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int i810_setup(drm_device_t *dev)
|
static int i810_setup(drm_device_t *dev)
|
||||||
|
|
|
@ -122,47 +122,29 @@ static drm_ioctl_desc_t mga_ioctls[] = {
|
||||||
#define MGA_IOCTL_COUNT DRM_ARRAY_SIZE(mga_ioctls)
|
#define MGA_IOCTL_COUNT DRM_ARRAY_SIZE(mga_ioctls)
|
||||||
|
|
||||||
#ifdef MODULE
|
#ifdef MODULE
|
||||||
int init_module(void);
|
|
||||||
void cleanup_module(void);
|
|
||||||
static char *mga = NULL;
|
static char *mga = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
MODULE_AUTHOR("Precision Insight, Inc., Cedar Park, Texas.");
|
MODULE_AUTHOR("VA Linux Systems, Inc.");
|
||||||
MODULE_DESCRIPTION("Matrox g200/g400");
|
MODULE_DESCRIPTION("Matrox g200/g400");
|
||||||
MODULE_PARM(mga, "s");
|
MODULE_PARM(mga, "s");
|
||||||
|
|
||||||
/* init_module is called when insmod is used to load the module */
|
module_init(mga_init);
|
||||||
|
module_exit(mga_cleanup);
|
||||||
int init_module(void)
|
|
||||||
{
|
|
||||||
DRM_DEBUG("doing mga_init()\n");
|
|
||||||
return mga_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* cleanup_module is called when rmmod is used to unload the module */
|
|
||||||
|
|
||||||
void cleanup_module(void)
|
|
||||||
{
|
|
||||||
mga_cleanup();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MODULE
|
#ifndef MODULE
|
||||||
/* mga_setup is called by the kernel to parse command-line options passed
|
/* mga_options is called by the kernel to parse command-line options passed
|
||||||
* via the boot-loader (e.g., LILO). It calls the insmod option routine,
|
* via the boot-loader (e.g., LILO). It calls the insmod option routine,
|
||||||
* drm_parse_drm.
|
* drm_parse_drm.
|
||||||
*
|
*/
|
||||||
* This is not currently supported, since it requires changes to
|
|
||||||
* linux/init/main.c. */
|
|
||||||
|
|
||||||
|
static int __init mga_options(char *str, int *ints)
|
||||||
void __init mga_setup(char *str, int *ints)
|
|
||||||
{
|
{
|
||||||
if (ints[0] != 0) {
|
|
||||||
DRM_ERROR("Illegal command line format, ignored\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
drm_parse_options(str);
|
drm_parse_options(str);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__setup("mga=", mga_options);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int mga_setup(drm_device_t *dev)
|
static int mga_setup(drm_device_t *dev)
|
||||||
|
|
|
@ -118,46 +118,29 @@ static drm_ioctl_desc_t r128_ioctls[] = {
|
||||||
#define R128_IOCTL_COUNT DRM_ARRAY_SIZE(r128_ioctls)
|
#define R128_IOCTL_COUNT DRM_ARRAY_SIZE(r128_ioctls)
|
||||||
|
|
||||||
#ifdef MODULE
|
#ifdef MODULE
|
||||||
int init_module(void);
|
|
||||||
void cleanup_module(void);
|
|
||||||
static char *r128 = NULL;
|
static char *r128 = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
MODULE_AUTHOR("Precision Insight, Inc., Cedar Park, Texas.");
|
MODULE_AUTHOR("VA Linux Systems, Inc.");
|
||||||
MODULE_DESCRIPTION("r128");
|
MODULE_DESCRIPTION("r128");
|
||||||
MODULE_PARM(r128, "s");
|
MODULE_PARM(r128, "s");
|
||||||
|
|
||||||
/* init_module is called when insmod is used to load the module */
|
module_init(r128_init);
|
||||||
|
module_exit(r128_cleanup);
|
||||||
int init_module(void)
|
|
||||||
{
|
|
||||||
return r128_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* cleanup_module is called when rmmod is used to unload the module */
|
|
||||||
|
|
||||||
void cleanup_module(void)
|
|
||||||
{
|
|
||||||
r128_cleanup();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MODULE
|
#ifndef MODULE
|
||||||
/* r128_setup is called by the kernel to parse command-line options passed
|
/* r128_options is called by the kernel to parse command-line options
|
||||||
* via the boot-loader (e.g., LILO). It calls the insmod option routine,
|
* passed via the boot-loader (e.g., LILO). It calls the insmod option
|
||||||
* drm_parse_drm.
|
* routine, drm_parse_drm.
|
||||||
*
|
*/
|
||||||
* This is not currently supported, since it requires changes to
|
|
||||||
* linux/init/main.c. */
|
|
||||||
|
|
||||||
|
static int __init r128_options(char *str, int *ints)
|
||||||
void __init r128_setup(char *str, int *ints)
|
|
||||||
{
|
{
|
||||||
if (ints[0] != 0) {
|
|
||||||
DRM_ERROR("Illegal command line format, ignored\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
drm_parse_options(str);
|
drm_parse_options(str);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__setup("r128=", r128_options);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int r128_setup(drm_device_t *dev)
|
static int r128_setup(drm_device_t *dev)
|
||||||
|
|
|
@ -106,46 +106,29 @@ static drm_ioctl_desc_t tdfx_ioctls[] = {
|
||||||
#define TDFX_IOCTL_COUNT DRM_ARRAY_SIZE(tdfx_ioctls)
|
#define TDFX_IOCTL_COUNT DRM_ARRAY_SIZE(tdfx_ioctls)
|
||||||
|
|
||||||
#ifdef MODULE
|
#ifdef MODULE
|
||||||
int init_module(void);
|
|
||||||
void cleanup_module(void);
|
|
||||||
static char *tdfx = NULL;
|
static char *tdfx = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
MODULE_AUTHOR("Precision Insight, Inc., Cedar Park, Texas.");
|
MODULE_AUTHOR("VA Linux Systems, Inc.");
|
||||||
MODULE_DESCRIPTION("tdfx");
|
MODULE_DESCRIPTION("tdfx");
|
||||||
MODULE_PARM(tdfx, "s");
|
MODULE_PARM(tdfx, "s");
|
||||||
|
|
||||||
/* init_module is called when insmod is used to load the module */
|
module_init(tdfx_init);
|
||||||
|
module_exit(tdfx_cleanup);
|
||||||
int init_module(void)
|
|
||||||
{
|
|
||||||
return tdfx_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* cleanup_module is called when rmmod is used to unload the module */
|
|
||||||
|
|
||||||
void cleanup_module(void)
|
|
||||||
{
|
|
||||||
tdfx_cleanup();
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef MODULE
|
#ifndef MODULE
|
||||||
/* tdfx_setup is called by the kernel to parse command-line options passed
|
/* tdfx_options is called by the kernel to parse command-line options
|
||||||
* via the boot-loader (e.g., LILO). It calls the insmod option routine,
|
* passed via the boot-loader (e.g., LILO). It calls the insmod option
|
||||||
* drm_parse_drm.
|
* routine, drm_parse_drm.
|
||||||
*
|
*/
|
||||||
* This is not currently supported, since it requires changes to
|
|
||||||
* linux/init/main.c. */
|
|
||||||
|
|
||||||
|
static int __init tdfx_options(char *str, int *ints)
|
||||||
void __init tdfx_setup(char *str, int *ints)
|
|
||||||
{
|
{
|
||||||
if (ints[0] != 0) {
|
|
||||||
DRM_ERROR("Illegal command line format, ignored\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
drm_parse_options(str);
|
drm_parse_options(str);
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__setup("tdfx=", tdfx_options);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int tdfx_setup(drm_device_t *dev)
|
static int tdfx_setup(drm_device_t *dev)
|
||||||
|
|
Loading…
Reference in New Issue