nlm: Ensure callback code also checks that the files match
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / include / linux / mod_devicetable.h
index b508016fb76d3b912101695059044318d56150f4..d31364857aa8623c2acdeb14d29f37d6e51ddad0 100644 (file)
@@ -397,6 +397,7 @@ struct virtio_device_id {
 /*
  * For Hyper-V devices we use the device guid as the id.
  */
+#define vmbus_device_id hv_vmbus_device_id
 struct hv_vmbus_device_id {
        __u8 guid[16];
        kernel_ulong_t driver_data;     /* Data private to the driver */
@@ -456,7 +457,8 @@ enum dmi_field {
 };
 
 struct dmi_strmatch {
-       unsigned char slot;
+       unsigned char slot:7;
+       unsigned char exact_match:1;
        char substr[79];
 };
 
@@ -474,7 +476,8 @@ struct dmi_system_id {
  */
 #define dmi_device_id dmi_system_id
 
-#define DMI_MATCH(a, b)        { a, b }
+#define DMI_MATCH(a, b)        { .slot = a, .substr = b }
+#define DMI_EXACT_MATCH(a, b)  { .slot = a, .substr = b, .exact_match = 1 }
 
 #define PLATFORM_NAME_SIZE     20
 #define PLATFORM_MODULE_PREFIX "platform:"
@@ -545,6 +548,11 @@ struct amba_id {
  * See documentation of "x86_match_cpu" for details.
  */
 
+/*
+ * MODULE_DEVICE_TABLE expects this struct to be called x86cpu_device_id.
+ * Although gcc seems to ignore this error, clang fails without this define.
+ */
+#define x86cpu_device_id x86_cpu_id
 struct x86_cpu_id {
        __u16 vendor;
        __u16 family;
@@ -572,6 +580,7 @@ struct ipack_device_id {
 #define MEI_CL_MODULE_PREFIX "mei:"
 #define MEI_CL_NAME_SIZE 32
 
+#define mei_device_id mei_cl_device_id
 struct mei_cl_device_id {
        char name[MEI_CL_NAME_SIZE];
        kernel_ulong_t driver_info;