]> Pileus Git - ~andy/linux/blobdiff - drivers/hid/hid-multitouch.c
HID: handle all multitouch devices through hid-multitouch
[~andy/linux] / drivers / hid / hid-multitouch.c
index 2088ab4e5db5a1a4c353688804beac440d5166a4..a61ba42e1bffc2c77b2e647e53aafb0e01b33d27 100644 (file)
@@ -637,10 +637,12 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id)
        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;
+                       }
                }
        }
 
@@ -648,6 +650,7 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id)
         * 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) {