From 5d63766f92d6aacd771382e69ca8d5e9e5a8e009 Mon Sep 17 00:00:00 2001 From: Leif Delgass Date: Thu, 23 May 2002 16:54:01 +0000 Subject: [PATCH] Add conditional definition of list_for_each_safe for earlier kernels. --- linux/mach64_dma.c | 6 ++---- linux/mach64_drv.h | 8 +++++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/linux/mach64_dma.c b/linux/mach64_dma.c index 3fe94a2d..0757f2e3 100644 --- a/linux/mach64_dma.c +++ b/linux/mach64_dma.c @@ -34,8 +34,6 @@ #include "mach64_drv.h" #include /* For task queue support */ -#include -#include int mach64_do_cleanup_dma( drm_device_t *dev ); int mach64_handle_dma( drm_mach64_private_t *dev_priv ); @@ -180,10 +178,10 @@ int mach64_do_wait_for_dma( drm_mach64_private_t *dev_priv ) } udelay( 1 ); } - + if (ret != 0) DRM_INFO( "do_wait_for_dma failed! GUI_STAT=0x%08x\n", MACH64_READ( MACH64_GUI_STAT ) ); - + return ret; } diff --git a/linux/mach64_drv.h b/linux/mach64_drv.h index 92028784..bafd7c9a 100644 --- a/linux/mach64_drv.h +++ b/linux/mach64_drv.h @@ -32,8 +32,14 @@ #ifndef __MACH64_DRV_H__ #define __MACH64_DRV_H__ -#include #include +#include + +#ifndef list_for_each_safe +#define list_for_each_safe(pos, n, head) \ + for (pos = (head)->next, n = pos->next; pos != (head); \ + pos = n, n = pos->next) +#endif /* Development driver options - FIXME: remove these when not needed */