diff --git a/drivers/hwmon/pmbus/fsp-3y.c b/drivers/hwmon/pmbus/fsp-3y.c index a4dc09e2ef75..cad4d2330003 100644 --- a/drivers/hwmon/pmbus/fsp-3y.c +++ b/drivers/hwmon/pmbus/fsp-3y.c @@ -222,12 +222,6 @@ static int fsp3y_detect(struct i2c_client *client) return -ENODEV; } -static const struct i2c_device_id fsp3y_id[] = { - {"ym2151e", ym2151e}, - {"yh5151e", yh5151e}, - { } -}; - static int fsp3y_probe(struct i2c_client *client) { struct fsp3y_data *data; @@ -242,7 +236,7 @@ static int fsp3y_probe(struct i2c_client *client) if (data->chip < 0) return data->chip; - id = i2c_match_id(fsp3y_id, client); + id = i2c_client_get_device_id(client); if (data->chip != id->driver_data) dev_warn(&client->dev, "Device mismatch: Configured %s (%d), detected %d\n", id->name, (int)id->driver_data, data->chip); @@ -276,6 +270,11 @@ static int fsp3y_probe(struct i2c_client *client) return pmbus_do_probe(client, &data->info); } +static const struct i2c_device_id fsp3y_id[] = { + {"ym2151e", ym2151e}, + {"yh5151e", yh5151e}, + { } +}; MODULE_DEVICE_TABLE(i2c, fsp3y_id); static struct i2c_driver fsp3y_driver = {