Commit f4c19ac9 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Christoph Hellwig

thermal: int340x_thermal: Switch to use new generic UUID API

There are new types and helpers that are supposed to be used in
new code.

As a preparation to get rid of legacy types and API functions do
the conversion here.

The conversion fixes a potential bug in int340x_thermal as well
since we have to use memcmp() on binary data.
Acked-by: default avatarZhang Rui <rui.zhang@intel.com>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent bcbc2265
...@@ -23,7 +23,7 @@ enum int3400_thermal_uuid { ...@@ -23,7 +23,7 @@ enum int3400_thermal_uuid {
INT3400_THERMAL_MAXIMUM_UUID, INT3400_THERMAL_MAXIMUM_UUID,
}; };
static u8 *int3400_thermal_uuids[INT3400_THERMAL_MAXIMUM_UUID] = { static const char *int3400_thermal_uuids[INT3400_THERMAL_MAXIMUM_UUID] = {
"42A441D6-AE6A-462b-A84B-4A8CE79027D3", "42A441D6-AE6A-462b-A84B-4A8CE79027D3",
"3A95C389-E4B8-4629-A526-C52C88626BAE", "3A95C389-E4B8-4629-A526-C52C88626BAE",
"97C68AE7-15FA-499c-B8C9-5DA81D606E0A", "97C68AE7-15FA-499c-B8C9-5DA81D606E0A",
...@@ -141,10 +141,10 @@ static int int3400_thermal_get_uuids(struct int3400_thermal_priv *priv) ...@@ -141,10 +141,10 @@ static int int3400_thermal_get_uuids(struct int3400_thermal_priv *priv)
} }
for (j = 0; j < INT3400_THERMAL_MAXIMUM_UUID; j++) { for (j = 0; j < INT3400_THERMAL_MAXIMUM_UUID; j++) {
u8 uuid[16]; guid_t guid;
acpi_str_to_uuid(int3400_thermal_uuids[j], uuid); guid_parse(int3400_thermal_uuids[j], &guid);
if (!strncmp(uuid, objb->buffer.pointer, 16)) { if (guid_equal(objb->buffer.pointer, &guid)) {
priv->uuid_bitmap |= (1 << j); priv->uuid_bitmap |= (1 << j);
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment