aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-06-08 08:31:00 -0400
committerMarcel Holtmann <marcel@holtmann.org>2009-06-08 08:50:01 -0400
commit092b85853b161a5ca285c429faf1cf2ff4318a01 (patch)
treea86d56a5956741597930ff3e428e5b82efbe5d62 /drivers/bluetooth
parent3857abc622102b808de11ff3393d541b826ab952 (diff)
Bluetooth: Remove unused and unneeded support in virtual driver
The virtual driver implements fasync and ioctl support, but it is not used and unneeded due to its constraints via the Bluetooth core layer. So too just make the driver simpler, remove support for both of them. Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/hci_vhci.c31
1 files changed, 0 insertions, 31 deletions
diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c
index 7ebdb1d30939..1df9dda2e377 100644
--- a/drivers/bluetooth/hci_vhci.c
+++ b/drivers/bluetooth/hci_vhci.c
@@ -51,14 +51,8 @@ struct vhci_data {
51 51
52 wait_queue_head_t read_wait; 52 wait_queue_head_t read_wait;
53 struct sk_buff_head readq; 53 struct sk_buff_head readq;
54
55 struct fasync_struct *fasync;
56}; 54};
57 55
58#define VHCI_FASYNC 0x0010
59
60static struct miscdevice vhci_miscdev;
61
62static int vhci_open_dev(struct hci_dev *hdev) 56static int vhci_open_dev(struct hci_dev *hdev)
63{ 57{
64 set_bit(HCI_RUNNING, &hdev->flags); 58 set_bit(HCI_RUNNING, &hdev->flags);
@@ -105,9 +99,6 @@ static int vhci_send_frame(struct sk_buff *skb)
105 memcpy(skb_push(skb, 1), &bt_cb(skb)->pkt_type, 1); 99 memcpy(skb_push(skb, 1), &bt_cb(skb)->pkt_type, 1);
106 skb_queue_tail(&data->readq, skb); 100 skb_queue_tail(&data->readq, skb);
107 101
108 if (data->flags & VHCI_FASYNC)
109 kill_fasync(&data->fasync, SIGIO, POLL_IN);
110
111 wake_up_interruptible(&data->read_wait); 102 wake_up_interruptible(&data->read_wait);
112 103
113 return 0; 104 return 0;
@@ -293,35 +284,13 @@ static int vhci_release(struct inode *inode, struct file *file)
293 return 0; 284 return 0;
294} 285}
295 286
296static int vhci_fasync(int fd, struct file *file, int on)
297{
298 struct vhci_data *data = file->private_data;
299 int err = 0;
300
301 lock_kernel();
302 err = fasync_helper(fd, file, on, &data->fasync);
303 if (err < 0)
304 goto out;
305
306 if (on)
307 data->flags |= VHCI_FASYNC;
308 else
309 data->flags &= ~VHCI_FASYNC;
310
311out:
312 unlock_kernel();
313 return err;
314}
315
316static const struct file_operations vhci_fops = { 287static const struct file_operations vhci_fops = {
317 .owner = THIS_MODULE,
318 .read = vhci_read, 288 .read = vhci_read,
319 .write = vhci_write, 289 .write = vhci_write,
320 .poll = vhci_poll, 290 .poll = vhci_poll,
321 .ioctl = vhci_ioctl, 291 .ioctl = vhci_ioctl,
322 .open = vhci_open, 292 .open = vhci_open,
323 .release = vhci_release, 293 .release = vhci_release,
324 .fasync = vhci_fasync,
325}; 294};
326 295
327static struct miscdevice vhci_miscdev= { 296static struct miscdevice vhci_miscdev= {