]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/core/seq/oss/seq_oss.c
ALSA: Kill snd_assert() in sound/core/*
[linux-2.6-omap-h63xx.git] / sound / core / seq / oss / seq_oss.c
index 2eb987308b539af5f321c9ea0c7264ca24a56a33..f25e3cc7ddfa53b4aa9244abe3fdf776146d7958 100644 (file)
@@ -20,9 +20,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
 
-#include <sound/driver.h>
 #include <linux/init.h>
-#include <linux/smp_lock.h>
 #include <linux/moduleparam.h>
 #include <linux/mutex.h>
 #include <sound/core.h>
@@ -166,7 +164,8 @@ odev_read(struct file *file, char __user *buf, size_t count, loff_t *offset)
 {
        struct seq_oss_devinfo *dp;
        dp = file->private_data;
-       snd_assert(dp != NULL, return -EIO);
+       if (snd_BUG_ON(!dp))
+               return -ENXIO;
        return snd_seq_oss_read(dp, buf, count);
 }
 
@@ -176,7 +175,8 @@ odev_write(struct file *file, const char __user *buf, size_t count, loff_t *offs
 {
        struct seq_oss_devinfo *dp;
        dp = file->private_data;
-       snd_assert(dp != NULL, return -EIO);
+       if (snd_BUG_ON(!dp))
+               return -ENXIO;
        return snd_seq_oss_write(dp, buf, count, file);
 }
 
@@ -185,7 +185,8 @@ odev_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
        struct seq_oss_devinfo *dp;
        dp = file->private_data;
-       snd_assert(dp != NULL, return -EIO);
+       if (snd_BUG_ON(!dp))
+               return -ENXIO;
        return snd_seq_oss_ioctl(dp, cmd, arg);
 }
 
@@ -200,7 +201,8 @@ odev_poll(struct file *file, poll_table * wait)
 {
        struct seq_oss_devinfo *dp;
        dp = file->private_data;
-       snd_assert(dp != NULL, return 0);
+       if (snd_BUG_ON(!dp))
+               return -ENXIO;
        return snd_seq_oss_poll(dp, file, wait);
 }