Remove driver.device_is_agp code duplicated in drm_device_find_capability,
authorEric Anholt <anholt@freebsd.org>
Mon, 5 Dec 2005 10:53:06 +0000 (10:53 +0000)
committerEric Anholt <anholt@freebsd.org>
Mon, 5 Dec 2005 10:53:06 +0000 (10:53 +0000)
    when it really wanted to live in drm_device_is_agp.

bsd-core/drm_agpsupport.c

index 0a56510..92fb8e0 100644 (file)
@@ -44,14 +44,6 @@ drm_device_find_capability(drm_device_t *dev, int cap)
 {
        int ret;
 
-       if (dev->driver.device_is_agp != NULL) {
-               ret = (*dev->driver.device_is_agp)(dev);
-               
-               if (ret != DRM_MIGHT_BE_AGP) {
-                       return ret == 2;
-               }
-       }
-
 #ifdef __FreeBSD__
        /* Code taken from agp.c.  IWBNI that was a public interface. */
        u_int32_t status;
@@ -96,7 +88,7 @@ int drm_device_is_agp(drm_device_t *dev)
                 * AGP, 2 = fall back to PCI capability
                 */
                ret = (*dev->driver.device_is_agp)(dev);
-               if (ret != 2)
+               if (ret != DRM_MIGHT_BE_AGP)
                        return ret;
        }