summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorJeff Hartmann <jhartmann@valinux.com>2001-07-23 20:25:38 +0000
committerJeff Hartmann <jhartmann@valinux.com>2001-07-23 20:25:38 +0000
commit84a5e7108773d5a5ff7242e1460c98e3acb178a8 (patch)
tree62e3c17333ae2779706f5b9823a3be9c1de9de9d /linux
parent5e8ba79eb6aabd85f52de43fcf30722268857f60 (diff)
Fixes that allow the modules to be built into the kernel
Diffstat (limited to 'linux')
-rw-r--r--linux/drm_drv.h15
-rw-r--r--linux/drm_vm.h16
-rw-r--r--linux/gamma_drv.c21
-rw-r--r--linux/i810_drv.c20
-rw-r--r--linux/mga_drv.c21
-rw-r--r--linux/r128_drv.c20
-rw-r--r--linux/radeon_drv.c20
-rw-r--r--linux/tdfx_drv.c20
8 files changed, 130 insertions, 23 deletions
diff --git a/linux/drm_drv.h b/linux/drm_drv.h
index 87da5951..c5f231c7 100644
--- a/linux/drm_drv.h
+++ b/linux/drm_drv.h
@@ -201,21 +201,6 @@ MODULE_AUTHOR( DRIVER_AUTHOR );
MODULE_DESCRIPTION( DRIVER_DESC );
MODULE_PARM( drm_opts, "s" );
-#ifndef MODULE
-/* DRM(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, drm_parse_drm.
- */
-
-static int __init DRM(options)( char *str )
-{
- DRM(parse_options)( str );
- return 1;
-}
-
-__setup( DRIVER_NAME "=", DRM(options) );
-#endif
-
static int DRM(setup)( drm_device_t *dev )
{
int i;
diff --git a/linux/drm_vm.h b/linux/drm_vm.h
index d17a1370..4db521de 100644
--- a/linux/drm_vm.h
+++ b/linux/drm_vm.h
@@ -32,25 +32,25 @@
#define __NO_VERSION__
#include "drmP.h"
-struct vm_operations_struct drm_vm_ops = {
+struct vm_operations_struct DRM(vm_ops) = {
nopage: DRM(vm_nopage),
open: DRM(vm_open),
close: DRM(vm_close),
};
-struct vm_operations_struct drm_vm_shm_ops = {
+struct vm_operations_struct DRM(vm_shm_ops) = {
nopage: DRM(vm_shm_nopage),
open: DRM(vm_open),
close: DRM(vm_shm_close),
};
-struct vm_operations_struct drm_vm_dma_ops = {
+struct vm_operations_struct DRM(vm_dma_ops) = {
nopage: DRM(vm_dma_nopage),
open: DRM(vm_open),
close: DRM(vm_close),
};
-struct vm_operations_struct drm_vm_sg_ops = {
+struct vm_operations_struct DRM(vm_sg_ops) = {
nopage: DRM(vm_sg_nopage),
open: DRM(vm_open),
close: DRM(vm_close),
@@ -352,7 +352,7 @@ int DRM(mmap_dma)(struct file *filp, struct vm_area_struct *vma)
}
unlock_kernel();
- vma->vm_ops = &drm_vm_dma_ops;
+ vma->vm_ops = &DRM(vm_dma_ops);
vma->vm_flags |= VM_LOCKED | VM_SHM; /* Don't swap */
#if LINUX_VERSION_CODE < 0x020203 /* KERNEL_VERSION(2,2,3) */
@@ -446,10 +446,10 @@ int DRM(mmap)(struct file *filp, struct vm_area_struct *vma)
" offset = 0x%lx\n",
map->type,
vma->vm_start, vma->vm_end, VM_OFFSET(vma) + offset);
- vma->vm_ops = &drm_vm_ops;
+ vma->vm_ops = &DRM(vm_ops);
break;
case _DRM_SHM:
- vma->vm_ops = &drm_vm_shm_ops;
+ vma->vm_ops = &DRM(vm_shm_ops);
#if LINUX_VERSION_CODE >= 0x020300
vma->vm_private_data = (void *)map;
#else
@@ -460,7 +460,7 @@ int DRM(mmap)(struct file *filp, struct vm_area_struct *vma)
vma->vm_flags |= VM_LOCKED;
break;
case _DRM_SCATTER_GATHER:
- vma->vm_ops = &drm_vm_sg_ops;
+ vma->vm_ops = &DRM(vm_sg_ops);
#if LINUX_VERSION_CODE >= 0x020300
vma->vm_private_data = (void *)map;
#else
diff --git a/linux/gamma_drv.c b/linux/gamma_drv.c
index 98916bc5..c05465c5 100644
--- a/linux/gamma_drv.c
+++ b/linux/gamma_drv.c
@@ -62,6 +62,27 @@
#include "drm_dma.h"
#include "drm_drawable.h"
#include "drm_drv.h"
+
+#ifndef MODULE
+/* DRM(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, drm_parse_drm.
+ */
+
+/* JH- We have to hand expand the string ourselves because of the cpp. If
+ * anyone can think of a way that we can fit into the __setup macro without
+ * changing it, then please send the solution my way.
+ */
+static int __init gamma_options( char *str )
+{
+ DRM(parse_options)( str );
+ return 1;
+}
+
+__setup( DRIVER_NAME "=", gamma_options );
+#endif
+
+
#include "drm_fops.h"
#include "drm_init.h"
#include "drm_ioctl.h"
diff --git a/linux/i810_drv.c b/linux/i810_drv.c
index 09fa16b0..d21a19b7 100644
--- a/linux/i810_drv.c
+++ b/linux/i810_drv.c
@@ -71,6 +71,26 @@
#include "drm_dma.h"
#include "drm_drawable.h"
#include "drm_drv.h"
+
+#ifndef MODULE
+/* DRM(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, drm_parse_drm.
+ */
+
+/* JH- We have to hand expand the string ourselves because of the cpp. If
+ * anyone can think of a way that we can fit into the __setup macro without
+ * changing it, then please send the solution my way.
+ */
+static int __init i810_options( char *str )
+{
+ DRM(parse_options)( str );
+ return 1;
+}
+
+__setup( DRIVER_NAME "=", i810_options );
+#endif
+
#include "drm_fops.h"
#include "drm_init.h"
#include "drm_ioctl.h"
diff --git a/linux/mga_drv.c b/linux/mga_drv.c
index bea65cfa..91216d24 100644
--- a/linux/mga_drv.c
+++ b/linux/mga_drv.c
@@ -70,6 +70,27 @@
#include "drm_dma.h"
#include "drm_drawable.h"
#include "drm_drv.h"
+
+#ifndef MODULE
+/* DRM(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, drm_parse_drm.
+ */
+
+/* JH- We have to hand expand the string ourselves because of the cpp. If
+ * anyone can think of a way that we can fit into the __setup macro without
+ * changing it, then please send the solution my way.
+ */
+static int __init mga_options( char *str )
+{
+ DRM(parse_options)( str );
+ return 1;
+}
+
+__setup( DRIVER_NAME "=", mga_options );
+#endif
+
+
#include "drm_fops.h"
#include "drm_init.h"
#include "drm_ioctl.h"
diff --git a/linux/r128_drv.c b/linux/r128_drv.c
index 2fdcb158..4f0bb92b 100644
--- a/linux/r128_drv.c
+++ b/linux/r128_drv.c
@@ -81,6 +81,26 @@
#include "drm_dma.h"
#include "drm_drawable.h"
#include "drm_drv.h"
+
+#ifndef MODULE
+/* DRM(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, drm_parse_drm.
+ */
+
+/* JH- We have to hand expand the string ourselves because of the cpp. If
+ * anyone can think of a way that we can fit into the __setup macro without
+ * changing it, then please send the solution my way.
+ */
+static int __init r128_options( char *str )
+{
+ DRM(parse_options)( str );
+ return 1;
+}
+
+__setup( DRIVER_NAME "=", r128_options );
+#endif
+
#include "drm_fops.h"
#include "drm_init.h"
#include "drm_ioctl.h"
diff --git a/linux/radeon_drv.c b/linux/radeon_drv.c
index d7632667..49599bc8 100644
--- a/linux/radeon_drv.c
+++ b/linux/radeon_drv.c
@@ -78,6 +78,26 @@
#include "drm_dma.h"
#include "drm_drawable.h"
#include "drm_drv.h"
+
+#ifndef MODULE
+/* DRM(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, drm_parse_drm.
+ */
+
+/* JH- We have to hand expand the string ourselves because of the cpp. If
+ * anyone can think of a way that we can fit into the __setup macro without
+ * changing it, then please send the solution my way.
+ */
+static int __init radeon_options( char *str )
+{
+ DRM(parse_options)( str );
+ return 1;
+}
+
+__setup( DRIVER_NAME "=", radeon_options );
+#endif
+
#include "drm_fops.h"
#include "drm_init.h"
#include "drm_ioctl.h"
diff --git a/linux/tdfx_drv.c b/linux/tdfx_drv.c
index f478395f..b6c95498 100644
--- a/linux/tdfx_drv.c
+++ b/linux/tdfx_drv.c
@@ -51,6 +51,26 @@
#include "drm_dma.h"
#include "drm_drawable.h"
#include "drm_drv.h"
+
+#ifndef MODULE
+/* DRM(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, drm_parse_drm.
+ */
+
+/* JH- We have to hand expand the string ourselves because of the cpp. If
+ * anyone can think of a way that we can fit into the __setup macro without
+ * changing it, then please send the solution my way.
+ */
+static int __init tdfx_options( char *str )
+{
+ DRM(parse_options)( str );
+ return 1;
+}
+
+__setup( DRIVER_NAME "=", tdfx_options );
+#endif
+
#include "drm_fops.h"
#include "drm_init.h"
#include "drm_ioctl.h"