]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 13 Dec 2012 20:00:48 +0000 (12:00 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 13 Dec 2012 20:00:48 +0000 (12:00 -0800)
Pull HID subsystem updates from Jiri Kosina:

 1) Support for HID over I2C bus has been added by Benjamin Tissoires.
    ACPI device discovery is still in the works.

 2) Support for Win8 Multitiouch protocol is being added, most work done
    by Benjamin Tissoires as well

 3) EIO/ERESTARTSYS is fixed in hiddev/hidraw, fixes by Andrew Duggan
    and Jiri Kosina

 4) ION iCade driver added by Bastien Nocera

 5) Support for a couple new Roccat devices has been added by Stefan
    Achatz

 6) HID sensor hubs are now auto-detected instead of having to list all
    the VID/PID combinations in the blacklist array

 7) other random fixes and support for new device IDs

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (65 commits)
  HID: i2c-hid: add mutex protecting open/close race
  Revert "HID: sensors: add to special driver list"
  HID: sensors: autodetect USB HID sensor hubs
  HID: hidp: fallback to input session properly if hid is blacklisted
  HID: i2c-hid: fix ret_count check
  HID: i2c-hid: fix i2c_hid_get_raw_report count mismatches
  HID: i2c-hid: remove extra .irq field in struct i2c_hid
  HID: i2c-hid: reorder allocation/free of buffers
  HID: i2c-hid: fix memory corruption due to missing hid declaration
  HID: i2c-hid: remove superfluous include
  HID: i2c-hid: remove unneeded test in i2c_hid_remove
  HID: i2c-hid: i2c_hid_get_report may fail
  HID: i2c-hid: also call i2c_hid_free_buffers in i2c_hid_remove
  HID: i2c-hid: fix error messages
  HID: i2c-hid: fix return paths
  HID: i2c-hid: remove unused static declarations
  HID: i2c-hid: fix i2c_hid_dbg macro
  HID: i2c-hid: fix checkpatch.pl warning
  HID: i2c-hid: enhance Kconfig
  HID: i2c-hid: change I2C name
  ...

1  2 
drivers/input/input-mt.c
net/bluetooth/hidp/core.c

diff --combined drivers/input/input-mt.c
index 1abbc170d8b77f302154323a0ea944474bfd5d37,475b9d424eed8d32dc3cff5a502f982452c87ca0..8c4b50fd9a79b59fcb15ce254d6fa835aa9eb4d9
@@@ -26,14 -26,10 +26,14 @@@ static void copy_abs(struct input_dev *
   * input_mt_init_slots() - initialize MT input slots
   * @dev: input device supporting MT events and finger tracking
   * @num_slots: number of slots used by the device
 + * @flags: mt tasks to handle in core
   *
   * This function allocates all necessary memory for MT slot handling
   * in the input device, prepares the ABS_MT_SLOT and
   * ABS_MT_TRACKING_ID events for use and sets up appropriate buffers.
 + * Depending on the flags set, it also performs pointer emulation and
 + * frame synchronization.
 + *
   * May be called repeatedly. Returns -EINVAL if attempting to
   * reinitialize with a different number of slots.
   */
@@@ -251,7 -247,7 +251,7 @@@ void input_mt_sync_frame(struct input_d
  
        if (mt->flags & INPUT_MT_DROP_UNUSED) {
                for (s = mt->slots; s != mt->slots + mt->num_slots; s++) {
-                       if (s->frame == mt->frame)
+                       if (input_mt_is_used(mt, s))
                                continue;
                        input_mt_slot(dev, s - mt->slots);
                        input_event(dev, EV_ABS, ABS_MT_TRACKING_ID, -1);
index 0c0028463fa3479f5448053772b14fe11360fa49,1f4a32bb29711654d04fe7ad426234123696db1c..b2bcbe2dc328ba8473227035c39a7ff467ee5659
@@@ -932,12 -932,8 +932,12 @@@ static int hidp_setup_hid(struct hidp_s
        hid->country = req->country;
  
        strncpy(hid->name, req->name, 128);
 -      strncpy(hid->phys, batostr(&bt_sk(session->ctrl_sock->sk)->src), 64);
 -      strncpy(hid->uniq, batostr(&bt_sk(session->ctrl_sock->sk)->dst), 64);
 +
 +      snprintf(hid->phys, sizeof(hid->phys), "%pMR",
 +               &bt_sk(session->ctrl_sock->sk)->src);
 +
 +      snprintf(hid->uniq, sizeof(hid->uniq), "%pMR",
 +               &bt_sk(session->ctrl_sock->sk)->dst);
  
        hid->dev.parent = &session->conn->dev;
        hid->ll_driver = &hidp_hid_driver;
        hid->hid_get_raw_report = hidp_get_raw_report;
        hid->hid_output_raw_report = hidp_output_raw_report;
  
+       /* True if device is blacklisted in drivers/hid/hid-core.c */
+       if (hid_ignore(hid)) {
+               hid_destroy_device(session->hid);
+               session->hid = NULL;
+               return -ENODEV;
+       }
        return 0;
  
  fault:
@@@ -1017,7 -1020,7 +1024,7 @@@ int hidp_add_connection(struct hidp_con
  
        if (req->rd_size > 0) {
                err = hidp_setup_hid(session, req);
-               if (err)
+               if (err && err != -ENODEV)
                        goto purge;
        }