summaryrefslogtreecommitdiffstats
path: root/drivers/usb/misc/usblcd.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-08-11 13:27:47 +0200
committerIngo Molnar <mingo@elte.hu>2008-08-11 13:27:47 +0200
commitc4c0c56a7a85ed5725786219e4fbca7e840b1531 (patch)
treec9d6b35a571fd5e80ddf5bf4a60142480eaa18d8 /drivers/usb/misc/usblcd.c
parentrcu classic: new algorithm for callbacks-processing(v2) (diff)
parentMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/c... (diff)
downloadlinux-c4c0c56a7a85ed5725786219e4fbca7e840b1531.tar.xz
linux-c4c0c56a7a85ed5725786219e4fbca7e840b1531.zip
Merge branch 'linus' into core/rcu
Diffstat (limited to 'drivers/usb/misc/usblcd.c')
-rw-r--r--drivers/usb/misc/usblcd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/misc/usblcd.c b/drivers/usb/misc/usblcd.c
index 7f7021ee4189..2db4228fbb01 100644
--- a/drivers/usb/misc/usblcd.c
+++ b/drivers/usb/misc/usblcd.c
@@ -146,7 +146,7 @@ static ssize_t lcd_read(struct file *file, char __user * buffer, size_t count, l
return retval;
}
-static int lcd_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
+static long lcd_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
struct usb_lcd *dev;
u16 bcdDevice;
@@ -158,12 +158,14 @@ static int lcd_ioctl(struct inode *inode, struct file *file, unsigned int cmd, u
switch (cmd) {
case IOCTL_GET_HARD_VERSION:
+ lock_kernel();
bcdDevice = le16_to_cpu((dev->udev)->descriptor.bcdDevice);
sprintf(buf,"%1d%1d.%1d%1d",
(bcdDevice & 0xF000)>>12,
(bcdDevice & 0xF00)>>8,
(bcdDevice & 0xF0)>>4,
(bcdDevice & 0xF));
+ unlock_kernel();
if (copy_to_user((void __user *)arg,buf,strlen(buf))!=0)
return -EFAULT;
break;
@@ -272,7 +274,7 @@ static const struct file_operations lcd_fops = {
.read = lcd_read,
.write = lcd_write,
.open = lcd_open,
- .ioctl = lcd_ioctl,
+ .unlocked_ioctl = lcd_ioctl,
.release = lcd_release,
};