Skip to contentSkip to conversation

drivers/hwmon/adm1029.c: use simple i2c probe

PATCH In review Stephen Kitt 2 participants 3 messages Aug 13, 2020 – Aug 17, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/hwmon/adm1029.c: use simple i2c probe

This driver doesn't use the id information provided by the old i2c probe function, so it can trivially be converted to the simple ("probe_new") form.

---
 drivers/hwmon/adm1029.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/hwmon/adm1029.c +2 -3
index f7752a5bef31..50b1df7b008c 100644
@@ -352,8 +352,7 @@ static int adm1029_init_client(struct i2c_client *client)
 	return 1;
 }
 
-static int adm1029_probe(struct i2c_client *client,
-			 const struct i2c_device_id *id)
+static int adm1029_probe(struct i2c_client *client)
 {
 	struct device *dev = &client->dev;
 	struct adm1029_data *data;
@@ -390,7 +389,7 @@ static struct i2c_driver adm1029_driver = {
 	.driver = {
 		.name = "adm1029",
 	},
-	.probe		= adm1029_probe,
+	.probe_new	= adm1029_probe,
 	.id_table	= adm1029_id,
 	.detect		= adm1029_detect,
 	.address_list	= normal_i2c,
Signature · 1 line
2.25.4
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 35 lines · Stephen Kitt

This driver doesn't use the id information provided by the old i2c probe function, so it can trivially be converted to the simple ("probe_new") form.

---
 drivers/hwmon/adm1029.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/hwmon/adm1029.c +2 -3
index f7752a5bef31..50b1df7b008c 100644
@@ -352,8 +352,7 @@ static int adm1029_init_client(struct i2c_client *client)
 	return 1;
 }
 
-static int adm1029_probe(struct i2c_client *client,
-			 const struct i2c_device_id *id)
+static int adm1029_probe(struct i2c_client *client)
 {
 	struct device *dev = &client->dev;
 	struct adm1029_data *data;
@@ -390,7 +389,7 @@ static struct i2c_driver adm1029_driver = {
 	.driver = {
 		.name = "adm1029",
 	},
-	.probe		= adm1029_probe,
+	.probe_new	= adm1029_probe,
 	.id_table	= adm1029_id,
 	.detect		= adm1029_detect,
 	.address_list	= normal_i2c,
Signature · 1 line
2.25.4

Hello

But please give me a few day to test it.

maintainer Tested-by on v1 1/1
#2 lore raw
In reply to Stephen Kitt
Quoted 35 lines · Stephen Kitt

This driver doesn't use the id information provided by the old i2c probe function, so it can trivially be converted to the simple ("probe_new") form.

---
 drivers/hwmon/adm1029.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/hwmon/adm1029.c +2 -3
index f7752a5bef31..50b1df7b008c 100644
@@ -352,8 +352,7 @@ static int adm1029_init_client(struct i2c_client *client)
 	return 1;
 }
 
-static int adm1029_probe(struct i2c_client *client,
-			 const struct i2c_device_id *id)
+static int adm1029_probe(struct i2c_client *client)
 {
 	struct device *dev = &client->dev;
 	struct adm1029_data *data;
@@ -390,7 +389,7 @@ static struct i2c_driver adm1029_driver = {
 	.driver = {
 		.name = "adm1029",
 	},
-	.probe		= adm1029_probe,
+	.probe_new	= adm1029_probe,
 	.id_table	= adm1029_id,
 	.detect		= adm1029_detect,
 	.address_list	= normal_i2c,
Signature · 1 line
2.25.4

Hello

Thanks