Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7e9c20f4 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: opl3: Declare common variables properly



Move the declarations of common variables into opl3_voice.h instead of
declaring at each file multiple times, which was error-prone.

This fixes sparse warnings like:
  sound/drivers/opl3/opl3_synth.c:51:6: warning: symbol 'snd_opl3_regmap' was not declared. Should it be static?

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent ebd836ed
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -21,8 +21,6 @@

#include "opl3_voice.h"

extern char snd_opl3_regmap[MAX_OPL2_VOICES][4];

static char snd_opl3_drum_table[47] =
{
	OPL3_BASSDRUM_ON,  OPL3_BASSDRUM_ON,  OPL3_HIHAT_ON,	/* 35 - 37 */
+1 −2
Original line number Diff line number Diff line
@@ -31,13 +31,12 @@
#include <linux/slab.h>
#include <linux/ioport.h>
#include <sound/minors.h>
#include "opl3_voice.h"

MODULE_AUTHOR("Jaroslav Kysela <perex@perex.cz>, Hannu Savolainen 1993-1996, Rob Hooft");
MODULE_DESCRIPTION("Routines for control of AdLib FM cards (OPL2/OPL3/OPL4 chips)");
MODULE_LICENSE("GPL");

extern char snd_opl3_regmap[MAX_OPL2_VOICES][4];

static void snd_opl2_command(struct snd_opl3 * opl3, unsigned short cmd, unsigned char val)
{
	unsigned long flags;
+0 −4
Original line number Diff line number Diff line
@@ -25,10 +25,6 @@
#include "opl3_voice.h"
#include <sound/asoundef.h>

extern char snd_opl3_regmap[MAX_OPL2_VOICES][4];

extern bool use_internal_drums;

static void snd_opl3_note_off_unsafe(void *p, int note, int vel,
				     struct snd_midi_channel *chan);
/*
+0 −2
Original line number Diff line number Diff line
@@ -29,8 +29,6 @@ static int snd_opl3_reset_seq_oss(struct snd_seq_oss_arg *arg);

/* operators */

extern struct snd_midi_op opl3_ops;

static struct snd_seq_oss_callback oss_callback = {
	.owner = 	THIS_MODULE,
	.open =		snd_opl3_open_seq_oss,
+1 −0
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
#include <linux/nospec.h>
#include <sound/opl3.h>
#include <sound/asound_fm.h>
#include "opl3_voice.h"

#if IS_ENABLED(CONFIG_SND_SEQUENCER)
#define OPL3_SUPPORT_SYNTH
Loading