Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/via Call linux_pci_dev_init/destroy in...



details:   https://anonhg.NetBSD.org/src/rev/dbecdf71efc7
branches:  trunk
changeset: 835325:dbecdf71efc7
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 14:12:44 2018 +0000

description:
Call linux_pci_dev_init/destroy in viadrmums(4) too.

diffstat:

 sys/external/bsd/drm2/via/via_pci.c |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (38 lines):

diff -r cd94a678f843 -r dbecdf71efc7 sys/external/bsd/drm2/via/via_pci.c
--- a/sys/external/bsd/drm2/via/via_pci.c       Mon Aug 27 14:12:29 2018 +0000
+++ b/sys/external/bsd/drm2/via/via_pci.c       Mon Aug 27 14:12:44 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: via_pci.c,v 1.2 2015/04/29 12:30:43 riastradh Exp $    */
+/*     $NetBSD: via_pci.c,v 1.3 2018/08/27 14:12:44 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: via_pci.c,v 1.2 2015/04/29 12:30:43 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: via_pci.c,v 1.3 2018/08/27 14:12:44 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/device.h>
@@ -116,6 +116,9 @@
        if (!pmf_device_register(self, NULL, NULL))
                aprint_error_dev(self, "couldn't establish power handler\n");
 
+       /* Initialize the Linux PCI device descriptor.  */
+       linux_pci_dev_init(&sc->sc_pci_dev, self, device_parent(self), pa, 0);
+
        /* XXX errno Linux->NetBSD */
        error = -drm_pci_attach(self, pa, &sc->sc_pci_dev, via_drm_driver,
            *cookiep, &sc->sc_drm_dev);
@@ -141,6 +144,8 @@
        if (error)
                return error;
        sc->sc_drm_dev = NULL;
+
+out:   linux_pci_dev_destroy(&sc->sc_pci_dev);
        pmf_device_deregister(self);
-out:   return 0;
+       return 0;
 }



Home | Main Index | Thread Index | Old Index