Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/i386/pci Don't attach GPIO framework if NGPIO = 0



details:   https://anonhg.NetBSD.org/src/rev/6ba97bf993f6
branches:  trunk
changeset: 769236:6ba97bf993f6
user:      sborrill <sborrill%NetBSD.org@localhost>
date:      Sun Sep 04 15:05:26 2011 +0000

description:
Don't attach GPIO framework if NGPIO = 0

diffstat:

 sys/arch/i386/pci/gscpcib.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (35 lines):

diff -r b61968a4c318 -r 6ba97bf993f6 sys/arch/i386/pci/gscpcib.c
--- a/sys/arch/i386/pci/gscpcib.c       Sun Sep 04 13:25:22 2011 +0000
+++ b/sys/arch/i386/pci/gscpcib.c       Sun Sep 04 15:05:26 2011 +0000
@@ -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 <grange%openbsd.org@localhost>
@@ -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);
 }
 



Home | Main Index | Thread Index | Old Index