ACPI: Switch to use generic guid_t in acpi_evaluate_dsm()

acpi_evaluate_dsm() and friends take a pointer to a raw buffer of 16
bytes. Instead we convert them to use guid_t type. At the same time we
convert current users.

acpi_str_to_uuid() becomes useless after the conversion and it's safe to
get rid of it.

Acked-by: Rafael J. Wysocki <[email protected]>
Cc: Borislav Petkov <[email protected]>
Acked-by: Dan Williams <[email protected]>
Cc: Amir Goldstein <[email protected]>
Reviewed-by: Jarkko Sakkinen <[email protected]>
Reviewed-by: Jani Nikula <[email protected]>
Acked-by: Jani Nikula <[email protected]>
Cc: Ben Skeggs <[email protected]>
Acked-by: Benjamin Tissoires <[email protected]>
Acked-by: Joerg Roedel <[email protected]>
Acked-by: Adrian Hunter <[email protected]>
Cc: Yisen Zhuang <[email protected]>
Acked-by: Bjorn Helgaas <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Acked-by: Mathias Nyman <[email protected]>
Reviewed-by: Heikki Krogerus <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
This commit is contained in:
Andy Shevchenko 2017-06-05 19:40:46 +03:00 • committed by Christoph Hellwig
commit 94116f8126
26 changed files with 106 additions and 144 deletions

View file

@ -872,10 +872,9 @@ static int i2c_hid_fetch_hid_descriptor(struct i2c_hid *ihid)
static int i2c_hid_acpi_pdata(struct i2c_client *client,
struct i2c_hid_platform_data *pdata)
{
static u8 i2c_hid_guid[] = {
0xF7, 0xF6, 0xDF, 0x3C, 0x67, 0x42, 0x55, 0x45,
0xAD, 0x05, 0xB3, 0x0A, 0x3D, 0x89, 0x38, 0xDE,
};
static guid_t i2c_hid_guid =
GUID_INIT(0x3CDFF6F7, 0x4267, 0x4555,
0xAD, 0x05, 0xB3, 0x0A, 0x3D, 0x89, 0x38, 0xDE);
union acpi_object *obj;
struct acpi_device *adev;
acpi_handle handle;
@ -884,7 +883,7 @@ static int i2c_hid_acpi_pdata(struct i2c_client *client,
if (!handle || acpi_bus_get_device(handle, &adev))
return -ENODEV;
obj = acpi_evaluate_dsm_typed(handle, i2c_hid_guid, 1, 1, NULL,
obj = acpi_evaluate_dsm_typed(handle, &i2c_hid_guid, 1, 1, NULL,
ACPI_TYPE_INTEGER);
if (!obj) {
dev_err(&client->dev, "device _DSM execution failed\n");