diff options
author | Mattias Jacobsson <2pi@mok.nu> | 2019-02-19 20:59:49 +0100 |
---|---|---|
committer | Darren Hart (VMware) <dvhart@infradead.org> | 2019-03-07 17:46:07 +0100 |
commit | eacc95eae6837d3f41aed7d30b855a79ab2cb101 (patch) | |
tree | 7626e82bcc2d50f90555db0535eddf3ab64728cc /drivers/platform/x86/wmi.c | |
parent | modpost: file2alias: define size of alias (diff) | |
download | linux-eacc95eae6837d3f41aed7d30b855a79ab2cb101.tar.xz linux-eacc95eae6837d3f41aed7d30b855a79ab2cb101.zip |
platform/x86: wmi: move struct wmi_device_id to mod_devicetable.h
In preparation for adding WMI support to MODULE_DEVICE_TABLE() move the
definition of struct wmi_device_id to mod_devicetable.h and inline
guid_string in the struct.
Changing guid_string to an inline char array changes the loop conditions
when looping over an array of struct wmi_device_id. Therefore update
wmi_dev_match()'s loop to check for an empty guid_string instead of a
NULL pointer.
Signed-off-by: Mattias Jacobsson <2pi@mok.nu>
[dvhart: Move UUID_STRING_LEN define to this patch]
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
Diffstat (limited to 'drivers/platform/x86/wmi.c')
-rw-r--r-- | drivers/platform/x86/wmi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index b0f3d8ecd898..7b26b6ccf1a0 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c @@ -771,7 +771,7 @@ static int wmi_dev_match(struct device *dev, struct device_driver *driver) if (id == NULL) return 0; - while (id->guid_string) { + while (*id->guid_string) { uuid_le driver_guid; if (WARN_ON(uuid_le_to_bin(id->guid_string, &driver_guid))) |