Module Name:    src
Committed By:   riastradh
Date:           Sun Dec 19 11:54:32 UTC 2021

Modified Files:
        src/sys/external/bsd/drm2/pci: drm_pci.c

Log Message:
drm: Simplify -- remove drm_pci_agp_destroy.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/external/bsd/drm2/pci/drm_pci.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/external/bsd/drm2/pci/drm_pci.c
diff -u src/sys/external/bsd/drm2/pci/drm_pci.c:1.46 src/sys/external/bsd/drm2/pci/drm_pci.c:1.47
--- src/sys/external/bsd/drm2/pci/drm_pci.c:1.46	Sun Dec 19 11:53:51 2021
+++ src/sys/external/bsd/drm2/pci/drm_pci.c	Sun Dec 19 11:54:32 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: drm_pci.c,v 1.46 2021/12/19 11:53:51 riastradh Exp $	*/
+/*	$NetBSD: drm_pci.c,v 1.47 2021/12/19 11:54:32 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.46 2021/12/19 11:53:51 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.47 2021/12/19 11:54:32 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/errno.h>
@@ -140,7 +140,11 @@ drm_pci_detach(struct drm_device *dev)
 {
 
 	/* Tear down AGP stuff if necessary.  */
-	drm_pci_agp_destroy(dev);
+	if (dev->agp) {
+		arch_phys_wc_del(dev->agp->agp_mtrr);
+		drm_agp_fini(dev);
+		KASSERT(dev->agp == NULL);
+	}
 
 	/* Free the record of available bus space mappings.  */
 	dev->bus_nmaps = 0;
@@ -152,17 +156,6 @@ drm_pci_detach(struct drm_device *dev)
 	}
 }
 
-void
-drm_pci_agp_destroy(struct drm_device *dev)
-{
-
-	if (dev->agp) {
-		arch_phys_wc_del(dev->agp->agp_mtrr);
-		drm_agp_fini(dev);
-		KASSERT(dev->agp == NULL);
-	}
-}
-
 int
 drm_pci_request_irq(struct drm_device *dev, int flags)
 {

Reply via email to