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/drm Let drm_fill_in_dev initi...
details: https://anonhg.NetBSD.org/src/rev/524a459c99f0
branches: riastradh-drm2
changeset: 788475:524a459c99f0
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jul 24 03:58:36 2013 +0000
description:
Let drm_fill_in_dev initialize dev->driver after all.
diffstat:
sys/external/bsd/drm2/drm/drm_drv.c | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
diffs (45 lines):
diff -r 17707cabe5c8 -r 524a459c99f0 sys/external/bsd/drm2/drm/drm_drv.c
--- a/sys/external/bsd/drm2/drm/drm_drv.c Wed Jul 24 03:58:19 2013 +0000
+++ b/sys/external/bsd/drm2/drm/drm_drv.c Wed Jul 24 03:58:36 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_drv.c,v 1.1.2.19 2013/07/24 03:58:19 riastradh Exp $ */
+/* $NetBSD: drm_drv.c,v 1.1.2.20 2013/07/24 03:58:36 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_drv.c,v 1.1.2.19 2013/07/24 03:58:19 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_drv.c,v 1.1.2.20 2013/07/24 03:58:36 riastradh Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -271,7 +271,6 @@
sc->sc_initialized = false; /* paranoia */
- dev->driver = daa->daa_driver;
sc->sc_drm_dev = dev;
sc->sc_opencount = 0;
@@ -294,16 +293,13 @@
sizeof(sc->sc_minor[i].mode_group));
}
- /*
- * XXX drm_fill_in_dev reinitializes dev->driver as an artefact
- * of Linux's driver attachment goop. Harmless.
- */
- error = drm_fill_in_dev(dev, NULL, dev->driver);
+ error = drm_fill_in_dev(dev, NULL, daa->daa_driver);
if (error) {
aprint_error_dev(parent, "unable to initialize drm: %d\n",
error);
goto fail0;
}
+ KASSERT(dev->driver == daa->daa_driver);
if (dev->driver->load != NULL) {
error = (*dev->driver->load)(dev, daa->daa_flags);
Home |
Main Index |
Thread Index |
Old Index