Update of /cvsroot/alsa/alsa-kernel/core
In directory usw-pr-cvs1:/tmp/cvs-serv27966/core

Modified Files:
        hwdep.c info_oss.c init.c rawmidi.c sound.c sound_oss.c 
        timer.c 
Log Message:
Cleanups for compilation without procfs

Index: hwdep.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/hwdep.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- hwdep.c     25 Sep 2002 17:33:25 -0000      1.11
+++ hwdep.c     13 Oct 2002 13:16:38 -0000      1.12
@@ -327,7 +327,7 @@
                up(&register_mutex);
                return err;
        }
-#ifdef CONFIG_SND_OSSEMUL
+#ifdef SNDRV_OSS_INFO_DEV_AUDIO
        hwdep->ossreg = 0;
        if (hwdep->oss_type >= 0) {
                if ((hwdep->oss_type == SNDRV_OSS_DEVICE_TYPE_DMFM) && (hwdep->device 
!= 0)) {
@@ -359,7 +359,7 @@
                up(&register_mutex);
                return -EINVAL;
        }
-#ifdef CONFIG_SND_OSSEMUL
+#ifdef SNDRV_OSS_INFO_DEV_AUDIO
        if (hwdep->ossreg)
                snd_unregister_oss_device(hwdep->oss_type, hwdep->card, hwdep->device);
 #endif

Index: info_oss.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/info_oss.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- info_oss.c  12 Aug 2002 08:43:44 -0000      1.8
+++ info_oss.c  13 Oct 2002 13:16:38 -0000      1.9
@@ -28,7 +28,7 @@
 #include <sound/version.h>
 #include <linux/utsname.h>
 
-#ifdef CONFIG_SND_OSSEMUL
+#if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS)
 
 /*
  *  OSS compatible part

Index: init.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/init.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- init.c      12 Aug 2002 08:43:44 -0000      1.11
+++ init.c      13 Oct 2002 13:16:39 -0000      1.12
@@ -216,7 +216,7 @@
                snd_iprintf(buffer, "--- no soundcards ---\n");
 }
 
-#ifdef CONFIG_SND_OSSEMUL
+#if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS)
 
 void snd_card_info_read_oss(snd_info_buffer_t * buffer)
 {

Index: rawmidi.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/rawmidi.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- rawmidi.c   26 Aug 2002 08:47:57 -0000      1.19
+++ rawmidi.c   13 Oct 2002 13:16:39 -0000      1.20
@@ -1417,7 +1417,7 @@
                up(&register_mutex);
                return err;
        }
-#ifdef CONFIG_SND_OSSEMUL
+#ifdef SNDRV_OSS_INFO_DEV_AUDIO
        rmidi->ossreg = 0;
        if (rmidi->device == snd_midi_map[rmidi->card->number]) {
                if (snd_register_oss_device(SNDRV_OSS_DEVICE_TYPE_MIDI,
@@ -1480,7 +1480,7 @@
                snd_info_unregister(rmidi->proc_entry);
                rmidi->proc_entry = NULL;
        }
-#ifdef CONFIG_SND_OSSEMUL
+#ifdef SNDRV_OSS_INFO_DEV_AUDIO
        if (rmidi->ossreg) {
                if (rmidi->device == snd_midi_map[rmidi->card->number]) {
                        snd_unregister_oss_device(SNDRV_OSS_DEVICE_TYPE_MIDI, 
rmidi->card, 0);

Index: sound.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/sound.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- sound.c     2 Oct 2002 06:28:20 -0000       1.24
+++ sound.c     13 Oct 2002 13:16:39 -0000      1.25
@@ -318,9 +318,6 @@
 #endif
        if (register_chrdev(snd_major, "alsa", &snd_fops)) {
                snd_printk(KERN_ERR "unable to register native major device number 
%d\n", snd_major);
-#ifdef CONFIG_SND_OSSEMUL
-               snd_oss_cleanup_module();
-#endif
                return -EIO;
        }
 #ifdef CONFIG_SND_DEBUG_MEMORY
@@ -330,9 +327,6 @@
 #ifdef CONFIG_SND_DEBUG_MEMORY
                snd_memory_done();
 #endif
-#ifdef CONFIG_SND_OSSEMUL
-               snd_oss_cleanup_module();
-#endif
                return -ENOMEM;
        }
 #ifdef CONFIG_SND_OSSEMUL
@@ -369,7 +363,6 @@
        
 #ifdef CONFIG_SND_OSSEMUL
        snd_info_minor_unregister();
-       snd_oss_cleanup_module();
 #endif
        snd_info_done();
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) && defined(CONFIG_APM)
@@ -455,6 +448,7 @@
 EXPORT_SYMBOL(snd_dma_residue);
 #endif
   /* info.c */
+#ifdef CONFIG_PROC_FS
 EXPORT_SYMBOL(snd_seq_root);
 EXPORT_SYMBOL(snd_create_proc_entry);
 EXPORT_SYMBOL(snd_remove_proc_entry);
@@ -468,8 +462,9 @@
 EXPORT_SYMBOL(snd_info_free_device);
 EXPORT_SYMBOL(snd_info_register);
 EXPORT_SYMBOL(snd_info_unregister);
+#endif
   /* info_oss.c */
-#ifdef CONFIG_SND_OSSEMUL
+#if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS)
 EXPORT_SYMBOL(snd_oss_info_register);
 #endif
   /* control.c */

Index: sound_oss.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/sound_oss.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- sound_oss.c 12 Aug 2002 08:43:45 -0000      1.7
+++ sound_oss.c 13 Oct 2002 13:16:39 -0000      1.8
@@ -183,6 +183,8 @@
  *  INFO PART
  */
 
+#ifdef CONFIG_PROC_FS
+
 static snd_info_entry_t *snd_minor_info_oss_entry = NULL;
 
 static void snd_minor_info_oss_read(snd_info_entry_t *entry, snd_info_buffer_t * 
buffer)
@@ -207,8 +209,11 @@
        up(&sound_oss_mutex);
 }
 
