diff options
Diffstat (limited to 'drivers/usb/misc/ftdi-elan.c')
-rw-r--r-- | drivers/usb/misc/ftdi-elan.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/usb/misc/ftdi-elan.c b/drivers/usb/misc/ftdi-elan.c index 9d0675ed0d4c..1edb6d361896 100644 --- a/drivers/usb/misc/ftdi-elan.c +++ b/drivers/usb/misc/ftdi-elan.c | |||
@@ -86,7 +86,7 @@ static struct list_head ftdi_static_list; | |||
86 | #define USB_FTDI_ELAN_VENDOR_ID 0x0403 | 86 | #define USB_FTDI_ELAN_VENDOR_ID 0x0403 |
87 | #define USB_FTDI_ELAN_PRODUCT_ID 0xd6ea | 87 | #define USB_FTDI_ELAN_PRODUCT_ID 0xd6ea |
88 | /* table of devices that work with this driver*/ | 88 | /* table of devices that work with this driver*/ |
89 | static struct usb_device_id ftdi_elan_table[] = { | 89 | static const struct usb_device_id ftdi_elan_table[] = { |
90 | {USB_DEVICE(USB_FTDI_ELAN_VENDOR_ID, USB_FTDI_ELAN_PRODUCT_ID)}, | 90 | {USB_DEVICE(USB_FTDI_ELAN_VENDOR_ID, USB_FTDI_ELAN_PRODUCT_ID)}, |
91 | { /* Terminating entry */ } | 91 | { /* Terminating entry */ } |
92 | }; | 92 | }; |
@@ -623,9 +623,12 @@ static void ftdi_elan_status_work(struct work_struct *work) | |||
623 | */ | 623 | */ |
624 | static int ftdi_elan_open(struct inode *inode, struct file *file) | 624 | static int ftdi_elan_open(struct inode *inode, struct file *file) |
625 | { | 625 | { |
626 | int subminor = iminor(inode); | 626 | int subminor; |
627 | struct usb_interface *interface = usb_find_interface(&ftdi_elan_driver, | 627 | struct usb_interface *interface; |
628 | subminor); | 628 | |
629 | subminor = iminor(inode); | ||
630 | interface = usb_find_interface(&ftdi_elan_driver, subminor); | ||
631 | |||
629 | if (!interface) { | 632 | if (!interface) { |
630 | printk(KERN_ERR "can't find device for minor %d\n", subminor); | 633 | printk(KERN_ERR "can't find device for minor %d\n", subminor); |
631 | return -ENODEV; | 634 | return -ENODEV; |