Module Name:    src
Committed By:   dyoung
Date:           Wed Apr  8 17:08:03 UTC 2009

Modified Files:
        src/sys/arch/i386/i386: mainbus.c

Log Message:
Remove redundant declaration of mainbus_attach(), as pointed out by
Thomas Klausner.

Do not compile in the local variable "mba" in mainbus_rescan unless
NPNPBIOS > 0 || NACPI > 0 || NIPMI > 0 || NMCA > 0.  This fixes the
build on systems such as Soekris where none of those options apply.


To generate a diff of this commit:
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/i386/i386/mainbus.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/arch/i386/i386/mainbus.c
diff -u src/sys/arch/i386/i386/mainbus.c:1.82 src/sys/arch/i386/i386/mainbus.c:1.83
--- src/sys/arch/i386/i386/mainbus.c:1.82	Tue Apr  7 22:01:38 2009
+++ src/sys/arch/i386/i386/mainbus.c	Wed Apr  8 17:08:02 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.82 2009/04/07 22:01:38 dyoung Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.83 2009/04/08 17:08:02 dyoung Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.82 2009/04/07 22:01:38 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.83 2009/04/08 17:08:02 dyoung Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -97,7 +97,6 @@
 void	mainbus_childdetached(device_t, device_t);
 int	mainbus_match(device_t, cfdata_t, void *);
 void	mainbus_attach(device_t, device_t, void *);
-void	mainbus_attach(device_t, device_t, void *);
 
 static int	mainbus_rescan(device_t, const char *, const int *);
 
@@ -362,7 +361,9 @@
 mainbus_rescan(device_t self, const char *ifattr, const int *locators)
 {
 	struct mainbus_softc *sc = device_private(self);
+#if NPNPBIOS > 0 || NACPI > 0 || NIPMI > 0 || NMCA > 0
 	union mainbus_attach_args mba;
+#endif
 
 	if (ifattr_match(ifattr, "acpibus") && sc->sc_acpi == NULL &&
 	    sc->sc_acpi_present) {

Reply via email to