+#endif /* CONFIG_PROC_FS */
+
 int __init snd_minor_info_oss_init(void)
 {
+#ifdef CONFIG_PROC_FS
        snd_info_entry_t *entry;
 
        entry = snd_info_create_module_entry(THIS_MODULE, "devices", snd_oss_root);
@@ -222,13 +227,16 @@
                }
        }
        snd_minor_info_oss_entry = entry;
+#endif
        return 0;
 }
 
 int __exit snd_minor_info_oss_done(void)
 {
+#ifdef CONFIG_PROC_FS
        if (snd_minor_info_oss_entry)
                snd_info_unregister(snd_minor_info_oss_entry);
+#endif
        return 0;
 }
 
@@ -239,10 +247,6 @@
        for (card = 0; card < SNDRV_CARDS; card++)
                INIT_LIST_HEAD(&snd_oss_minors_hash[card]);
        return 0;
-}
-
-void snd_oss_cleanup_module(void)
-{
 }
 
 #endif /* CONFIG_SND_OSSEMUL */

Index: timer.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/timer.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- timer.c     13 Aug 2002 16:13:34 -0000      1.15
+++ timer.c     13 Oct 2002 13:16:39 -0000      1.16
@@ -1356,7 +1356,7 @@
        int err;
        snd_info_entry_t *entry;
 
-#ifdef CONFIG_SND_OSSEMUL
+#ifdef SNDRV_OSS_INFO_DEV_TIMERS
        snd_oss_info_register(SNDRV_OSS_INFO_DEV_TIMERS, SNDRV_CARDS - 1, "system 
timer");
 #endif
        if ((entry = snd_info_create_module_entry(THIS_MODULE, "timers", NULL)) != 
NULL) {
@@ -1391,7 +1391,7 @@
                snd_info_unregister(snd_timer_proc_entry);
                snd_timer_proc_entry = NULL;
        }
-#ifdef CONFIG_SND_OSSEMUL
+#ifdef SNDRV_OSS_INFO_DEV_TIMERS
        snd_oss_info_unregister(SNDRV_OSS_INFO_DEV_TIMERS, SNDRV_CARDS - 1);
 #endif
 }



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to