return 0;
 }
 
+#ifdef CONFIG_PROC_FS
 /*
  */
 #define MIXER_VOL(name) [SOUND_MIXER_##name] = #name
                mixer->proc_entry = NULL;
        }
 }
+#else /* !CONFIG_PROC_FS */
+#define snd_mixer_oss_proc_init(mix)
+#define snd_mixer_oss_proc_done(mix)
+#endif /* CONFIG_PROC_FS */
 
 static void snd_mixer_oss_build(struct snd_mixer_oss *mixer)
 {
 
        return 0;
 }
 
+#ifdef CONFIG_PROC_FS
 /*
  *  /proc interface
  */
                }
        }
 }
+#else /* !CONFIG_PROC_FS */
+#define snd_pcm_oss_proc_init(pcm)
+#define snd_pcm_oss_proc_done(pcm)
+#endif /* CONFIG_PROC_FS */
 
 /*
  *  ENTRY functions
 
  */
 static int register_device(void);
 static void unregister_device(void);
+#ifdef CONFIG_PROC_FS
 static int register_proc(void);
 static void unregister_proc(void);
+#else
+static inline int register_proc(void) { return 0; }
+static inline void unregister_proc(void) {}
+#endif
 
 static int odev_open(struct inode *inode, struct file *file);
 static int odev_release(struct inode *inode, struct file *file);
 static ssize_t odev_write(struct file *file, const char __user *buf, size_t count, loff_t *offset);
 static long odev_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
 static unsigned int odev_poll(struct file *file, poll_table * wait);
-#ifdef CONFIG_PROC_FS
-static void info_read(struct snd_info_entry *entry, struct snd_info_buffer *buf);
-#endif
 
 
 /*
        up(®ister_mutex);
 }
 
-#endif /* CONFIG_PROC_FS */
 
 static int __init
 register_proc(void)
 {
-#ifdef CONFIG_PROC_FS
        struct snd_info_entry *entry;
 
        entry = snd_info_create_module_entry(THIS_MODULE, SNDRV_SEQ_OSS_PROCNAME, snd_seq_root);
                return -ENOMEM;
        }
        info_entry = entry;
-#endif
        return 0;
 }
 
 static void
 unregister_proc(void)
 {
-#ifdef CONFIG_PROC_FS
        if (info_entry)
                snd_info_unregister(info_entry);
        info_entry = NULL;
-#endif
 }
+#endif /* CONFIG_PROC_FS */
 
 }
 
 
+#ifdef CONFIG_PROC_FS
 /*
  * misc. functions for proc interface
  */
                        snd_seq_oss_readq_info_read(dp->readq, buf);
        }
 }
-
+#endif /* CONFIG_PROC_FS */
 
 }
 
 
+#ifdef CONFIG_PROC_FS
 /*
  * proc interface
  */
                snd_use_lock_free(&mdev->use_lock);
        }
 }
-
+#endif /* CONFIG_PROC_FS */
 
 }
 
 
+#ifdef CONFIG_PROC_FS
 /*
  * proc interface
  */
                    (waitqueue_active(&q->midi_sleep) ? "sleeping":"running"),
                    q->qlen, q->input_time);
 }
+#endif /* CONFIG_PROC_FS */
 
 }
 
 
+#ifdef CONFIG_PROC_FS
 /*
  * proc interface
  */
                snd_use_lock_free(&rec->use_lock);
        }
 }
-
+#endif /* CONFIG_PROC_FS */
 
 
 /*---------------------------------------------------------------------------*/
 
+#ifdef CONFIG_PROC_FS
 /*
  *  /proc interface
  */
                snd_seq_client_unlock(client);
        }
 }
-
+#endif /* CONFIG_PROC_FS */
 
 /*---------------------------------------------------------------------------*/
 
 
 static LIST_HEAD(opslist);
 static int num_ops;
 static DECLARE_MUTEX(ops_mutex);
+#ifdef CONFIG_PROC_FS
 static struct snd_info_entry *info_entry = NULL;
+#endif
 
 /*
  * prototypes
  * show all drivers and their status
  */
 
+#ifdef CONFIG_PROC_FS
 static void snd_seq_device_info(struct snd_info_entry *entry,
                                struct snd_info_buffer *buffer)
 {
        }
        up(&ops_mutex); 
 }
+#endif
  
 /*
  * load all registered drivers (called from seq_clientmgr.c)
 
 static int __init alsa_seq_device_init(void)
 {
+#ifdef CONFIG_PROC_FS
        info_entry = snd_info_create_module_entry(THIS_MODULE, "drivers",
                                                  snd_seq_root);
        if (info_entry == NULL)
                snd_info_free_entry(info_entry);
                return -ENOMEM;
        }
+#endif
        return 0;
 }
 
 static void __exit alsa_seq_device_exit(void)
 {
        remove_drivers();
+#ifdef CONFIG_PROC_FS
        snd_info_unregister(info_entry);
+#endif
        if (num_ops)
                snd_printk(KERN_ERR "drivers not released (%d)\n", num_ops);
 }
 
 #include "seq_clientmgr.h"
 #include "seq_timer.h"
 
-
+#ifdef CONFIG_PROC_FS
 static struct snd_info_entry *queues_entry;
 static struct snd_info_entry *clients_entry;
 static struct snd_info_entry *timer_entry;
        return entry;
 }
 
-
 /* create all our /proc entries */
 int __init snd_seq_info_init(void)
 {
 
 int __exit snd_seq_info_done(void)
 {
-       if (queues_entry)
-               snd_info_unregister(queues_entry);
-       if (clients_entry)
-               snd_info_unregister(clients_entry);
-       if (timer_entry)
-               snd_info_unregister(timer_entry);
+       snd_info_unregister(queues_entry);
+       snd_info_unregister(clients_entry);
+       snd_info_unregister(timer_entry);
        return 0;
 }
+#endif
 
 void snd_seq_info_queues_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer);
 
 
+#ifdef CONFIG_PROC_FS
 int snd_seq_info_init( void );
 int snd_seq_info_done( void );
-
+#else
+static inline int snd_seq_info_init(void) { return 0; }
+static inline int snd_seq_info_done(void) { return 0; }
+#endif
 
 #endif
 
 
 /*----------------------------------------------------------------*/
 
+#ifdef CONFIG_PROC_FS
 /* exported to seq_info.c */
 void snd_seq_info_queues_read(struct snd_info_entry *entry, 
                              struct snd_info_buffer *buffer)
                queuefree(q);
        }
 }
+#endif /* CONFIG_PROC_FS */
+
 
 }
 
 
+#ifdef CONFIG_PROC_FS
 /* exported to seq_info.c */
 void snd_seq_info_timer_read(struct snd_info_entry *entry,
                             struct snd_info_buffer *buffer)
                queuefree(q);
        }
 }
+#endif /* CONFIG_PROC_FS */
+