summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drmP.h2
-rw-r--r--linux-core/drm_os_linux.h16
-rw-r--r--linux-core/i830_irq.c8
3 files changed, 11 insertions, 15 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h
index 7e052a86..e80f7788 100644
--- a/linux-core/drmP.h
+++ b/linux-core/drmP.h
@@ -937,7 +937,7 @@ extern int DRM(control)( struct inode *inode, struct file *filp,
unsigned int cmd, unsigned long arg );
extern int DRM(irq_install)( drm_device_t *dev, int irq );
extern int DRM(irq_uninstall)( drm_device_t *dev );
-extern DRM_IRQ_RET DRM(dma_service)( DRM_IRQ_ARGS );
+extern irqreturn_t DRM(dma_service)( DRM_IRQ_ARGS );
extern void DRM(driver_irq_preinstall)( drm_device_t *dev );
extern void DRM(driver_irq_postinstall)( drm_device_t *dev );
extern void DRM(driver_irq_uninstall)( drm_device_t *dev );
diff --git a/linux-core/drm_os_linux.h b/linux-core/drm_os_linux.h
index 94230dc4..38a5769e 100644
--- a/linux-core/drm_os_linux.h
+++ b/linux-core/drm_os_linux.h
@@ -33,18 +33,14 @@
/** DRM device local declaration */
#define DRM_DEVICE drm_file_t *priv = filp->private_data; \
drm_device_t *dev = priv->dev
-
+
/** IRQ handler arguments and return type and values */
#define DRM_IRQ_ARGS int irq, void *arg, struct pt_regs *regs
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,69)
-#define DRM_IRQ_RET void
-#define DRM_IRQ_NONE
-#define DRM_IRQ_HANDLED
-#else
-#define DRM_IRQ_RET irqreturn_t
-#define DRM_IRQ_NONE IRQ_NONE
-#define DRM_IRQ_HANDLED IRQ_HANDLED
+/** backwards compatibility with old irq return values */
+#ifndef IRQ_HANDLED
+typedef void irqreturn_t;
+#define IRQ_HANDLED /* nothing */
+#define IRQ_NONE /* nothing */
#endif
/** AGP types */
diff --git a/linux-core/i830_irq.c b/linux-core/i830_irq.c
index 301afc8a..d2aabf33 100644
--- a/linux-core/i830_irq.c
+++ b/linux-core/i830_irq.c
@@ -36,9 +36,9 @@
#include <linux/delay.h>
-DRM_IRQ_RET DRM(dma_service)( DRM_IRQ_ARGS )
+irqreturn_t DRM(dma_service)( DRM_IRQ_ARGS )
{
- drm_device_t *dev = (drm_device_t *)device;
+ drm_device_t *dev = (drm_device_t *)arg;
drm_i830_private_t *dev_priv = (drm_i830_private_t *)dev->dev_private;
u16 temp;
@@ -46,14 +46,14 @@ DRM_IRQ_RET DRM(dma_service)( DRM_IRQ_ARGS )
DRM_DEBUG("%x\n", temp);
if ( !( temp & 2 ) )
- return DRM_IRQ_NONE;
+ return IRQ_NONE;
I830_WRITE16(I830REG_INT_IDENTITY_R, temp);
atomic_inc(&dev_priv->irq_received);
wake_up_interruptible(&dev_priv->irq_queue);
- return DRM_IRQ_HANDLED;
+ return IRQ_HANDLED;
}