summaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-05-17 17:14:51 +0200
committerJaroslav Kysela <perex@suse.cz>2006-06-22 21:33:45 +0200
commit6581f4e74d8541dd7d579f64e94822622cbb1654 (patch)
treefa7a0609c7a3e0460e052ab54a06a6fa935c64dc /sound/core
parent0fbf405c583e6ee6d7227eb938a096d0998f7e78 (diff)
downloadlinux-6581f4e74d8541dd7d579f64e94822622cbb1654.tar.bz2
[ALSA] Remove zero-initialization of static variables
Removed zero-initializations of static variables. A tiny optimization. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/info.c8
-rw-r--r--sound/core/init.c6
-rw-r--r--sound/core/oss/pcm_oss.c2
-rw-r--r--sound/core/pcm.c2
-rw-r--r--sound/core/rawmidi.c2
-rw-r--r--sound/core/seq/seq_device.c2
-rw-r--r--sound/core/seq/seq_dummy.c2
-rw-r--r--sound/core/sound.c2
-rw-r--r--sound/core/sound_oss.c2
-rw-r--r--sound/core/timer.c2
10 files changed, 15 insertions, 15 deletions
diff --git a/sound/core/info.c b/sound/core/info.c
index c8eeaea9d695..10c1772bf3ea 100644
--- a/sound/core/info.c
+++ b/sound/core/info.c
@@ -143,12 +143,12 @@ EXPORT_SYMBOL(snd_iprintf);
*/
-static struct proc_dir_entry *snd_proc_root = NULL;
-struct snd_info_entry *snd_seq_root = NULL;
+static struct proc_dir_entry *snd_proc_root;
+struct snd_info_entry *snd_seq_root;
EXPORT_SYMBOL(snd_seq_root);
#ifdef CONFIG_SND_OSSEMUL
-struct snd_info_entry *snd_oss_root = NULL;
+struct snd_info_entry *snd_oss_root;
#endif
static inline void snd_info_entry_prepare(struct proc_dir_entry *de)
@@ -972,7 +972,7 @@ EXPORT_SYMBOL(snd_info_unregister);
*/
-static struct snd_info_entry *snd_info_version_entry = NULL;
+static struct snd_info_entry *snd_info_version_entry;
static void snd_info_version_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer)
{
diff --git a/sound/core/init.c b/sound/core/init.c
index 38b2d4a9d672..4d9258884e44 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -38,8 +38,8 @@ struct snd_shutdown_f_ops {
struct snd_shutdown_f_ops *next;
};
-static unsigned int snd_cards_lock = 0; /* locked for registering/using */
-struct snd_card *snd_cards[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = NULL};
+static unsigned int snd_cards_lock; /* locked for registering/using */
+struct snd_card *snd_cards[SNDRV_CARDS];
EXPORT_SYMBOL(snd_cards);
static DEFINE_MUTEX(snd_card_mutex);
@@ -529,7 +529,7 @@ int snd_card_register(struct snd_card *card)
EXPORT_SYMBOL(snd_card_register);
#ifdef CONFIG_PROC_FS
-static struct snd_info_entry *snd_card_info_entry = NULL;
+static struct snd_info_entry *snd_card_info_entry;
static void snd_card_info_read(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index 4395285aa6a3..f5ff4f4a16ee 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -45,7 +45,7 @@
#define OSS_ALSAEMULVER _SIOR ('M', 249, int)
-static int dsp_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 0};
+static int dsp_map[SNDRV_CARDS];
static int adsp_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 1};
static int nonblock_open = 1;
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index bc00f9b00cbd..7581edd7b9ff 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -1072,7 +1072,7 @@ static void snd_pcm_proc_read(struct snd_info_entry *entry,
mutex_unlock(&register_mutex);
}
-static struct snd_info_entry *snd_pcm_proc_entry = NULL;
+static struct snd_info_entry *snd_pcm_proc_entry;
static void snd_pcm_proc_init(void)
{
diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c
index 08a41e5023cd..8c15c66eb4aa 100644
--- a/sound/core/rawmidi.c
+++ b/sound/core/rawmidi.c
@@ -43,7 +43,7 @@ MODULE_DESCRIPTION("Midlevel RawMidi code for ALSA.");
MODULE_LICENSE("GPL");
#ifdef CONFIG_SND_OSSEMUL
-static int midi_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 0};
+static int midi_map[SNDRV_CARDS];
static int amidi_map[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS-1)] = 1};
module_param_array(midi_map, int, NULL, 0444);
MODULE_PARM_DESC(midi_map, "Raw MIDI device number assigned to 1st OSS device.");
diff --git a/sound/core/seq/seq_device.c b/sound/core/seq/seq_device.c
index 1e4bc402f00f..d812dc886360 100644
--- a/sound/core/seq/seq_device.c
+++ b/sound/core/seq/seq_device.c
@@ -80,7 +80,7 @@ static LIST_HEAD(opslist);
static int num_ops;
static DEFINE_MUTEX(ops_mutex);
#ifdef CONFIG_PROC_FS
-static struct snd_info_entry *info_entry = NULL;
+static struct snd_info_entry *info_entry;
#endif
/*
diff --git a/sound/core/seq/seq_dummy.c b/sound/core/seq/seq_dummy.c
index 9eb1c744f77b..e55488d1237c 100644
--- a/sound/core/seq/seq_dummy.c
+++ b/sound/core/seq/seq_dummy.c
@@ -66,7 +66,7 @@ MODULE_LICENSE("GPL");
MODULE_ALIAS("snd-seq-client-" __stringify(SNDRV_SEQ_CLIENT_DUMMY));
static int ports = 1;
-static int duplex = 0;
+static int duplex;
module_param(ports, int, 0444);
MODULE_PARM_DESC(ports, "number of ports to be created");
diff --git a/sound/core/sound.c b/sound/core/sound.c
index 02c8cc4ebffe..cd862728346c 100644
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -332,7 +332,7 @@ EXPORT_SYMBOL(snd_unregister_device);
* INFO PART
*/
-static struct snd_info_entry *snd_minor_info_entry = NULL;
+static struct snd_info_entry *snd_minor_info_entry;
static const char *snd_device_type_name(int type)
{
diff --git a/sound/core/sound_oss.c b/sound/core/sound_oss.c
index 0043c9a97de6..74f0fe5a1ba0 100644
--- a/sound/core/sound_oss.c
+++ b/sound/core/sound_oss.c
@@ -209,7 +209,7 @@ EXPORT_SYMBOL(snd_unregister_oss_device);
#ifdef CONFIG_PROC_FS
-static struct snd_info_entry *snd_minor_info_oss_entry = NULL;
+static struct snd_info_entry *snd_minor_info_oss_entry;
static const char *snd_oss_device_type_name(int type)
{
diff --git a/sound/core/timer.c b/sound/core/timer.c
index d92f73c2c6b5..78199f58b93a 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -1106,7 +1106,7 @@ static void snd_timer_proc_read(struct snd_info_entry *entry,
mutex_unlock(&register_mutex);
}
-static struct snd_info_entry *snd_timer_proc_entry = NULL;
+static struct snd_info_entry *snd_timer_proc_entry;
static void __init snd_timer_proc_init(void)
{