hdev->claimed |= HID_CLAIMED_INPUT;
if (hdev->quirks & HID_QUIRK_MULTITOUCH) {
/* this device should be handled by hid-multitouch, skip it */
- hdev->quirks &= ~HID_QUIRK_MULTITOUCH;
return -ENODEV;
}
struct hid_driver *hdrv = container_of(drv, struct hid_driver, driver);
struct hid_device *hdev = container_of(dev, struct hid_device, dev);
+ if ((hdev->quirks & HID_QUIRK_MULTITOUCH) &&
+ !strncmp(hdrv->name, "hid-multitouch", 14))
+ return 1;
+
if (!hid_match_device(hdev, hdrv))
return 0;
if (!hdev->driver) {
id = hid_match_device(hdev, hdrv);
if (id == NULL) {
- ret = -ENODEV;
- goto unlock;
+ if (!((hdev->quirks & HID_QUIRK_MULTITOUCH) &&
+ !strncmp(hdrv->name, "hid-multitouch", 14))) {
+ ret = -ENODEV;
+ goto unlock;
+ }
}
hdev->driver = hdrv;
struct mt_device *td;
struct mt_class *mtclass = mt_classes; /* MT_CLS_DEFAULT */
- for (i = 0; mt_classes[i].name ; i++) {
- if (id->driver_data == mt_classes[i].name) {
- mtclass = &(mt_classes[i]);
- break;
+ if (id) {
+ for (i = 0; mt_classes[i].name ; i++) {
+ if (id->driver_data == mt_classes[i].name) {
+ mtclass = &(mt_classes[i]);
+ break;
+ }
}
}
* that emit events over several HID messages.
*/
hdev->quirks |= HID_QUIRK_NO_INPUT_SYNC;
+ hdev->quirks &= ~HID_QUIRK_MULTITOUCH;
td = kzalloc(sizeof(struct mt_device), GFP_KERNEL);
if (!td) {