summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjmcneill <jmcneill@NetBSD.org>2008-05-19 21:05:37 +0000
committerjmcneill <jmcneill@NetBSD.org>2008-05-19 21:05:37 +0000
commitbbfbae40efd4594a44ba89936b8a5fd565d83d25 (patch)
tree5621e62226cbd48b9d3e45dde57b55cb2c0614d1
parent2930288d406b08458631bda6462f7909326fb55c (diff)
Don't use MALLOC_DECLARE / MALLOC_DEFINE if building as a module.
-rw-r--r--sys/dev/drm/drmP.h6
-rw-r--r--sys/dev/drm/drm_memory.c6
2 files changed, 9 insertions, 3 deletions
diff --git a/sys/dev/drm/drmP.h b/sys/dev/drm/drmP.h
index bc3b1f59962..d273e4d7b65 100644
--- a/sys/dev/drm/drmP.h
+++ b/sys/dev/drm/drmP.h
@@ -1,4 +1,4 @@
-/* $NetBSD: drmP.h,v 1.26 2008/05/19 00:17:39 bjs Exp $ */
+/* $NetBSD: drmP.h,v 1.27 2008/05/19 21:05:37 jmcneill Exp $ */
/* drmP.h -- Private header for Direct Rendering Manager -*- linux-c -*-
* Created: Mon Jan 4 10:05:05 1999 by faith@precisioninsight.com
@@ -194,7 +194,11 @@ typedef struct drm_file drm_file_t;
#define DRM_IF_VERSION(maj, min) (maj << 16 | min)
+#if !defined(_MODULE)
MALLOC_DECLARE(M_DRM);
+#else
+#define M_DRM M_TEMP
+#endif
#define __OS_HAS_AGP 1
diff --git a/sys/dev/drm/drm_memory.c b/sys/dev/drm/drm_memory.c
index efc982915c9..d75d153db92 100644
--- a/sys/dev/drm/drm_memory.c
+++ b/sys/dev/drm/drm_memory.c
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_memory.c,v 1.11 2008/05/18 19:53:22 jmcneill Exp $ */
+/* $NetBSD: drm_memory.c,v 1.12 2008/05/19 21:05:37 jmcneill Exp $ */
/* drm_memory.h -- Memory management wrappers for DRM -*- linux-c -*-
* Created: Thu Feb 4 14:00:34 1999 by faith@valinux.com
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_memory.c,v 1.11 2008/05/18 19:53:22 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_memory.c,v 1.12 2008/05/19 21:05:37 jmcneill Exp $");
/*
__FBSDID("$FreeBSD: src/sys/dev/drm/drm_memory.c,v 1.2 2005/11/28 23:13:52 anholt Exp $");
*/
@@ -54,7 +54,9 @@ __FBSDID("$FreeBSD: src/sys/dev/drm/drm_memory.c,v 1.2 2005/11/28 23:13:52 anhol
#endif
#endif
+#if !defined(_MODULE)
MALLOC_DEFINE(M_DRM, "drm", "DRM Data Structures");
+#endif
void drm_mem_init(void)
{