Skip to contentSkip to conversation

i2c: scmi: Replace open coded acpi_match_device()

PATCH Superseded Andy Shevchenko 2 participants 4 messages Jun 30, 2022 – Jul 8, 2022 I2C subsystem host drivers

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 i2c: scmi: Replace open coded acpi_match_device()

Replace open coded acpi_match_device() in acpi_smbus_cmi_add().

---
 drivers/i2c/busses/i2c-scmi.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/i2c/busses/i2c-scmi.c +3 -4
index 6746aa46d96c..ba20f6c60e06 100644
@@ -376,10 +376,9 @@ static int acpi_smbus_cmi_add(struct acpi_device *device)
 	smbus_cmi->cap_read = 0;
 	smbus_cmi->cap_write = 0;
 
-	for (id = acpi_smbus_cmi_ids; id->id[0]; id++)
-		if (!strcmp(id->id, acpi_device_hid(device)))
-			smbus_cmi->methods =
-				(struct smbus_methods_t *) id->driver_data;
+	id = acpi_match_device(device, acpi_smbus_cmi_ids);
+	if (id)
+		smbus_cmi->methods = (struct smbus_methods_t *)id->driver_data;
 
 	acpi_walk_namespace(ACPI_TYPE_METHOD, smbus_cmi->handle, 1,
 			    acpi_smbus_cmi_query_methods, NULL, smbus_cmi, NULL);
Signature · 1 line
2.35.1
#1 lore raw
Quoted 1 line · Andy Shevchenko

Replace open coded acpi_match_device() in acpi_smbus_cmi_add().

Discard this, a last minute change that makes it not buildable.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
#2 lore raw
Quoted 2 lines

Discard this, a last minute change that makes it not buildable.

Do you plan to send an update?

#3 lore raw
Quoted 4 lines · Wolfram Sang
Quoted 2 lines

Discard this, a last minute change that makes it not buildable.

Do you plan to send an update?

Just did it.

Signature · 2 lines
With Best Regards,
Andy Shevchenko