Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci only try to attach child drivers if they're actu...
details: https://anonhg.NetBSD.org/src/rev/9003db312f47
branches: trunk
changeset: 772012:9003db312f47
user: macallan <macallan%NetBSD.org@localhost>
date: Tue Dec 13 14:41:55 2011 +0000
description:
only try to attach child drivers if they're actually present
diffstat:
sys/dev/pci/voyager.c | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diffs (47 lines):
diff -r 92f0d44276dd -r 9003db312f47 sys/dev/pci/voyager.c
--- a/sys/dev/pci/voyager.c Tue Dec 13 14:39:37 2011 +0000
+++ b/sys/dev/pci/voyager.c Tue Dec 13 14:41:55 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: voyager.c,v 1.7 2011/12/07 09:08:00 macallan Exp $ */
+/* $NetBSD: voyager.c,v 1.8 2011/12/13 14:41:55 macallan Exp $ */
/*
* Copyright (c) 2009, 2011 Michael Lorenz
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: voyager.c,v 1.7 2011/12/07 09:08:00 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: voyager.c,v 1.8 2011/12/13 14:41:55 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -50,6 +50,8 @@
#include <dev/pci/voyagervar.h>
#include "opt_voyager.h"
+#include "voyagerfb.h"
+#include "pwmclock.h"
#ifdef VOYAGER_DEBUG
#define DPRINTF aprint_normal
@@ -218,13 +220,18 @@
vaa.vaa_tag = sc->sc_memt;
vaa.vaa_pc = sc->sc_pc;
vaa.vaa_pcitag = sc->sc_pcitag;
+#if NVOYAGERFB > 0
strcpy(vaa.vaa_name, "voyagerfb");
config_found_ia(sc->sc_dev, "voyagerbus", &vaa, voyager_print);
+#endif
+#if NPWMCLOCK > 0
strcpy(vaa.vaa_name, "pwmclock");
config_found_ia(sc->sc_dev, "voyagerbus", &vaa, voyager_print);
+#endif
+#ifdef notyet
strcpy(vaa.vaa_name, "vac");
config_found_ia(sc->sc_dev, "voyagerbus", &vaa, voyager_print);
-
+#endif
/* we use this mutex wether there's an i2c bus or not */
mutex_init(&sc->sc_i2c_lock, MUTEX_DEFAULT, IPL_NONE);
Home |
Main Index |
Thread Index |
Old Index