From bef7017749c9d3af733bdca4863a012f5d6506d3 Mon Sep 17 00:00:00 2001 From: Michel Daenzer Date: Fri, 25 Jul 2003 10:50:39 +0000 Subject: Compile fixes for recent 2.5/2.6 Linux kernels. I hope this doesn't break the i830 driver or the BSDs. :) --- linux-core/drm_os_linux.h | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'linux-core/drm_os_linux.h') diff --git a/linux-core/drm_os_linux.h b/linux-core/drm_os_linux.h index 66804c5b..94230dc4 100644 --- a/linux-core/drm_os_linux.h +++ b/linux-core/drm_os_linux.h @@ -34,8 +34,28 @@ #define DRM_DEVICE drm_file_t *priv = filp->private_data; \ drm_device_t *dev = priv->dev -/** IRQ handler arguments */ -#define DRM_IRQ_ARGS int irq, void *arg, struct pt_regs *regs +/** 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 +#endif + +/** AGP types */ +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,70) +#define DRM_AGP_MEM agp_memory +#define DRM_AGP_KERN agp_kern_info +#else +#define DRM_AGP_MEM struct agp_memory +#define DRM_AGP_KERN struct agp_kern_info +#endif + /** Task queue handler arguments */ #define DRM_TASKQUEUE_ARGS void *arg -- cgit v1.2.3