Source-Changes-HG archive

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

[src/riastradh-drm2]: src/sys/external/bsd/drm2/pci Move driver->bus setting ...



details:   https://anonhg.NetBSD.org/src/rev/00b39d542c65
branches:  riastradh-drm2
changeset: 788469:00b39d542c65
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Wed Jul 24 03:57:03 2013 +0000

description:
Move driver->bus setting to drm_pci_init.

diffstat:

 sys/external/bsd/drm2/pci/drm_pci.c |  20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diffs (46 lines):

diff -r 187228e4ffd4 -r 00b39d542c65 sys/external/bsd/drm2/pci/drm_pci.c
--- a/sys/external/bsd/drm2/pci/drm_pci.c       Wed Jul 24 03:56:49 2013 +0000
+++ b/sys/external/bsd/drm2/pci/drm_pci.c       Wed Jul 24 03:57:03 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_pci.c,v 1.1.2.5 2013/07/24 03:54:14 riastradh Exp $        */
+/*     $NetBSD: drm_pci.c,v 1.1.2.6 2013/07/24 03:57:03 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.1.2.5 2013/07/24 03:54:14 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_pci.c,v 1.1.2.6 2013/07/24 03:57:03 riastradh Exp $");
 
 #include <sys/types.h>
 #include <sys/errno.h>
@@ -73,13 +73,25 @@
        return &dev->pdev->pd_pa;
 }
 
+int
+drm_pci_init(struct drm_driver *driver, struct pci_driver *pdriver __unused)
+{
+
+       driver->bus = &drm_pci_bus;
+       return 0;
+}
+
+void
+drm_pci_exit(struct drm_driver *driver __unused,
+    struct pci_driver *pdriver __unused)
+{
+}
+
 void
 drm_pci_attach(device_t self, const struct pci_attach_args *pa,
     struct pci_dev *pdev, struct drm_device *dev)
 {
 
-       dev->driver->bus = &drm_pci_bus;
-
        linux_pci_dev_init(pdev, self, pa, 0);
 
        dev->pdev = pdev;



Home | Main Index | Thread Index | Old Index