From da6b44849763fac5ccb7d7511128454c6c2a92c7 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 30 Aug 2004 11:34:51 +0000 Subject: implement drm_core_check_feature and use it .. looks lots nicer --- linux/drm_memory.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'linux/drm_memory.h') diff --git a/linux/drm_memory.h b/linux/drm_memory.h index 669bef08..38084ccc 100644 --- a/linux/drm_memory.h +++ b/linux/drm_memory.h @@ -144,7 +144,7 @@ drm_follow_page (void *vaddr) static inline void *drm_ioremap(unsigned long offset, unsigned long size, drm_device_t *dev) { #if __OS_HAS_AGP && defined(VMAP_4_ARGS) - if ( (dev->driver_features & DRIVER_USE_AGP) && dev->agp && dev->agp->cant_use_aperture) { + if ( drm_core_check_feature(dev, DRIVER_USE_AGP) && dev->agp && dev->agp->cant_use_aperture) { drm_map_t *map = drm_lookup_map(offset, size, dev); if (map && map->type == _DRM_AGP) @@ -159,7 +159,7 @@ static inline void *drm_ioremap_nocache(unsigned long offset, unsigned long size drm_device_t *dev) { #if __OS_HAS_AGP&& defined(VMAP_4_ARGS) - if ( (dev->driver_features & DRIVER_USE_AGP) && dev->agp && dev->agp->cant_use_aperture) { + if ( drm_core_check_feature(dev, DRIVER_USE_AGP) && dev->agp && dev->agp->cant_use_aperture) { drm_map_t *map = drm_lookup_map(offset, size, dev); if (map && map->type == _DRM_AGP) @@ -178,7 +178,7 @@ static inline void drm_ioremapfree(void *pt, unsigned long size, drm_device_t *d * routines for handling mappings in the AGP space. Hopefully this can be done in * a future revision of the interface... */ - if ((dev->driver_features & DRIVER_USE_AGP) && dev->agp && dev->agp->cant_use_aperture + if (drm_core_check_feature(dev, DRIVER_USE_AGP) && dev->agp && dev->agp->cant_use_aperture && ((unsigned long) pt >= VMALLOC_START && (unsigned long) pt < VMALLOC_END)) { unsigned long offset; -- cgit v1.2.3