#include <linux/input/elan-i2c-ids.h>
 
 #include "hid-ids.h"
-#include "i2c-hid/i2c-hid.h"
 
 /*
  * Alphabetically sorted by vendor then product.
 static unsigned long hid_gets_squirk(const struct hid_device *hdev)
 {
        const struct hid_device_id *bl_entry;
-       unsigned long quirks = 0;
+       unsigned long quirks = hdev->initial_quirks;
 
        if (hid_match_id(hdev, hid_ignore_list))
                quirks |= HID_QUIRK_IGNORE;
                quirks = hid_gets_squirk(hdev);
        mutex_unlock(&dquirks_lock);
 
-       /* Get quirks specific to I2C devices */
-       if (IS_ENABLED(CONFIG_I2C_DMI_CORE) && IS_ENABLED(CONFIG_DMI) &&
-           hdev->bus == BUS_I2C)
-               quirks |= i2c_hid_get_dmi_quirks(hdev->vendor, hdev->product);
-
        return quirks;
 }
 EXPORT_SYMBOL_GPL(hid_lookup_quirk);
 
        hid->vendor = le16_to_cpu(ihid->hdesc.wVendorID);
        hid->product = le16_to_cpu(ihid->hdesc.wProductID);
 
+       hid->initial_quirks = quirks;
+       hid->initial_quirks |= i2c_hid_get_dmi_quirks(hid->vendor,
+                                                     hid->product);
+
        snprintf(hid->name, sizeof(hid->name), "%s %04X:%04X",
                 client->name, (u16)hid->vendor, (u16)hid->product);
        strscpy(hid->phys, dev_name(&client->dev), sizeof(hid->phys));
                goto err_mem_free;
        }
 
-       hid->quirks |= quirks;
-
        return 0;
 
 err_mem_free:
 
        unsigned long status;                                           /* see STAT flags above */
        unsigned claimed;                                               /* Claimed by hidinput, hiddev? */
        unsigned quirks;                                                /* Various quirks the device can pull on us */
+       unsigned initial_quirks;                                        /* Initial set of quirks supplied when creating device */
        bool io_started;                                                /* If IO has started */
 
        struct list_head inputs;                                        /* The list of inputs */