Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/sysmon Don't manipulate the autoconfig databases for...



details:   https://anonhg.NetBSD.org/src/rev/1487a554c904
branches:  trunk
changeset: 808281:1487a554c904
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Tue May 12 02:38:00 2015 +0000

description:
Don't manipulate the autoconfig databases for built-in module.

Thanks, christos!

diffstat:

 sys/dev/sysmon/swwdog.c |  10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diffs (56 lines):

diff -r db0cbbc981e2 -r 1487a554c904 sys/dev/sysmon/swwdog.c
--- a/sys/dev/sysmon/swwdog.c   Tue May 12 00:04:34 2015 +0000
+++ b/sys/dev/sysmon/swwdog.c   Tue May 12 02:38:00 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: swwdog.c,v 1.17 2015/04/24 19:49:24 christos Exp $     */
+/*     $NetBSD: swwdog.c,v 1.18 2015/05/12 02:38:00 pgoyette Exp $     */
 
 /*
  * Copyright (c) 2004, 2005 Steven M. Bellovin
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: swwdog.c,v 1.17 2015/04/24 19:49:24 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: swwdog.c,v 1.18 2015/05/12 02:38:00 pgoyette Exp $");
 
 /*
  *
@@ -311,17 +311,21 @@
         */
        int error;
 
+#ifdef _MODULE
        error = config_cfdriver_attach(&swwdog_cd);
        if (error) {
                aprint_error("%s: unable to attach cfdriver\n",
                    swwdog_cd.cd_name);
                return error;
        }
+#endif
        error = swwdogattach(1);
+#ifdef _MODULE
        if (error) {
                aprint_error("%s: device attach failed\n", swwdog_cd.cd_name);
                config_cfdriver_detach(&swwdog_cd);
        }
+#endif
 
        return error;
 }
@@ -334,6 +338,7 @@
 
        error = config_detach(swwdog_dev, 0);
 
+#ifdef _MODULE
        error = config_cfattach_detach(swwdog_cd.cd_name, &swwdog_ca);
        if (error)
                aprint_error("%s: error detaching cfattach: %d\n",
@@ -343,6 +348,7 @@
        if (error)
                aprint_error("%s: error detaching cfdriver: %d\n",
                    swwdog_cd.cd_name, error);
+#endif
 
         return error;
 }



Home | Main Index | Thread Index | Old Index