Module Name: src Committed By: jmcneill Date: Sun Feb 20 03:55:19 UTC 2011
Modified Files: src/sys/external/isc/atheros_hal/ic: ah_osdep.c opt_ah.h Log Message: support building as a module To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/external/isc/atheros_hal/ic/ah_osdep.c cvs rdiff -u -r1.1 -r1.2 src/sys/external/isc/atheros_hal/ic/opt_ah.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/external/isc/atheros_hal/ic/ah_osdep.c diff -u src/sys/external/isc/atheros_hal/ic/ah_osdep.c:1.3 src/sys/external/isc/atheros_hal/ic/ah_osdep.c:1.4 --- src/sys/external/isc/atheros_hal/ic/ah_osdep.c:1.3 Fri Aug 7 21:01:48 2009 +++ src/sys/external/isc/atheros_hal/ic/ah_osdep.c Sun Feb 20 03:55:18 2011 @@ -26,13 +26,15 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGES. * - * $Id: ah_osdep.c,v 1.3 2009/08/07 21:01:48 sborrill Exp $ + * $Id: ah_osdep.c,v 1.4 2011/02/20 03:55:18 jmcneill Exp $ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ah_osdep.c,v 1.3 2009/08/07 21:01:48 sborrill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ah_osdep.c,v 1.4 2011/02/20 03:55:18 jmcneill Exp $"); +#ifdef _KERNEL_OPT #include "opt_athhal.h" +#endif #include <sys/param.h> #include <sys/systm.h> @@ -41,6 +43,7 @@ #include <sys/malloc.h> #include <sys/proc.h> #include <sys/kauth.h> +#include <sys/module.h> #include <machine/stdarg.h> @@ -437,3 +440,17 @@ { return memcpy(dst, src, n); } + +MODULE(MODULE_CLASS_MISC, ath_hal, NULL); + +static int +ath_hal_modcmd(modcmd_t cmd, void *opaque) +{ + switch (cmd) { + case MODULE_CMD_INIT: + case MODULE_CMD_FINI: + return 0; + default: + return ENOTTY; + } +} Index: src/sys/external/isc/atheros_hal/ic/opt_ah.h diff -u src/sys/external/isc/atheros_hal/ic/opt_ah.h:1.1 src/sys/external/isc/atheros_hal/ic/opt_ah.h:1.2 --- src/sys/external/isc/atheros_hal/ic/opt_ah.h:1.1 Thu Dec 11 05:37:40 2008 +++ src/sys/external/isc/atheros_hal/ic/opt_ah.h Sun Feb 20 03:55:18 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: opt_ah.h,v 1.1 2008/12/11 05:37:40 alc Exp $ */ +/* $NetBSD: opt_ah.h,v 1.2 2011/02/20 03:55:18 jmcneill Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -28,7 +28,9 @@ #ifndef OPT_AH_H #define OPT_AH_H +#ifdef _KERNEL_OPT #include "opt_athhal.h" +#endif #ifdef ATHHAL_ASSERT #define AH_ASSERT 1