From 63acdcb5b084bd07e491f8f3aa4bb93907f1c2d0 Mon Sep 17 00:00:00 2001 From: pgoyette Date: Fri, 24 Apr 2015 03:35:49 +0000 Subject: [PATCH] With new (corrected) configuration declarations file, the cdevsw is already included by config. So, for built-in sysmon module we don't need to add the cdevsw to the table. --- sys/dev/sysmon/sysmon.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/dev/sysmon/sysmon.c b/sys/dev/sysmon/sysmon.c index 6f50caa8042e..c5f9b75816a2 100644 --- a/sys/dev/sysmon/sysmon.c +++ b/sys/dev/sysmon/sysmon.c @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon.c,v 1.20 2015/04/23 23:22:03 pgoyette Exp $ */ +/* $NetBSD: sysmon.c,v 1.21 2015/04/24 03:35:49 pgoyette Exp $ */ /*- * Copyright (c) 2000 Zembu Labs, Inc. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sysmon.c,v 1.20 2015/04/23 23:22:03 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysmon.c,v 1.21 2015/04/24 03:35:49 pgoyette Exp $"); #include #include @@ -345,7 +345,9 @@ MODULE(MODULE_CLASS_DRIVER, sysmon, ""); int sysmon_init(void) { +#ifdef _MODULE devmajor_t bmajor, cmajor; +#endif static struct cfdata cf; int error = 0; @@ -367,6 +369,7 @@ sysmon_init(void) return error; } +#ifdef _MODULE bmajor = cmajor = -1; error = devsw_attach("sysmon", NULL, &bmajor, &sysmon_cdevsw, &cmajor); @@ -377,6 +380,7 @@ sysmon_init(void) sysmon_cd.cd_name); return error; } +#endif cf.cf_name = sysmon_cd.cd_name; cf.cf_atname = sysmon_cd.cd_name;