Module Name:    src
Committed By:   sborrill
Date:           Sun Sep  4 15:05:27 UTC 2011

Modified Files:
        src/sys/arch/i386/pci: gscpcib.c

Log Message:
Don't attach GPIO framework if NGPIO = 0


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/i386/pci/gscpcib.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/pci/gscpcib.c
diff -u src/sys/arch/i386/pci/gscpcib.c:1.16 src/sys/arch/i386/pci/gscpcib.c:1.17
--- src/sys/arch/i386/pci/gscpcib.c:1.16	Fri Jul  1 17:37:26 2011
+++ src/sys/arch/i386/pci/gscpcib.c	Sun Sep  4 15:05:26 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: gscpcib.c,v 1.16 2011/07/01 17:37:26 dyoung Exp $	*/
+/*	$NetBSD: gscpcib.c,v 1.17 2011/09/04 15:05:26 sborrill Exp $	*/
 /*	$OpenBSD: gscpcib.c,v 1.3 2004/10/05 19:02:33 grange Exp $	*/
 /*
  * Copyright (c) 2004 Alexander Yurchenko <gra...@openbsd.org>
@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gscpcib.c,v 1.16 2011/07/01 17:37:26 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gscpcib.c,v 1.17 2011/09/04 15:05:26 sborrill Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -85,6 +85,7 @@
 int
 gscpcib_rescan(device_t self, const char *ifattr, const int *loc)
 {
+#if NGPIO > 0
 	struct gscpcib_softc *sc = device_private(self);
 
 	/* Attach GPIO framework */
@@ -100,6 +101,8 @@
 		    &gba, gpiobus_print, NULL);
 		return 0;
 	}
+#endif
+
 	return pcibrescan(self, ifattr, loc);
 }
 

Reply via email to