lkml.org 
[lkml]   [2019]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2 1/3] platform/x86: wmi: move struct wmi_device_id to mod_devicetable.h
On Sun, Jan 27, 2019 at 9:04 PM Mattias Jacobsson <2pi@mok.nu> wrote:
>
> 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.

Below some minor comments.

> - while (id->guid_string) {
> + while (id->guid_string[0] != '\0') {

Hmm.. I would rather put it as

while (*id->guid_string) {

> +#define WMI_MODULE_PREFIX "wmi:"

> +#define WMI_GUID_STRING_LEN 36

Isn't this already defined in UUID namespace?
(include/linux/uuid.h IIRC)

> #include <linux/device.h>
> #include <linux/acpi.h>

> +#include <linux/mod_devicetable.h>

Not sure it's needed since acpi.h includes that.

--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2019-01-27 21:21    [W:0.114 / U:9.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site