summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drm_drv.c15
-rw-r--r--linux-core/drm_vm.c16
-rw-r--r--linux-core/i810_drv.c20
-rw-r--r--linux-core/mga_drv.c21
-rw-r--r--linux-core/r128_drv.c20
-rw-r--r--linux-core/radeon_drv.c20
-rw-r--r--linux-core/tdfx_drv.c20
7 files changed, 109 insertions, 23 deletions
diff --git a/linux-core/drm_drv.c b/linux-core/drm_drv.c
index 87da5951..c5f231c7 100644
--- a/linux-core/drm_drv.c
+++ b/linux-core/drm_drv.c
@@ -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-core/drm_vm.c b/linux-core/drm_vm.c
index d17a1370..4db521de 100644
--- a/linux-core/drm_vm.c
+++ b/linux-core/drm_vm.c
@@ -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-core/i810_drv.c b/linux-core/i810_drv.c
index 09fa16b0..d21a19b7 100644
--- a/linux-core/i810_drv.c
+++ b/linux-core/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-core/mga_drv.c b/linux-core/mga_drv.c
index bea65cfa..91216d24 100644
--- a/linux-core/mga_drv.c
+++ b/linux-core/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-core/r128_drv.c b/linux-core/r128_drv.c
index 2fdcb158..4f0bb92b 100644
--- a/linux-core/r128_drv.c
+++ b/linux-core/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-core/radeon_drv.c b/linux-core/radeon_drv.c
index d7632667..49599bc8 100644
--- a/linux-core/radeon_drv.c
+++ b/linux-core/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-core/tdfx_drv.c b/linux-core/tdfx_drv.c
index f478395f..b6c95498 100644
--- a/linux-core/tdfx_drv.c
+++ b/linux-core/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"