Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid
Pull HID fixes from Jiri Kosina: - fix for Intel-ISH driver to make sure it gets aoutoloaded only on matching devices and not universally (Thomas Weißschuh) - fix for Wacom driver reporting invalid contact under certain circumstances (Jason Gerecke) - probing fix for ft260 dirver (Michael Zaidman) - fix for generic keycode remapping (Thomas Weißschuh) - fix for division by zero in hid-magicmouse (Claudia Pellegrino) - other tiny assorted fixes and new device IDs * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: multitouch: Fix Iiyama ProLite T1931SAW (0eef:0001 again!) HID: nintendo: eliminate dead datastructures in !CONFIG_NINTENDO_FF case HID: magicmouse: prevent division by 0 on scroll HID: thrustmaster: fix sparse warnings HID: Ignore battery for Elan touchscreen on HP Envy X360 15-eu0xxx HID: input: set usage type to key on keycode remap HID: input: Fix parsing of HID_CP_CONSUMER_CONTROL fields HID: ft260: fix i2c probing for hwmon devices Revert "HID: hid-asus.c: Maps key 0x35 (display off) to KEY_SCREENLOCK" HID: intel-ish-hid: fix module device-id handling mod_devicetable: fix kdocs for ishtp_device_id HID: wacom: Use "Confidence" flag to prevent reporting invalid contacts HID: nintendo: unlock on error in joycon_leds_create() platform/x86: isthp_eclite: only load for matching devices platform/chrome: chros_ec_ishtp: only load for matching devices HID: intel-ish-hid: hid-client: only load for matching devices HID: intel-ish-hid: fw-loader: only load for matching devices HID: intel-ish-hid: use constants for modaliases HID: intel-ish-hid: add support for MODULE_DEVICE_TABLE()
This commit is contained in:
@@ -259,5 +259,8 @@ int main(void)
|
||||
DEVID_FIELD(dfl_device_id, type);
|
||||
DEVID_FIELD(dfl_device_id, feature_id);
|
||||
|
||||
DEVID(ishtp_device_id);
|
||||
DEVID_FIELD(ishtp_device_id, guid);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -115,6 +115,17 @@ static inline void add_uuid(char *str, uuid_le uuid)
|
||||
uuid.b[12], uuid.b[13], uuid.b[14], uuid.b[15]);
|
||||
}
|
||||
|
||||
static inline void add_guid(char *str, guid_t guid)
|
||||
{
|
||||
int len = strlen(str);
|
||||
|
||||
sprintf(str + len, "%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X",
|
||||
guid.b[3], guid.b[2], guid.b[1], guid.b[0],
|
||||
guid.b[5], guid.b[4], guid.b[7], guid.b[6],
|
||||
guid.b[8], guid.b[9], guid.b[10], guid.b[11],
|
||||
guid.b[12], guid.b[13], guid.b[14], guid.b[15]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check that sizeof(device_id type) are consistent with size of section
|
||||
* in .o file. If in-consistent then userspace and kernel does not agree
|
||||
@@ -1380,6 +1391,18 @@ static int do_mhi_entry(const char *filename, void *symval, char *alias)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Looks like: ishtp:{guid} */
|
||||
static int do_ishtp_entry(const char *filename, void *symval, char *alias)
|
||||
{
|
||||
DEF_FIELD(symval, ishtp_device_id, guid);
|
||||
|
||||
strcpy(alias, ISHTP_MODULE_PREFIX "{");
|
||||
add_guid(alias, guid);
|
||||
strcat(alias, "}");
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int do_auxiliary_entry(const char *filename, void *symval, char *alias)
|
||||
{
|
||||
DEF_FIELD_ADDR(symval, auxiliary_device_id, name);
|
||||
@@ -1499,6 +1522,7 @@ static const struct devtable devtable[] = {
|
||||
{"auxiliary", SIZE_auxiliary_device_id, do_auxiliary_entry},
|
||||
{"ssam", SIZE_ssam_device_id, do_ssam_entry},
|
||||
{"dfl", SIZE_dfl_device_id, do_dfl_entry},
|
||||
{"ishtp", SIZE_ishtp_device_id, do_ishtp_entry},
|
||||
};
|
||||
|
||||
/* Create MODULE_ALIAS() statements.
|
||||
|
||||
Reference in New Issue
Block a user