git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bluetooth: Fix miscdev ops owner for virtual driver
[pandora-kernel.git]
/
drivers
/
bluetooth
/
hci_vhci.c
diff --git
a/drivers/bluetooth/hci_vhci.c
b/drivers/bluetooth/hci_vhci.c
index
1df9dda
..
7595274
100644
(file)
--- a/
drivers/bluetooth/hci_vhci.c
+++ b/
drivers/bluetooth/hci_vhci.c
@@
-28,7
+28,6
@@
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/slab.h>
-#include <linux/smp_lock.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/sched.h>
#include <linux/types.h>
#include <linux/errno.h>
#include <linux/sched.h>
@@
-42,8
+41,6
@@
#define VERSION "1.3"
#define VERSION "1.3"
-static int minor = MISC_DYNAMIC_MINOR;
-
struct vhci_data {
struct hci_dev *hdev;
struct vhci_data {
struct hci_dev *hdev;
@@
-219,12
+216,6
@@
static unsigned int vhci_poll(struct file *file, poll_table *wait)
return POLLOUT | POLLWRNORM;
}
return POLLOUT | POLLWRNORM;
}
-static int vhci_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, unsigned long arg)
-{
- return -EINVAL;
-}
-
static int vhci_open(struct inode *inode, struct file *file)
{
struct vhci_data *data;
static int vhci_open(struct inode *inode, struct file *file)
{
struct vhci_data *data;
@@
-285,10
+276,10
@@
static int vhci_release(struct inode *inode, struct file *file)
}
static const struct file_operations vhci_fops = {
}
static const struct file_operations vhci_fops = {
+ .owner = THIS_MODULE,
.read = vhci_read,
.write = vhci_write,
.poll = vhci_poll,
.read = vhci_read,
.write = vhci_write,
.poll = vhci_poll,
- .ioctl = vhci_ioctl,
.open = vhci_open,
.release = vhci_release,
};
.open = vhci_open,
.release = vhci_release,
};
@@
-303,18
+294,12
@@
static int __init vhci_init(void)
{
BT_INFO("Virtual HCI driver ver %s", VERSION);
{
BT_INFO("Virtual HCI driver ver %s", VERSION);
- if (misc_register(&vhci_miscdev) < 0) {
- BT_ERR("Can't register misc device with minor %d", minor);
- return -EIO;
- }
-
- return 0;
+ return misc_register(&vhci_miscdev);
}
static void __exit vhci_exit(void)
{
}
static void __exit vhci_exit(void)
{
- if (misc_deregister(&vhci_miscdev) < 0)
- BT_ERR("Can't unregister misc device with minor %d", minor);
+ misc_deregister(&vhci_miscdev);
}
module_init(vhci_init);
}
module_init(vhci_init);