- Clean up the way customization of the templates is done.
- Fix old-style DMA for gamma driver (please test).
- Pull out IRQ handling into drm_dma.h (please test on i810, gamma).
- Lots of general cleanups, remove compiler warnings etc.
diff --git a/linux/drm_drv.h b/linux/drm_drv.h
index b24d213..71f5227 100644
--- a/linux/drm_drv.h
+++ b/linux/drm_drv.h
@@ -687,7 +687,7 @@
 					DRM_KERNEL_CONTEXT );
 		}
 	}
-#else
+#elif __HAVE_DMA
 	DRM(reclaim_buffers)( dev, priv->pid );
 #endif
 
@@ -794,7 +794,7 @@
 #if __HAVE_MULTIPLE_DMA_QUEUES
 	drm_queue_t *q;
 #endif
-#if DRM_DMA_HISTOGRAM
+#if __HAVE_DMA_HISTOGRAM
         cycles_t start;
 
         dev->lck_start = start = get_cycles();
@@ -882,7 +882,7 @@
 
         DRM_DEBUG( "%d %s\n", lock.context, ret ? "interrupted" : "has lock" );
 
-#if DRM_DMA_HISTOGRAM
+#if __HAVE_DMA_HISTOGRAM
         atomic_inc(&dev->histo.lacq[DRM(histogram_slot)(get_cycles()-start)]);
 #endif
         return ret;