summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux-core/ffb_context.c22
-rw-r--r--linux-core/ffb_drv.c3
-rw-r--r--linux-core/ffb_drv.h1
3 files changed, 12 insertions, 14 deletions
diff --git a/linux-core/ffb_context.c b/linux-core/ffb_context.c
index a7d5025b..c2b163ea 100644
--- a/linux-core/ffb_context.c
+++ b/linux-core/ffb_context.c
@@ -13,7 +13,7 @@
#include "drmP.h"
#include "ffb_drv.h"
-static int DRM(alloc_queue) (drm_device_t * dev, int is_2d_only) {
+static int ffb_alloc_queue(drm_device_t * dev, int is_2d_only) {
ffb_dev_priv_t *fpriv = (ffb_dev_priv_t *) dev->dev_private;
int i;
@@ -351,7 +351,7 @@ static void FFBWait(ffb_fbcPtr ffb)
} while (--limit);
}
-int DRM(context_switch) (drm_device_t * dev, int old, int new) {
+int ffb_context_switch(drm_device_t * dev, int old, int new) {
ffb_dev_priv_t *fpriv = (ffb_dev_priv_t *) dev->dev_private;
#if DRM_DMA_HISTOGRAM
@@ -375,7 +375,7 @@ int DRM(context_switch) (drm_device_t * dev, int old, int new) {
return 0;
}
-int DRM(resctx) (struct inode * inode, struct file * filp, unsigned int cmd,
+int ffb_resctx(struct inode * inode, struct file * filp, unsigned int cmd,
unsigned long arg) {
drm_ctx_res_t res;
drm_ctx_t ctx;
@@ -398,7 +398,7 @@ int DRM(resctx) (struct inode * inode, struct file * filp, unsigned int cmd,
return 0;
}
-int DRM(addctx) (struct inode * inode, struct file * filp, unsigned int cmd,
+int ffb_addctx(struct inode * inode, struct file * filp, unsigned int cmd,
unsigned long arg) {
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->dev;
@@ -407,7 +407,7 @@ int DRM(addctx) (struct inode * inode, struct file * filp, unsigned int cmd,
if (copy_from_user(&ctx, (drm_ctx_t __user *) arg, sizeof(ctx)))
return -EFAULT;
- idx = DRM(alloc_queue) (dev, (ctx.flags & _DRM_CONTEXT_2DONLY));
+ idx = ffb_alloc_queue(dev, (ctx.flags & _DRM_CONTEXT_2DONLY));
if (idx < 0)
return -ENFILE;
@@ -418,7 +418,7 @@ int DRM(addctx) (struct inode * inode, struct file * filp, unsigned int cmd,
return 0;
}
-int DRM(modctx) (struct inode * inode, struct file * filp, unsigned int cmd,
+int ffb_modctx(struct inode * inode, struct file * filp, unsigned int cmd,
unsigned long arg) {
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->dev;
@@ -446,7 +446,7 @@ int DRM(modctx) (struct inode * inode, struct file * filp, unsigned int cmd,
return 0;
}
-int DRM(getctx) (struct inode * inode, struct file * filp, unsigned int cmd,
+int ffb_getctx(struct inode * inode, struct file * filp, unsigned int cmd,
unsigned long arg) {
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->dev;
@@ -477,7 +477,7 @@ int DRM(getctx) (struct inode * inode, struct file * filp, unsigned int cmd,
return 0;
}
-int DRM(switchctx) (struct inode * inode, struct file * filp, unsigned int cmd,
+int ffb_switchctx(struct inode * inode, struct file * filp, unsigned int cmd,
unsigned long arg) {
drm_file_t *priv = filp->private_data;
drm_device_t *dev = priv->dev;
@@ -486,10 +486,10 @@ int DRM(switchctx) (struct inode * inode, struct file * filp, unsigned int cmd,
if (copy_from_user(&ctx, (drm_ctx_t __user *) arg, sizeof(ctx)))
return -EFAULT;
DRM_DEBUG("%d\n", ctx.handle);
- return DRM(context_switch) (dev, dev->last_context, ctx.handle);
+ return ffb_context_switch(dev, dev->last_context, ctx.handle);
}
-int DRM(newctx) (struct inode * inode, struct file * filp, unsigned int cmd,
+int ffb_newctx(struct inode * inode, struct file * filp, unsigned int cmd,
unsigned long arg) {
drm_ctx_t ctx;
@@ -500,7 +500,7 @@ int DRM(newctx) (struct inode * inode, struct file * filp, unsigned int cmd,
return 0;
}
-int DRM(rmctx) (struct inode * inode, struct file * filp, unsigned int cmd,
+int ffb_rmctx(struct inode * inode, struct file * filp, unsigned int cmd,
unsigned long arg) {
drm_ctx_t ctx;
drm_file_t *priv = filp->private_data;
diff --git a/linux-core/ffb_drv.c b/linux-core/ffb_drv.c
index 60cd8f74..5c4758a0 100644
--- a/linux-core/ffb_drv.c
+++ b/linux-core/ffb_drv.c
@@ -276,8 +276,6 @@ int ffb_presetup(drm_device_t *dev)
static int postinit( struct drm_device *dev, unsigned long flags )
{
- DRM(fops).get_unmapped_area = ffb_get_unmapped_area;
-
DRM_INFO( "Initialized %s %d.%d.%d %s on minor %d: %s\n",
DRIVER_NAME,
DRIVER_MAJOR,
@@ -326,6 +324,7 @@ static struct drm_driver_fn ffb_driver_fn = {
.ioctl = drm_ioctl,
.mmap = drm_mmap,
.fasync = drm_fasync,
+ .get_unmapped_area = ffb_get_unmapped_area,
},
};
diff --git a/linux-core/ffb_drv.h b/linux-core/ffb_drv.h
index 8761634e..f76b0d92 100644
--- a/linux-core/ffb_drv.h
+++ b/linux-core/ffb_drv.h
@@ -275,7 +275,6 @@ typedef struct ffb_dev_priv {
struct ffb_hw_context *hw_state[FFB_MAX_CTXS];
} ffb_dev_priv_t;
-extern struct file_operations DRM(fops);
extern unsigned long ffb_get_unmapped_area(struct file *filp,
unsigned long hint,
unsigned long len,