summaryrefslogtreecommitdiffstats
path: root/sys/dev/sound
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/sound')
-rw-r--r--sys/dev/sound/midi/midi.c14
-rw-r--r--sys/dev/sound/midi/mpu401.c15
-rw-r--r--sys/dev/sound/pcm/channel.h11
-rw-r--r--sys/dev/sound/pcm/mixer.h11
-rw-r--r--sys/dev/sound/pcm/sound.h15
5 files changed, 11 insertions, 55 deletions
diff --git a/sys/dev/sound/midi/midi.c b/sys/dev/sound/midi/midi.c
index 59ea141..4b33808 100644
--- a/sys/dev/sound/midi/midi.c
+++ b/sys/dev/sound/midi/midi.c
@@ -58,17 +58,6 @@ __FBSDID("$FreeBSD$");
#include <sys/poll.h>
#include <sys/sbuf.h>
#include <sys/kobj.h>
-#ifdef SND_DEBUG
-#undef KOBJMETHOD
-#define KOBJMETHOD(NAME, FUNC) \
- { \
- &NAME##_desc, \
- (kobjop_t) ((FUNC != (NAME##_t *)NULL) ? FUNC : NULL) \
- }
-#endif
-#ifndef KOBJMETHOD_END
-#define KOBJMETHOD_END { NULL, NULL }
-#endif
#include <sys/module.h>
#ifdef HAVE_KERNEL_OPTION_HEADERS
@@ -82,6 +71,9 @@ __FBSDID("$FreeBSD$");
#include "synth_if.h"
MALLOC_DEFINE(M_MIDI, "midi buffers", "Midi data allocation area");
+#ifndef KOBJMETHOD_END
+#define KOBJMETHOD_END { NULL, NULL }
+#endif
#define PCMMKMINOR(u, d, c) ((((c) & 0xff) << 16) | (((u) & 0x0f) << 4) | ((d) & 0x0f))
#define MIDIMKMINOR(u, d, c) PCMMKMINOR(u, d, c)
diff --git a/sys/dev/sound/midi/mpu401.c b/sys/dev/sound/midi/mpu401.c
index e017b4d..3e061a7 100644
--- a/sys/dev/sound/midi/mpu401.c
+++ b/sys/dev/sound/midi/mpu401.c
@@ -37,17 +37,6 @@ __FBSDID("$FreeBSD$");
#include <sys/proc.h>
#include <sys/systm.h>
#include <sys/kobj.h>
-#ifdef SND_DEBUG
-#undef KOBJMETHOD
-#define KOBJMETHOD(NAME, FUNC) \
- { \
- &NAME##_desc, \
- (kobjop_t) ((FUNC != (NAME##_t *)NULL) ? FUNC : NULL) \
- }
-#endif
-#ifndef KOBJMETHOD_END
-#define KOBJMETHOD_END { NULL, NULL }
-#endif
#include <sys/malloc.h>
#include <sys/bus.h> /* to get driver_intr_t */
@@ -61,6 +50,10 @@ __FBSDID("$FreeBSD$");
#include "mpu_if.h"
#include "mpufoi_if.h"
+#ifndef KOBJMETHOD_END
+#define KOBJMETHOD_END { NULL, NULL }
+#endif
+
#define MPU_DATAPORT 0
#define MPU_CMDPORT 1
#define MPU_STATPORT 1
diff --git a/sys/dev/sound/pcm/channel.h b/sys/dev/sound/pcm/channel.h
index 6effec3..6601b54 100644
--- a/sys/dev/sound/pcm/channel.h
+++ b/sys/dev/sound/pcm/channel.h
@@ -441,15 +441,4 @@ extern int report_soft_matrix;
/* The size of a whole secondary bufhard. */
#define CHN_2NDBUFMAXSIZE (131072)
-#ifdef SND_DEBUG
-#define CHANNEL_DECLARE(channel) \
- static struct kobj_class channel##_class = { \
- .name = #channel, \
- .methods = channel##_methods, \
- .size = sizeof(struct kobj), \
- .baseclasses = NULL, \
- .refs = 0 \
- }
-#else
#define CHANNEL_DECLARE(name) static DEFINE_CLASS(name, name ## _methods, sizeof(struct kobj))
-#endif
diff --git a/sys/dev/sound/pcm/mixer.h b/sys/dev/sound/pcm/mixer.h
index 4248a9c..52b7cbd 100644
--- a/sys/dev/sound/pcm/mixer.h
+++ b/sys/dev/sound/pcm/mixer.h
@@ -74,15 +74,4 @@ extern int mixer_count;
#define MIXER_SIZE (512 + sizeof(struct kobj) + \
sizeof(oss_mixer_enuminfo))
-#ifdef SND_DEBUG
-#define MIXER_DECLARE(mixer) \
- static struct kobj_class mixer##_class = { \
- .name = #mixer, \
- .methods = mixer##_methods, \
- .size = MIXER_SIZE, \
- .baseclasses = NULL, \
- .refs = 0 \
- }
-#else
#define MIXER_DECLARE(name) static DEFINE_CLASS(name, name ## _methods, MIXER_SIZE)
-#endif
diff --git a/sys/dev/sound/pcm/sound.h b/sys/dev/sound/pcm/sound.h
index cd7c183..80cc645 100644
--- a/sys/dev/sound/pcm/sound.h
+++ b/sys/dev/sound/pcm/sound.h
@@ -66,17 +66,6 @@
#include <sys/soundcard.h>
#include <sys/sysctl.h>
#include <sys/kobj.h>
-#ifdef SND_DEBUG
-#undef KOBJMETHOD
-#define KOBJMETHOD(NAME, FUNC) \
- { \
- &NAME##_desc, \
- (kobjop_t) ((FUNC != (NAME##_t *)NULL) ? FUNC : NULL) \
- }
-#endif
-#ifndef KOBJMETHOD_END
-#define KOBJMETHOD_END { NULL, NULL }
-#endif
#include <vm/vm.h>
#include <vm/pmap.h>
@@ -84,6 +73,10 @@
#include <sys/mutex.h>
#include <sys/condvar.h>
+#ifndef KOBJMETHOD_END
+#define KOBJMETHOD_END { NULL, NULL }
+#endif
+
struct pcm_channel;
struct pcm_feeder;
struct snd_dbuf;
OpenPOWER on IntegriCloud