@@ -24,16 +24,14 @@ static int acpi_data_get_property_array(const struct acpi_device_data *data,
24
24
acpi_object_type type ,
25
25
const union acpi_object * * obj );
26
26
27
- /* ACPI _DSD device properties UUID: daffd814-6eba-4d8c-8a91-bc9bbf4aa301 */
28
- static const u8 prp_uuid [16 ] = {
29
- 0x14 , 0xd8 , 0xff , 0xda , 0xba , 0x6e , 0x8c , 0x4d ,
30
- 0x8a , 0x91 , 0xbc , 0x9b , 0xbf , 0x4a , 0xa3 , 0x01
31
- };
32
- /* ACPI _DSD data subnodes UUID: dbb8e3e6-5886-4ba6-8795-1319f52a966b */
33
- static const u8 ads_uuid [16 ] = {
34
- 0xe6 , 0xe3 , 0xb8 , 0xdb , 0x86 , 0x58 , 0xa6 , 0x4b ,
35
- 0x87 , 0x95 , 0x13 , 0x19 , 0xf5 , 0x2a , 0x96 , 0x6b
36
- };
27
+ /* ACPI _DSD device properties GUID: daffd814-6eba-4d8c-8a91-bc9bbf4aa301 */
28
+ static const guid_t prp_guid =
29
+ GUID_INIT (0xdaffd814 , 0x6eba , 0x4d8c ,
30
+ 0x8a , 0x91 , 0xbc , 0x9b , 0xbf , 0x4a , 0xa3 , 0x01 );
31
+ /* ACPI _DSD data subnodes GUID: dbb8e3e6-5886-4ba6-8795-1319f52a966b */
32
+ static const guid_t ads_guid =
33
+ GUID_INIT (0xdbb8e3e6 , 0x5886 , 0x4ba6 ,
34
+ 0x87 , 0x95 , 0x13 , 0x19 , 0xf5 , 0x2a , 0x96 , 0x6b );
37
35
38
36
static bool acpi_enumerate_nondev_subnodes (acpi_handle scope ,
39
37
const union acpi_object * desc ,
@@ -189,22 +187,23 @@ static bool acpi_enumerate_nondev_subnodes(acpi_handle scope,
189
187
{
190
188
int i ;
191
189
192
- /* Look for the ACPI data subnodes UUID . */
190
+ /* Look for the ACPI data subnodes GUID . */
193
191
for (i = 0 ; i < desc -> package .count ; i += 2 ) {
194
- const union acpi_object * uuid , * links ;
192
+ const union acpi_object * guid , * links ;
195
193
196
- uuid = & desc -> package .elements [i ];
194
+ guid = & desc -> package .elements [i ];
197
195
links = & desc -> package .elements [i + 1 ];
198
196
199
197
/*
200
- * The first element must be a UUID and the second one must be
198
+ * The first element must be a GUID and the second one must be
201
199
* a package.
202
200
*/
203
- if (uuid -> type != ACPI_TYPE_BUFFER || uuid -> buffer .length != 16
204
- || links -> type != ACPI_TYPE_PACKAGE )
201
+ if (guid -> type != ACPI_TYPE_BUFFER ||
202
+ guid -> buffer .length != 16 ||
203
+ links -> type != ACPI_TYPE_PACKAGE )
205
204
break ;
206
205
207
- if (memcmp ( uuid -> buffer .pointer , ads_uuid , sizeof ( ads_uuid ) ))
206
+ if (! guid_equal (( guid_t * ) guid -> buffer .pointer , & ads_guid ))
208
207
continue ;
209
208
210
209
return acpi_add_nondev_subnodes (scope , links , & data -> subnodes ,
@@ -297,26 +296,27 @@ static bool acpi_extract_properties(const union acpi_object *desc,
297
296
if (desc -> package .count % 2 )
298
297
return false;
299
298
300
- /* Look for the device properties UUID . */
299
+ /* Look for the device properties GUID . */
301
300
for (i = 0 ; i < desc -> package .count ; i += 2 ) {
302
- const union acpi_object * uuid , * properties ;
301
+ const union acpi_object * guid , * properties ;
303
302
304
- uuid = & desc -> package .elements [i ];
303
+ guid = & desc -> package .elements [i ];
305
304
properties = & desc -> package .elements [i + 1 ];
306
305
307
306
/*
308
- * The first element must be a UUID and the second one must be
307
+ * The first element must be a GUID and the second one must be
309
308
* a package.
310
309
*/
311
- if (uuid -> type != ACPI_TYPE_BUFFER || uuid -> buffer .length != 16
312
- || properties -> type != ACPI_TYPE_PACKAGE )
310
+ if (guid -> type != ACPI_TYPE_BUFFER ||
311
+ guid -> buffer .length != 16 ||
312
+ properties -> type != ACPI_TYPE_PACKAGE )
313
313
break ;
314
314
315
- if (memcmp ( uuid -> buffer .pointer , prp_uuid , sizeof ( prp_uuid ) ))
315
+ if (! guid_equal (( guid_t * ) guid -> buffer .pointer , & prp_guid ))
316
316
continue ;
317
317
318
318
/*
319
- * We found the matching UUID . Now validate the format of the
319
+ * We found the matching GUID . Now validate the format of the
320
320
* package immediately following it.
321
321
*/
322
322
if (!acpi_properties_format_valid (properties ))
0 commit comments