]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/core/seq/seq_device.c
ALSA: Kill snd_assert() in sound/core/*
[linux-2.6-omap-h63xx.git] / sound / core / seq / seq_device.c
index 2f00ad28a2b73e1089df52642106aa2d4f82a8fe..1f997675c893bbeb50fd01c530007540bc7a86fd 100644 (file)
@@ -124,7 +124,7 @@ static void snd_seq_device_info(struct snd_info_entry *entry,
  * load all registered drivers (called from seq_clientmgr.c)
  */
 
-#ifdef CONFIG_KMOD
+#ifdef CONFIG_MODULES
 /* avoid auto-loading during module_init() */
 static int snd_seq_in_init;
 void snd_seq_autoload_lock(void)
@@ -140,7 +140,7 @@ void snd_seq_autoload_unlock(void)
 
 void snd_seq_device_load_drivers(void)
 {
-#ifdef CONFIG_KMOD
+#ifdef CONFIG_MODULES
        struct ops_list *ops;
 
        /* Calling request_module during module_init()
@@ -187,7 +187,8 @@ int snd_seq_device_new(struct snd_card *card, int device, char *id, int argsize,
        if (result)
                *result = NULL;
 
-       snd_assert(id != NULL, return -EINVAL);
+       if (snd_BUG_ON(!id))
+               return -EINVAL;
 
        ops = find_driver(id, 1);
        if (ops == NULL)
@@ -232,7 +233,8 @@ static int snd_seq_device_free(struct snd_seq_device *dev)
 {
        struct ops_list *ops;
 
-       snd_assert(dev != NULL, return -EINVAL);
+       if (snd_BUG_ON(!dev))
+               return -EINVAL;
 
        ops = find_driver(dev->id, 0);
        if (ops == NULL)
@@ -566,7 +568,5 @@ EXPORT_SYMBOL(snd_seq_device_load_drivers);
 EXPORT_SYMBOL(snd_seq_device_new);
 EXPORT_SYMBOL(snd_seq_device_register_driver);
 EXPORT_SYMBOL(snd_seq_device_unregister_driver);
-#ifdef CONFIG_KMOD
 EXPORT_SYMBOL(snd_seq_autoload_lock);
 EXPORT_SYMBOL(snd_seq_autoload_unlock);
-#endif