diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-12-01 04:43:51 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 06:30:05 -0500 |
commit | 04f141a8800d022981f0405a8d307c98aba55105 (patch) | |
tree | 2083ebe4a2959d57db1c016f1b8fa396e5c3f2af /sound/core/seq/seq_device.c | |
parent | e28563cceb9f258ebe3c50fc27d8f4ff0ac4bfa4 (diff) |
[ALSA] Optimize for config without PROC_FS (seq and oss parts)
Modules: ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer
Optimize the code when compiled without CONFIG_PROC_FS (in seq and oss
emulation parts).
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/seq/seq_device.c')
-rw-r--r-- | sound/core/seq/seq_device.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/core/seq/seq_device.c b/sound/core/seq/seq_device.c index 3f935a18b5e7..9ece443fba55 100644 --- a/sound/core/seq/seq_device.c +++ b/sound/core/seq/seq_device.c | |||
@@ -78,7 +78,9 @@ struct ops_list { | |||
78 | static LIST_HEAD(opslist); | 78 | static LIST_HEAD(opslist); |
79 | static int num_ops; | 79 | static int num_ops; |
80 | static DECLARE_MUTEX(ops_mutex); | 80 | static DECLARE_MUTEX(ops_mutex); |
81 | #ifdef CONFIG_PROC_FS | ||
81 | static struct snd_info_entry *info_entry = NULL; | 82 | static struct snd_info_entry *info_entry = NULL; |
83 | #endif | ||
82 | 84 | ||
83 | /* | 85 | /* |
84 | * prototypes | 86 | * prototypes |
@@ -100,6 +102,7 @@ static void remove_drivers(void); | |||
100 | * show all drivers and their status | 102 | * show all drivers and their status |
101 | */ | 103 | */ |
102 | 104 | ||
105 | #ifdef CONFIG_PROC_FS | ||
103 | static void snd_seq_device_info(struct snd_info_entry *entry, | 106 | static void snd_seq_device_info(struct snd_info_entry *entry, |
104 | struct snd_info_buffer *buffer) | 107 | struct snd_info_buffer *buffer) |
105 | { | 108 | { |
@@ -117,6 +120,7 @@ static void snd_seq_device_info(struct snd_info_entry *entry, | |||
117 | } | 120 | } |
118 | up(&ops_mutex); | 121 | up(&ops_mutex); |
119 | } | 122 | } |
123 | #endif | ||
120 | 124 | ||
121 | /* | 125 | /* |
122 | * load all registered drivers (called from seq_clientmgr.c) | 126 | * load all registered drivers (called from seq_clientmgr.c) |
@@ -544,6 +548,7 @@ static void unlock_driver(struct ops_list *ops) | |||
544 | 548 | ||
545 | static int __init alsa_seq_device_init(void) | 549 | static int __init alsa_seq_device_init(void) |
546 | { | 550 | { |
551 | #ifdef CONFIG_PROC_FS | ||
547 | info_entry = snd_info_create_module_entry(THIS_MODULE, "drivers", | 552 | info_entry = snd_info_create_module_entry(THIS_MODULE, "drivers", |
548 | snd_seq_root); | 553 | snd_seq_root); |
549 | if (info_entry == NULL) | 554 | if (info_entry == NULL) |
@@ -555,13 +560,16 @@ static int __init alsa_seq_device_init(void) | |||
555 | snd_info_free_entry(info_entry); | 560 | snd_info_free_entry(info_entry); |
556 | return -ENOMEM; | 561 | return -ENOMEM; |
557 | } | 562 | } |
563 | #endif | ||
558 | return 0; | 564 | return 0; |
559 | } | 565 | } |
560 | 566 | ||
561 | static void __exit alsa_seq_device_exit(void) | 567 | static void __exit alsa_seq_device_exit(void) |
562 | { | 568 | { |
563 | remove_drivers(); | 569 | remove_drivers(); |
570 | #ifdef CONFIG_PROC_FS | ||
564 | snd_info_unregister(info_entry); | 571 | snd_info_unregister(info_entry); |
572 | #endif | ||
565 | if (num_ops) | 573 | if (num_ops) |
566 | snd_printk(KERN_ERR "drivers not released (%d)\n", num_ops); | 574 | snd_printk(KERN_ERR "drivers not released (%d)\n", num_ops); |
567 | } | 575 | } |