From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: maxk@qualcomm.com, linux-kernel@vger.kernel.org
Subject: [PATCH] hci_vhci: Elimiate BKL from ioctl handling
Date: Thu, 22 May 2008 21:30:20 +0100 [thread overview]
Message-ID: <20080522213020.498327ed@core> (raw)
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,
next reply other threads:[~2008-05-22 20:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-22 20:30 Alan Cox [this message]
2008-05-22 20:52 ` [PATCH] hci_vhci: Elimiate BKL from ioctl handling Max Krasnyanskiy
2008-05-22 23:57 ` Marcel Holtmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080522213020.498327ed@core \
--to=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=maxk@qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox