diff options
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drmP.h | 2 | ||||
-rw-r--r-- | linux/drm_os_linux.h | 16 | ||||
-rw-r--r-- | linux/gamma_dma.c | 6 | ||||
-rw-r--r-- | linux/i830_irq.c | 8 |
4 files changed, 14 insertions, 18 deletions
diff --git a/linux/drmP.h b/linux/drmP.h index 7e052a86..e80f7788 100644 --- a/linux/drmP.h +++ b/linux/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/drm_os_linux.h b/linux/drm_os_linux.h index 94230dc4..38a5769e 100644 --- a/linux/drm_os_linux.h +++ b/linux/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/gamma_dma.c b/linux/gamma_dma.c index 85a9c084..3fc6c9f8 100644 --- a/linux/gamma_dma.c +++ b/linux/gamma_dma.c @@ -105,7 +105,7 @@ static inline int gamma_dma_is_ready(drm_device_t *dev) return(!GAMMA_READ(GAMMA_DMACOUNT)); } -DRM_IRQ_RET gamma_dma_service( DRM_IRQ_ARGS ) +irqreturn_t gamma_dma_service( DRM_IRQ_ARGS ) { drm_device_t *dev = (drm_device_t *)arg; drm_device_dma_t *dma = dev->dma; @@ -121,7 +121,7 @@ DRM_IRQ_RET gamma_dma_service( DRM_IRQ_ARGS ) GAMMA_WRITE(GAMMA_GINTFLAGS, 0x2001); if (gamma_dma_is_ready(dev)) { /* Free previous buffer */ - if (test_and_set_bit(0, &dev->dma_flag)) return DRM_IRQ_HANDLED; + if (test_and_set_bit(0, &dev->dma_flag)) return IRQ_HANDLED; if (dma->this_buffer) { gamma_free_buffer(dev, dma->this_buffer); dma->this_buffer = NULL; @@ -136,7 +136,7 @@ DRM_IRQ_RET gamma_dma_service( DRM_IRQ_ARGS ) schedule_work(&dev->work); #endif } - return DRM_IRQ_HANDLED; + return IRQ_HANDLED; } /* Only called by gamma_dma_schedule. */ diff --git a/linux/i830_irq.c b/linux/i830_irq.c index 301afc8a..d2aabf33 100644 --- a/linux/i830_irq.c +++ b/linux/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; } |