LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org, Jaroslav Kysela <perex@perex.cz>
Subject: Re: [build bug] sound/drivers/opl3/opl3_synth.c
Date: Fri, 01 Feb 2008 11:40:21 +0100	[thread overview]
Message-ID: <s5hmyql2c4q.wl%tiwai@suse.de> (raw)
In-Reply-To: <20080201101723.GA12169@elte.hu>

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 <tiwai@suse.de>

---
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 <sound/opl3.h>
 #include <sound/asound_fm.h>
+
+#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 */

  reply	other threads:[~2008-02-01 10:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-01 10:17 Ingo Molnar
2008-02-01 10:40 ` Takashi Iwai [this message]
2008-02-01 11:05   ` Ingo Molnar
2008-02-13 10:25     ` Ingo Molnar
2008-02-13 10:51       ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hmyql2c4q.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=perex@perex.cz \
    --subject='Re: [build bug] sound/drivers/opl3/opl3_synth.c' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).