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>
This commit is contained in:
Daniel Vetter
2013-12-11 11:34:35 +01:00
committed by Dave Airlie
parent 8da79ccd1a
commit d9906753bb
7 changed files with 11 additions and 26 deletions

View File

@@ -439,7 +439,7 @@ void drm_agp_clear(struct drm_device *dev)
{
struct drm_agp_mem *entry, *tempe;
if (!drm_core_has_AGP(dev) || !dev->agp)
if (!dev->agp)
return;
if (drm_core_check_feature(dev, DRIVER_MODESET))
return;