diff options
Diffstat (limited to 'drivers/usb/input')
| -rw-r--r-- | drivers/usb/input/aiptek.c | 2 | ||||
| -rw-r--r-- | drivers/usb/input/hid-core.c | 5 | ||||
| -rw-r--r-- | drivers/usb/input/hiddev.c | 3 | ||||
| -rw-r--r-- | drivers/usb/input/map_to_7segment.h | 2 | ||||
| -rw-r--r-- | drivers/usb/input/touchkitusb.c | 2 |
5 files changed, 8 insertions, 6 deletions
diff --git a/drivers/usb/input/aiptek.c b/drivers/usb/input/aiptek.c index 1c5205321d83..1c3b472a3bca 100644 --- a/drivers/usb/input/aiptek.c +++ b/drivers/usb/input/aiptek.c | |||
| @@ -2154,7 +2154,7 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id) | |||
| 2154 | * input_handles associated with this input device. | 2154 | * input_handles associated with this input device. |
| 2155 | * What identifies an evdev input_handler is that it begins | 2155 | * What identifies an evdev input_handler is that it begins |
| 2156 | * with 'event', continues with a digit, and that in turn | 2156 | * with 'event', continues with a digit, and that in turn |
| 2157 | * is mapped to /{devfs}/input/eventN. | 2157 | * is mapped to input/eventN. |
| 2158 | */ | 2158 | */ |
| 2159 | list_for_each_safe(node, next, &inputdev->h_list) { | 2159 | list_for_each_safe(node, next, &inputdev->h_list) { |
| 2160 | inputhandle = to_handle(node); | 2160 | inputhandle = to_handle(node); |
diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c index 411a0645a7a3..79ddce4555ab 100644 --- a/drivers/usb/input/hid-core.c +++ b/drivers/usb/input/hid-core.c | |||
| @@ -1784,6 +1784,9 @@ static struct hid_device *usb_hid_configure(struct usb_interface *intf) | |||
| 1784 | hid->urbctrl->transfer_dma = hid->ctrlbuf_dma; | 1784 | hid->urbctrl->transfer_dma = hid->ctrlbuf_dma; |
| 1785 | hid->urbctrl->transfer_flags |= (URB_NO_TRANSFER_DMA_MAP | URB_NO_SETUP_DMA_MAP); | 1785 | hid->urbctrl->transfer_flags |= (URB_NO_TRANSFER_DMA_MAP | URB_NO_SETUP_DMA_MAP); |
| 1786 | 1786 | ||
| 1787 | /* May be needed for some devices */ | ||
| 1788 | usb_clear_halt(hid->dev, hid->urbin->pipe); | ||
| 1789 | |||
| 1787 | return hid; | 1790 | return hid; |
| 1788 | 1791 | ||
| 1789 | fail: | 1792 | fail: |
| @@ -1887,7 +1890,6 @@ static int hid_suspend(struct usb_interface *intf, pm_message_t message) | |||
| 1887 | struct hid_device *hid = usb_get_intfdata (intf); | 1890 | struct hid_device *hid = usb_get_intfdata (intf); |
| 1888 | 1891 | ||
| 1889 | usb_kill_urb(hid->urbin); | 1892 | usb_kill_urb(hid->urbin); |
| 1890 | intf->dev.power.power_state = PMSG_SUSPEND; | ||
| 1891 | dev_dbg(&intf->dev, "suspend\n"); | 1893 | dev_dbg(&intf->dev, "suspend\n"); |
| 1892 | return 0; | 1894 | return 0; |
| 1893 | } | 1895 | } |
| @@ -1897,7 +1899,6 @@ static int hid_resume(struct usb_interface *intf) | |||
| 1897 | struct hid_device *hid = usb_get_intfdata (intf); | 1899 | struct hid_device *hid = usb_get_intfdata (intf); |
| 1898 | int status; | 1900 | int status; |
| 1899 | 1901 | ||
| 1900 | intf->dev.power.power_state = PMSG_ON; | ||
| 1901 | if (hid->open) | 1902 | if (hid->open) |
| 1902 | status = usb_submit_urb(hid->urbin, GFP_NOIO); | 1903 | status = usb_submit_urb(hid->urbin, GFP_NOIO); |
| 1903 | else | 1904 | else |
diff --git a/drivers/usb/input/hiddev.c b/drivers/usb/input/hiddev.c index d32427818af7..440377c7a0da 100644 --- a/drivers/usb/input/hiddev.c +++ b/drivers/usb/input/hiddev.c | |||
| @@ -732,9 +732,8 @@ static struct file_operations hiddev_fops = { | |||
| 732 | }; | 732 | }; |
| 733 | 733 | ||
| 734 | static struct usb_class_driver hiddev_class = { | 734 | static struct usb_class_driver hiddev_class = { |
| 735 | .name = "usb/hid/hiddev%d", | 735 | .name = "hiddev%d", |
| 736 | .fops = &hiddev_fops, | 736 | .fops = &hiddev_fops, |
| 737 | .mode = S_IFCHR | S_IRUGO | S_IWUSR, | ||
| 738 | .minor_base = HIDDEV_MINOR_BASE, | 737 | .minor_base = HIDDEV_MINOR_BASE, |
| 739 | }; | 738 | }; |
| 740 | 739 | ||
diff --git a/drivers/usb/input/map_to_7segment.h b/drivers/usb/input/map_to_7segment.h index 52ff27f15127..a424094d9fe2 100644 --- a/drivers/usb/input/map_to_7segment.h +++ b/drivers/usb/input/map_to_7segment.h | |||
| @@ -79,7 +79,7 @@ struct seg7_conversion_map { | |||
| 79 | 79 | ||
| 80 | static inline int map_to_seg7(struct seg7_conversion_map *map, int c) | 80 | static inline int map_to_seg7(struct seg7_conversion_map *map, int c) |
| 81 | { | 81 | { |
| 82 | return c & 0x7f ? map->table[c] : -EINVAL; | 82 | return c >= 0 && c < sizeof(map->table) ? map->table[c] : -EINVAL; |
| 83 | } | 83 | } |
| 84 | 84 | ||
| 85 | #define SEG7_CONVERSION_MAP(_name, _map) \ | 85 | #define SEG7_CONVERSION_MAP(_name, _map) \ |
diff --git a/drivers/usb/input/touchkitusb.c b/drivers/usb/input/touchkitusb.c index 3766ccc271be..0043e6ebcd1f 100644 --- a/drivers/usb/input/touchkitusb.c +++ b/drivers/usb/input/touchkitusb.c | |||
| @@ -75,7 +75,9 @@ struct touchkit_usb { | |||
| 75 | 75 | ||
| 76 | static struct usb_device_id touchkit_devices[] = { | 76 | static struct usb_device_id touchkit_devices[] = { |
| 77 | {USB_DEVICE(0x3823, 0x0001)}, | 77 | {USB_DEVICE(0x3823, 0x0001)}, |
| 78 | {USB_DEVICE(0x0123, 0x0001)}, | ||
| 78 | {USB_DEVICE(0x0eef, 0x0001)}, | 79 | {USB_DEVICE(0x0eef, 0x0001)}, |
| 80 | {USB_DEVICE(0x0eef, 0x0002)}, | ||
| 79 | {} | 81 | {} |
| 80 | }; | 82 | }; |
| 81 | 83 | ||
