hwmon: (f75375s) use simple i2c probe
PATCH 1/1 hwmon: (f75375s) use simple i2c probe
As part of the ongoing i2c transition to the simple probe ("probe_new"), this patch uses i2c_match_id to retrieve the driver_data for the probed device. The id parameter is thus no longer necessary and the simple probe can be used instead.
Signed-off-by Stephen Kitt <[email protected]>
--- drivers/hwmon/f75375s.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)
drivers/hwmon/f75375s.c +4 -6
@@ -113,8 +113,7 @@ struct f75375_data {static int f75375_detect (struct i2c_client *client,struct i2c_board_info *info); -static int f75375_probe (struct i2c_client *client, -const struct i2c_device_id *id); +static int f75375_probe (struct i2c_client *client);static int f75375_remove (struct i2c_client *client);static const struct i2c_device_id f75375_id[] = {
@@ -130,7 +129,7 @@ static struct i2c_driver f75375_driver = { .driver = { .name = "f75375", }, - .probe = f75375_probe, + .probe_new = f75375_probe, .remove = f75375_remove, .id_table = f75375_id, .detect = f75375_detect,
@@ -814,8 +813,7 @@ static void f75375_init(struct i2c_client *client, struct f75375_data *data, } -static int f75375_probe (struct i2c_client *client, -const struct i2c_device_id *id) +static int f75375_probe (struct i2c_client *client) {struct f75375_data *data; struct f75375s_platform_data *f75375s_pdata =
@@ -832,7 +830,7 @@ static int f75375_probe(struct i2c_client *client,i2c_set_clientdata (client, data);mutex_init (&data->update_lock); - data->kind = id->driver_data; + data->kind =i2c_match_id (f75375_id, client)->driver_data; err =sysfs_create_group (&client->dev.kobj, &f75375_group);if (err)
Signature · 1 line
2.25.4
Quoted 6 lines · Stephen Kitt
As part of the ongoing i2c transition to the simple probe ("
probe_new"), this patch usesi2c_match_idto retrieve thedriver_datafor the probed device. The id parameter is thus no longer necessary and the simple probe can be used instead.Signed-off-by Stephen Kitt <[email protected]>
Applied.
Thanks,
Guenter
Quoted 46 lines
--- drivers/hwmon/f75375s.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)drivers/hwmon/f75375s.c +4
-6@@ -113,8 +113,7 @@ struct f75375_data {static int f75375_detect (struct i2c_client *client,struct i2c_board_info *info); -static int f75375_probe (struct i2c_client *client, -const struct i2c_device_id *id); +static int f75375_probe (struct i2c_client *client);static int f75375_remove (struct i2c_client *client);static const struct i2c_device_id f75375_id[] = {@@ -130,7 +129,7 @@ static struct i2c_driver f75375_driver = { .driver = { .name = "f75375", }, - .probe = f75375_probe, + .probe_new = f75375_probe, .remove = f75375_remove, .id_table = f75375_id, .detect = f75375_detect,@@ -814,8 +813,7 @@ static void f75375_init(struct i2c_client *client, struct f75375_data *data, } -static int f75375_probe (struct i2c_client *client, -const struct i2c_device_id *id) +static int f75375_probe (struct i2c_client *client) {struct f75375_data *data; struct f75375s_platform_data *f75375s_pdata =@@ -832,7 +830,7 @@ static int f75375_probe(struct i2c_client *client,i2c_set_clientdata (client, data);mutex_init (&data->update_lock); - data->kind = id->driver_data; + data->kind =i2c_match_id (f75375_id, client)->driver_data; err =sysfs_create_group (&client->dev.kobj, &f75375_group);if (err)