aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_vm.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-12-11 05:34:35 -0500
committerDave Airlie <airlied@redhat.com>2013-12-17 20:20:04 -0500
commitd9906753bb997d651beaba0e4026a873bd0e8340 (patch)
tree08cfef0a3d712dc1354ce90cd489d33283d9cdcf /drivers/gpu/drm/drm_vm.c
parent8da79ccd1aaa2efe482b2c555c4684c7b503864a (diff)
drm: rip out drm_core_has_AGP
Most place actually want to just check for dev->agp (most do, but a few don't so this fixes a few potential NULL derefs). The only exception is the agp init code which should check for the AGP driver feature flag. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_vm.c')
-rw-r--r--drivers/gpu/drm/drm_vm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_vm.c b/drivers/gpu/drm/drm_vm.c
index 79873bb2923f..ef5540b6b451 100644
--- a/drivers/gpu/drm/drm_vm.c
+++ b/drivers/gpu/drm/drm_vm.c
@@ -101,7 +101,7 @@ static int drm_do_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
101 /* 101 /*
102 * Find the right map 102 * Find the right map
103 */ 103 */
104 if (!drm_core_has_AGP(dev)) 104 if (!dev->agp)
105 goto vm_fault_error; 105 goto vm_fault_error;
106 106
107 if (!dev->agp || !dev->agp->cant_use_aperture) 107 if (!dev->agp || !dev->agp->cant_use_aperture)
@@ -592,7 +592,7 @@ int drm_mmap_locked(struct file *filp, struct vm_area_struct *vma)
592 switch (map->type) { 592 switch (map->type) {
593#if !defined(__arm__) 593#if !defined(__arm__)
594 case _DRM_AGP: 594 case _DRM_AGP:
595 if (drm_core_has_AGP(dev) && dev->agp->cant_use_aperture) { 595 if (dev->agp && dev->agp->cant_use_aperture) {
596 /* 596 /*
597 * On some platforms we can't talk to bus dma address from the CPU, so for 597 * On some platforms we can't talk to bus dma address from the CPU, so for
598 * memory of type DRM_AGP, we'll deal with sorting out the real physical 598 * memory of type DRM_AGP, we'll deal with sorting out the real physical