From be326fc791cc1abb0933fc184a76e85085dcfcb6 Mon Sep 17 00:00:00 2001 From: oga Date: Sun, 17 Aug 2008 15:31:39 +0000 Subject: [PATCH] Kill some redundant ifdefs, they're taken care of elsewhere. --- sys/dev/pci/drm/drm_agpsupport.c | 6 ++++-- sys/dev/pci/drm/drm_bufs.c | 4 ---- sys/dev/pci/drm/drm_drv.c | 4 ---- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/sys/dev/pci/drm/drm_agpsupport.c b/sys/dev/pci/drm/drm_agpsupport.c index ea8a5c1b75a..8a9e38da066 100644 --- a/sys/dev/pci/drm/drm_agpsupport.c +++ b/sys/dev/pci/drm/drm_agpsupport.c @@ -378,6 +378,7 @@ drm_agp_free_ioctl(struct drm_device *dev, void *data, drm_agp_head_t * drm_agp_init(void) { +#ifndef DRM_NO_AGP struct device *agpdev; drm_agp_head_t *head = NULL; int agp_available = 1; @@ -393,13 +394,14 @@ drm_agp_init(void) if (head == NULL) return NULL; head->agpdev = agpdev; -#ifndef DRM_NO_AGP agp_get_info(agpdev, &head->info); -#endif head->base = head->info.ai_aperture_base; TAILQ_INIT(&head->memory); } return head; +#else + return (NULL); +#endif } void * diff --git a/sys/dev/pci/drm/drm_bufs.c b/sys/dev/pci/drm/drm_bufs.c index 60c0cd463ac..b14d2faa437 100644 --- a/sys/dev/pci/drm/drm_bufs.c +++ b/sys/dev/pci/drm/drm_bufs.c @@ -200,10 +200,8 @@ drm_addmap(struct drm_device * dev, unsigned long offset, unsigned long size, break; /* FALLTHROUGH */ case _DRM_FRAME_BUFFER: -#ifndef DRM_NO_MTRR if (drm_mtrr_add(map->offset, map->size, DRM_MTRR_WC) == 0) map->mtrr = 1; -#endif break; case _DRM_AGP: /*valid = 0;*/ @@ -346,7 +344,6 @@ drm_rmmap(struct drm_device *dev, drm_local_map_t *map) drm_ioremapfree(map); /* FALLTHROUGH */ case _DRM_FRAME_BUFFER: -#ifndef DRM_NO_MTRR if (map->mtrr) { int retcode; @@ -354,7 +351,6 @@ drm_rmmap(struct drm_device *dev, drm_local_map_t *map) DRM_MTRR_WC); DRM_DEBUG("mtrr_del = %d\n", retcode); } -#endif break; case _DRM_AGP: case _DRM_SCATTER_GATHER: diff --git a/sys/dev/pci/drm/drm_drv.c b/sys/dev/pci/drm/drm_drv.c index 476fd9906af..646d9400dbf 100644 --- a/sys/dev/pci/drm/drm_drv.c +++ b/sys/dev/pci/drm/drm_drv.c @@ -419,13 +419,11 @@ drm_load(struct drm_device *dev) retcode = ENOMEM; goto error; } -#ifndef DRM_NO_MTRR if (dev->agp != NULL) { if (drm_mtrr_add(dev->agp->info.ai_aperture_base, dev->agp->info.ai_aperture_size, DRM_MTRR_WC) == 0) dev->agp->mtrr = 1; } -#endif } retcode = drm_ctxbitmap_init(dev); @@ -456,7 +454,6 @@ drm_unload(struct drm_device *dev) drm_memrange_takedown(&dev->handle_mm); -#if !defined(DRM_NO_MTRR) && !defined(DRM_NO_AGP) if (dev->agp && dev->agp->mtrr) { int retcode; @@ -464,7 +461,6 @@ drm_unload(struct drm_device *dev) dev->agp->info.ai_aperture_size, DRM_MTRR_WC); DRM_DEBUG("mtrr_del = %d", retcode); } -#endif DRM_LOCK(); drm_lastclose(dev); -- 2.20.1