]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/core/hwdep.c
dm mpath: send uevents
[linux-2.6-omap-h63xx.git] / sound / core / hwdep.c
index a6a6ad0ad3c81226746573f637086fff121aa05d..bfd9d182b8a33ac3c85ec3067c51ee4642404d30 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Hardware dependent layer
- *  Copyright (c) by Jaroslav Kysela <perex@suse.cz>
+ *  Copyright (c) by Jaroslav Kysela <perex@perex.cz>
  *
  *
  *   This program is free software; you can redistribute it and/or modify
@@ -22,7 +22,6 @@
 #include <sound/driver.h>
 #include <linux/major.h>
 #include <linux/init.h>
-#include <linux/smp_lock.h>
 #include <linux/slab.h>
 #include <linux/time.h>
 #include <linux/mutex.h>
@@ -32,7 +31,7 @@
 #include <sound/hwdep.h>
 #include <sound/info.h>
 
-MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
+MODULE_AUTHOR("Jaroslav Kysela <perex@perex.cz>");
 MODULE_DESCRIPTION("Hardware dependent layer");
 MODULE_LICENSE("GPL");
 
@@ -156,15 +155,16 @@ static int snd_hwdep_release(struct inode *inode, struct file * file)
        int err = -ENXIO;
        struct snd_hwdep *hw = file->private_data;
        struct module *mod = hw->card->module;
+
        mutex_lock(&hw->open_mutex);
-       if (hw->ops.release) {
+       if (hw->ops.release)
                err = hw->ops.release(hw, file);
-               wake_up(&hw->open_wait);
-       }
        if (hw->used > 0)
                hw->used--;
-       snd_card_file_remove(hw->card, file);
        mutex_unlock(&hw->open_mutex);
+       wake_up(&hw->open_wait);
+
+       snd_card_file_remove(hw->card, file);
        module_put(mod);
        return err;
 }
@@ -316,7 +316,7 @@ static int snd_hwdep_control_ioctl(struct snd_card *card,
 
  */
 
-static struct file_operations snd_hwdep_f_ops =
+static const struct file_operations snd_hwdep_f_ops =
 {
        .owner =        THIS_MODULE,
        .llseek =       snd_hwdep_llseek,