public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hci_vhci: Elimiate BKL from ioctl handling
@ 2008-05-22 20:30 Alan Cox
  2008-05-22 20:52 ` Max Krasnyanskiy
  2008-05-22 23:57 ` Marcel Holtmann
  0 siblings, 2 replies; 3+ messages in thread
From: Alan Cox @ 2008-05-22 20:30 UTC (permalink / raw)
  To: maxk, linux-kernel

Switch to unlocked_ioctl and fix the return value to be -ENOTTY as it
should be.

Signed-off-by: Alan Cox <alan@redhat.com>

diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c
index 0638730..41002ef 100644
--- a/drivers/bluetooth/hci_vhci.c
+++ b/drivers/bluetooth/hci_vhci.c
@@ -245,10 +245,9 @@ static unsigned int vhci_poll(struct file *file, poll_table *wait)
 	return POLLOUT | POLLWRNORM;
 }
 
-static int vhci_ioctl(struct inode *inode, struct file *file,
-					unsigned int cmd, unsigned long arg)
+static long vhci_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
-	return -EINVAL;
+	return -ENOTTY;
 }
 
 static int vhci_open(struct inode *inode, struct file *file)
@@ -332,7 +331,7 @@ static const struct file_operations vhci_fops = {
 	.read		= vhci_read,
 	.write		= vhci_write,
 	.poll		= vhci_poll,
-	.ioctl		= vhci_ioctl,
+	.unlocked_ioctl	= vhci_ioctl,
 	.open		= vhci_open,
 	.release	= vhci_release,
 	.fasync		= vhci_fasync,

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-05-22 23:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-22 20:30 [PATCH] hci_vhci: Elimiate BKL from ioctl handling Alan Cox
2008-05-22 20:52 ` Max Krasnyanskiy
2008-05-22 23:57 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox