]> git.baikalelectronics.ru Git - kernel.git/commitdiff
platform/x86: wmi: Replace UUID redefinitions by their originals
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 21 Apr 2017 13:36:06 +0000 (16:36 +0300)
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 23 Apr 2020 14:03:54 +0000 (17:03 +0300)
There are types and helpers that are redefined with old names.
Convert the WMI library to use those types and helpers directly.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/wmi.c

index 941739db7199f1ed975f8a9ff9be50db104a9a33..45252ed30d57c61d7028cdfccf3f7588062f5a25 100644 (file)
@@ -111,11 +111,11 @@ static struct platform_driver acpi_wmi_driver = {
 
 static bool find_guid(const char *guid_string, struct wmi_block **out)
 {
-       uuid_le guid_input;
+       guid_t guid_input;
        struct wmi_block *wblock;
        struct guid_block *block;
 
-       if (uuid_le_to_bin(guid_string, &guid_input))
+       if (guid_parse(guid_string, &guid_input))
                return false;
 
        list_for_each_entry(wblock, &wmi_block_list, list) {
@@ -134,7 +134,7 @@ static const void *find_guid_context(struct wmi_block *wblock,
                                      struct wmi_driver *wdriver)
 {
        const struct wmi_device_id *id;
-       uuid_le guid_input;
+       guid_t guid_input;
 
        if (wblock == NULL || wdriver == NULL)
                return NULL;
@@ -143,7 +143,7 @@ static const void *find_guid_context(struct wmi_block *wblock,
 
        id = wdriver->id_table;
        while (*id->guid_string) {
-               if (uuid_le_to_bin(id->guid_string, &guid_input))
+               if (guid_parse(id->guid_string, &guid_input))
                        continue;
                if (!memcmp(wblock->gblock.guid, &guid_input, 16))
                        return id->context;
@@ -520,12 +520,12 @@ wmi_notify_handler handler, void *data)
 {
        struct wmi_block *block;
        acpi_status status = AE_NOT_EXIST;
-       uuid_le guid_input;
+       guid_t guid_input;
 
        if (!guid || !handler)
                return AE_BAD_PARAMETER;
 
-       if (uuid_le_to_bin(guid, &guid_input))
+       if (guid_parse(guid, &guid_input))
                return AE_BAD_PARAMETER;
 
        list_for_each_entry(block, &wmi_block_list, list) {
@@ -559,12 +559,12 @@ acpi_status wmi_remove_notify_handler(const char *guid)
 {
        struct wmi_block *block;
        acpi_status status = AE_NOT_EXIST;
-       uuid_le guid_input;
+       guid_t guid_input;
 
        if (!guid)
                return AE_BAD_PARAMETER;
 
-       if (uuid_le_to_bin(guid, &guid_input))
+       if (guid_parse(guid, &guid_input))
                return AE_BAD_PARAMETER;
 
        list_for_each_entry(block, &wmi_block_list, list) {
@@ -795,9 +795,9 @@ static int wmi_dev_match(struct device *dev, struct device_driver *driver)
                return 0;
 
        while (*id->guid_string) {
-               uuid_le driver_guid;
+               guid_t driver_guid;
 
-               if (WARN_ON(uuid_le_to_bin(id->guid_string, &driver_guid)))
+               if (WARN_ON(guid_parse(id->guid_string, &driver_guid)))
                        continue;
                if (!memcmp(&driver_guid, wblock->gblock.guid, 16))
                        return 1;