Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 104575
b: refs/heads/master
c: 5cb4aec
h: refs/heads/master
i:
  104573: 82dd9bb
  104571: 08b681f
  104567: ac6a682
  104559: 16ede3d
  104543: d56859b
  104511: 13a002a
  104447: 36ecbd6
v: v3
  • Loading branch information
Alan Cox authored and Greg Kroah-Hartman committed Jul 21, 2008
1 parent 9aff38e commit 9f2f3e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1160d0765660e14b44dffd931b28a3875d5d9e46
refs/heads/master: 5cb4aeca8e8c29605703be5576825eb3257d8a92
6 changes: 4 additions & 2 deletions trunk/drivers/usb/misc/usblcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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,
};

Expand Down

0 comments on commit 9f2f3e4

Please sign in to comment.