]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
hwmon: (pmbus/max16601) Remove use of i2c_match_id()
authorAndrew Davis <afd@ti.com>
Fri, 6 Mar 2026 17:16:52 +0000 (11:16 -0600)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 31 Mar 2026 02:45:06 +0000 (19:45 -0700)
The function i2c_match_id() is used to fetch the matching ID from
the i2c_device_id table. This can instead be done with
i2c_client_get_device_id(). For this driver functionality should
not change. Switch over to remove the last couple users of the
i2c_match_id() function from kernel.

Signed-off-by: Andrew Davis <afd@ti.com>
Link: https://lore.kernel.org/r/20260306171652.951274-12-afd@ti.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pmbus/max16601.c

index d696e506aafba3c0a6c6a70250775bfbcc76b4eb..36dc13424d9290f672af2fcb11b02492066a4c22 100644 (file)
@@ -318,7 +318,7 @@ static int max16601_probe(struct i2c_client *client)
        if (chip_id < 0)
                return chip_id;
 
-       id = i2c_match_id(max16601_id, client);
+       id = i2c_client_get_device_id(client);
        if (chip_id != id->driver_data)
                dev_warn(&client->dev,
                         "Device mismatch: Configured %s (%d), detected %d\n",