aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2008-05-22 22:46:25 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2008-07-21 15:16:20 -0700
commitf1b5a7fe1718393f67fa6222a1cc27f97e12c4b3 (patch)
tree5c56c6225a5450a43f993984c009bd2fb89e5690 /drivers/usb
parent824f16fda56a88267aba9b2580d7566cf56a0860 (diff)
USB: auerwald: Push down the BKL into the driver
Also fix the unknown ioctl return code Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/misc/auerswald.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c
index 09393869742..d2f61d5510e 100644
--- a/drivers/usb/misc/auerswald.c
+++ b/drivers/usb/misc/auerswald.c
@@ -1421,7 +1421,8 @@ ofail: mutex_unlock(&cp->mutex);
/* IOCTL functions */
-static int auerchar_ioctl (struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
+static long auerchar_ioctl(struct file *file, unsigned int cmd,
+ unsigned long arg)
{
pauerchar_t ccp = (pauerchar_t) file->private_data;
int ret = 0;
@@ -1452,7 +1453,7 @@ static int auerchar_ioctl (struct inode *inode, struct file *file, unsigned int
mutex_unlock(&ccp->mutex);
return -ENODEV;
}
-
+ lock_kernel();
switch (cmd) {
/* return != 0 if Transmitt channel ready to send */
@@ -1547,9 +1548,10 @@ static int auerchar_ioctl (struct inode *inode, struct file *file, unsigned int
default:
dbg ("IOCTL_AU_UNKNOWN");
- ret = -ENOIOCTLCMD;
+ ret = -ENOTTY;
break;
}
+ unlock_kernel();
/* release the mutexes */
mutex_unlock(&cp->mutex);
mutex_unlock(&ccp->mutex);
@@ -1860,7 +1862,7 @@ static const struct file_operations auerswald_fops =
.llseek = no_llseek,
.read = auerchar_read,
.write = auerchar_write,
- .ioctl = auerchar_ioctl,
+ .unlocked_ioctl = auerchar_ioctl,
.open = auerchar_open,
.release = auerchar_release,
};