Staging: me4000: make file_operations const
[safe/jmp/linux-2.6] / drivers / bluetooth / hci_vhci.c
index 7734bc9..0bbefba 100644 (file)
 #include <net/bluetooth/bluetooth.h>
 #include <net/bluetooth/hci_core.h>
 
-#ifndef CONFIG_BT_HCIVHCI_DEBUG
-#undef  BT_DBG
-#define BT_DBG(D...)
-#endif
-
 #define VERSION "1.2"
 
 static int minor = MISC_DYNAMIC_MINOR;
@@ -318,18 +313,21 @@ static int vhci_release(struct inode *inode, struct file *file)
 static int vhci_fasync(int fd, struct file *file, int on)
 {
        struct vhci_data *data = file->private_data;
-       int err;
+       int err = 0;
 
+       lock_kernel();
        err = fasync_helper(fd, file, on, &data->fasync);
        if (err < 0)
-               return err;
+               goto out;
 
        if (on)
                data->flags |= VHCI_FASYNC;
        else
                data->flags &= ~VHCI_FASYNC;
 
-       return 0;
+out:
+       unlock_kernel();
+       return err;
 }
 
 static const struct file_operations vhci_fops = {
@@ -374,7 +372,7 @@ module_exit(vhci_exit);
 module_param(minor, int, 0444);
 MODULE_PARM_DESC(minor, "Miscellaneous minor device number");
 
-MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>, Marcel Holtmann <marcel@holtmann.org>");
+MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
 MODULE_DESCRIPTION("Bluetooth virtual HCI driver ver " VERSION);
 MODULE_VERSION(VERSION);
 MODULE_LICENSE("GPL");