Date: Thu, 11 Jun 2009 09:06:09 +0000 (UTC) From: Ariff Abdullah <ariff@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r193979 - in head/sys/dev/sound: midi pcm Message-ID: <200906110906.n5B9694m041311@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ariff Date: Thu Jun 11 09:06:09 2009 New Revision: 193979 URL: http://svn.freebsd.org/changeset/base/193979 Log: Remove custom KOBJMETHOD(), CHANNEL_DECLARE() and MIXER_DECLARE() (enabled with SND_DEBUG) that was intended to provoke build failure due to inconsistencies. Modified: head/sys/dev/sound/midi/midi.c head/sys/dev/sound/midi/mpu401.c head/sys/dev/sound/pcm/channel.h head/sys/dev/sound/pcm/mixer.h head/sys/dev/sound/pcm/sound.h Modified: head/sys/dev/sound/midi/midi.c ============================================================================== --- head/sys/dev/sound/midi/midi.c Thu Jun 11 09:02:22 2009 (r193978) +++ head/sys/dev/sound/midi/midi.c Thu Jun 11 09:06:09 2009 (r193979) @@ -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) Modified: head/sys/dev/sound/midi/mpu401.c ============================================================================== --- head/sys/dev/sound/midi/mpu401.c Thu Jun 11 09:02:22 2009 (r193978) +++ head/sys/dev/sound/midi/mpu401.c Thu Jun 11 09:06:09 2009 (r193979) @@ -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 Modified: head/sys/dev/sound/pcm/channel.h ============================================================================== --- head/sys/dev/sound/pcm/channel.h Thu Jun 11 09:02:22 2009 (r193978) +++ head/sys/dev/sound/pcm/channel.h Thu Jun 11 09:06:09 2009 (r193979) @@ -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 Modified: head/sys/dev/sound/pcm/mixer.h ============================================================================== --- head/sys/dev/sound/pcm/mixer.h Thu Jun 11 09:02:22 2009 (r193978) +++ head/sys/dev/sound/pcm/mixer.h Thu Jun 11 09:06:09 2009 (r193979) @@ -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 Modified: head/sys/dev/sound/pcm/sound.h ============================================================================== --- head/sys/dev/sound/pcm/sound.h Thu Jun 11 09:02:22 2009 (r193978) +++ head/sys/dev/sound/pcm/sound.h Thu Jun 11 09:06:09 2009 (r193979) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906110906.n5B9694m041311>