From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760037AbYBAKkd (ORCPT ); Fri, 1 Feb 2008 05:40:33 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755583AbYBAKkZ (ORCPT ); Fri, 1 Feb 2008 05:40:25 -0500 Received: from mx2.suse.de ([195.135.220.15]:58927 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755373AbYBAKkX (ORCPT ); Fri, 1 Feb 2008 05:40:23 -0500 Date: Fri, 01 Feb 2008 11:40:21 +0100 Message-ID: From: Takashi Iwai To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Jaroslav Kysela Subject: Re: [build bug] sound/drivers/opl3/opl3_synth.c In-Reply-To: <20080201101723.GA12169@elte.hu> References: <20080201101723.GA12169@elte.hu> User-Agent: Wanderlust/2.15.5 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.7 (=?ISO-8859-4?Q?Sanj=F2?=) APEL/10.6 MULE XEmacs/21.5 (beta28) (fuki) (+CVS-20070806) (i386-suse-linux) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Fri, 1 Feb 2008 11:17:23 +0100, Ingo Molnar wrote: > > today's upstream ALSA merge brought us build failures (exposed by > randconfig testing): > > sound/drivers/opl3/opl3_synth.c: In function 'snd_opl3_find_patch': > sound/drivers/opl3/opl3_synth.c:308: error: 'OPL3_PATCH_HASH_SIZE' undeclared (first use in this function) > sound/drivers/opl3/opl3_synth.c:308: error: (Each undeclared identifier is reported only once > sound/drivers/opl3/opl3_synth.c:308: error: for each function it appears in.) > > config attached. Thanks. Could you try the fix patch below? Takashi [PATCH] Fix compilation of opl3 driver without sequencer support Signed-off-by: Takashi Iwai --- diff -r a4c88cbfe2f1 sound/drivers/opl3/opl3_synth.c --- a/sound/drivers/opl3/opl3_synth.c Wed Jan 30 09:06:47 2008 +0100 +++ b/sound/drivers/opl3/opl3_synth.c Fri Feb 01 11:42:12 2008 +0100 @@ -21,6 +21,10 @@ #include #include + +#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) +#define OPL3_SUPPORT_SYNTH +#endif /* * There is 18 possible 2 OP voices @@ -155,9 +159,11 @@ int snd_opl3_ioctl(struct snd_hwdep * hw #endif return snd_opl3_set_connection(opl3, (int) arg); +#ifdef OPL3_SUPPORT_SYNTH case SNDRV_DM_FM_IOCTL_CLEAR_PATCHES: snd_opl3_clear_patches(opl3); return 0; +#endif #ifdef CONFIG_SND_DEBUG default: @@ -178,6 +184,7 @@ int snd_opl3_release(struct snd_hwdep * return 0; } +#ifdef OPL3_SUPPORT_SYNTH /* * write the device - load patches */ @@ -341,6 +348,7 @@ void snd_opl3_clear_patches(struct snd_o } memset(opl3->patch_table, 0, sizeof(opl3->patch_table)); } +#endif /* OPL3_SUPPORT_SYNTH */ /* ------------------------------ */ diff -r a4c88cbfe2f1 include/sound/opl3.h --- a/include/sound/opl3.h Wed Jan 30 09:06:47 2008 +0100 +++ b/include/sound/opl3.h Fri Feb 01 11:42:12 2008 +0100 @@ -370,12 +370,13 @@ int snd_opl3_open(struct snd_hwdep * hw, int snd_opl3_open(struct snd_hwdep * hw, struct file *file); int snd_opl3_ioctl(struct snd_hwdep * hw, struct file *file, unsigned int cmd, unsigned long arg); -long snd_opl3_write(struct snd_hwdep *hw, const char __user *buf, long count, - loff_t *offset); int snd_opl3_release(struct snd_hwdep * hw, struct file *file); void snd_opl3_reset(struct snd_opl3 * opl3); +#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) +long snd_opl3_write(struct snd_hwdep *hw, const char __user *buf, long count, + loff_t *offset); int snd_opl3_load_patch(struct snd_opl3 *opl3, int prog, int bank, int type, const char *name, @@ -384,5 +385,9 @@ struct fm_patch *snd_opl3_find_patch(str struct fm_patch *snd_opl3_find_patch(struct snd_opl3 *opl3, int prog, int bank, int create_patch); void snd_opl3_clear_patches(struct snd_opl3 *opl3); +#else +#define snd_opl3_write NULL +static inline void snd_opl3_clear_patches(struct snd_opl3 *opl3) {} +#endif #endif /* __SOUND_OPL3_H */