hwmon: (nct6775) use acpi_dev_hid_uid_match() for matching _HID and _UID

Convert manual _UID references to use the standard ACPI helper.

Signed-off-by: Raag Jadav <raag.jadav@intel.com>
Link: https://lore.kernel.org/r/20231024062018.23839-6-raag.jadav@intel.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
This commit is contained in:
Raag Jadav 2023-10-24 11:50:17 +05:30 committed by Guenter Roeck
parent 62c11e461c
commit 1b515cfee1

View File

@ -1465,10 +1465,8 @@ static const char * const asus_msi_boards[] = {
static int nct6775_asuswmi_device_match(struct device *dev, void *data)
{
struct acpi_device *adev = to_acpi_device(dev);
const char *uid = acpi_device_uid(adev);
const char *hid = acpi_device_hid(adev);
if (hid && !strcmp(hid, ASUSWMI_DEVICE_HID) && uid && !strcmp(uid, data)) {
if (acpi_dev_hid_uid_match(adev, ASUSWMI_DEVICE_HID, data)) {
asus_acpi_dev = adev;
return 1;
}