[PATCH v2 07/11] hwmon: (pmbus/q54sj108a2) Remove use of i2c_match_id()

Andrew Davis
2026-03-06T17:17:35Z

This helper has another benefit:
* It also checks for device match data, which means we do not have
to manually check that first.

Signed-off-by: Andrew Davis <afd@ti.com>
---
drivers/hwmon/pmbus/q54sj108a2.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/hwmon/pmbus/q54sj108a2.c b/drivers/hwmon/pmbus/q54sj108a2.c
index fc030ca34480c..88c25290ffce1 100644
--- a/drivers/hwmon/pmbus/q54sj108a2.c
+++ b/drivers/hwmon/pmbus/q54sj108a2.c
@@ -291,10 +291,7 @@ static int q54sj108a2_probe(struct i2c_client *client)
I2C_FUNC_SMBUS_BLOCK_DATA))
return -ENODEV;

- if (client->dev.of_node)
- chip_id = (enum chips)(unsigned long)of_device_get_match_data(dev);
- else
- chip_id = i2c_match_id(q54sj108a2_id, client)->driver_data;
+ chip_id = (enum chips)(uintptr_t)i2c_get_match_data(client);

ret = i2c_smbus_read_block_data(client, PMBUS_MFR_ID, buf);
if (ret < 0) {
--
2.39.2