diff mbox series

[v3,5/6] hwmon: nct6775: use acpi_dev_hid_uid_match() for matching _HID and _UID

Message ID 20231024062018.23839-6-raag.jadav@intel.com
State New
Headers show
Series Refine _UID references across kernel | expand

Commit Message

Raag Jadav Oct. 24, 2023, 6:20 a.m. UTC
Convert manual _UID references to use the standard ACPI helper.

Signed-off-by: Raag Jadav <raag.jadav@intel.com>
---
 drivers/hwmon/nct6775-platform.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Guenter Roeck Oct. 25, 2023, 6:59 p.m. UTC | #1
On Tue, Oct 24, 2023 at 11:50:17AM +0530, Raag Jadav wrote:
> Convert manual _UID references to use the standard ACPI helper.
> 
> Signed-off-by: Raag Jadav <raag.jadav@intel.com>

Applied.

Guenter
diff mbox series

Patch

diff --git a/drivers/hwmon/nct6775-platform.c b/drivers/hwmon/nct6775-platform.c
index 81bf03dad6bb..0adeeab7ee03 100644
--- a/drivers/hwmon/nct6775-platform.c
+++ b/drivers/hwmon/nct6775-platform.c
@@ -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;
 	}