Skip to content

Commit 3bce071

Browse files
brglgroeck
authored andcommitted
hwmon: (pmbus) shrink code and remove pmbus_do_remove()
The only action currently performed in pmbus_do_remove() is removing the debugfs hierarchy. We can schedule a devm action at probe time and remove pmbus_do_remove() entirely from all pmbus drivers. Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> Link: https://lore.kernel.org/r/20201026105352.20359-1-brgl@bgdev.pl [groeck: Removed references to pmbus_do_remove from documentation] Signed-off-by: Guenter Roeck <linux@roeck-us.net>
1 parent ad00a02 commit 3bce071

32 files changed

+9
-52
lines changed

Documentation/hwmon/pmbus-core.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -277,12 +277,6 @@ with the pointer to struct pmbus_driver_info as additional argument. Calls
277277
identify function if supported. Must only be called from device probe
278278
function.
279279

280-
::
281-
282-
void pmbus_do_remove(struct i2c_client *client);
283-
284-
Execute driver remove function. Similar to standard driver remove function.
285-
286280
::
287281

288282
const struct pmbus_driver_info

Documentation/hwmon/pmbus.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,6 @@ Emerson DS1200 power modules might look as follows::
148148
return pmbus_do_probe(client, &ds1200_info);
149149
}
150150

151-
static int ds1200_remove(struct i2c_client *client)
152-
{
153-
return pmbus_do_remove(client);
154-
}
155-
156151
static const struct i2c_device_id ds1200_id[] = {
157152
{"ds1200", 0},
158153
{}
@@ -166,7 +161,6 @@ Emerson DS1200 power modules might look as follows::
166161
.name = "ds1200",
167162
},
168163
.probe_new = ds1200_probe,
169-
.remove = ds1200_remove,
170164
.id_table = ds1200_id,
171165
};
172166

drivers/hwmon/pmbus/adm1266.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,6 @@ static struct i2c_driver adm1266_driver = {
502502
.of_match_table = adm1266_of_match,
503503
},
504504
.probe_new = adm1266_probe,
505-
.remove = pmbus_do_remove,
506505
.id_table = adm1266_id,
507506
};
508507

drivers/hwmon/pmbus/adm1275.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,6 @@ static struct i2c_driver adm1275_driver = {
797797
.name = "adm1275",
798798
},
799799
.probe_new = adm1275_probe,
800-
.remove = pmbus_do_remove,
801800
.id_table = adm1275_id,
802801
};
803802

drivers/hwmon/pmbus/bel-pfe.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ static struct i2c_driver pfe_pmbus_driver = {
121121
.name = "bel-pfe",
122122
},
123123
.probe_new = pfe_pmbus_probe,
124-
.remove = pmbus_do_remove,
125124
.id_table = pfe_device_id,
126125
};
127126

drivers/hwmon/pmbus/ibm-cffps.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,6 @@ static struct i2c_driver ibm_cffps_driver = {
617617
.of_match_table = ibm_cffps_of_match,
618618
},
619619
.probe_new = ibm_cffps_probe,
620-
.remove = pmbus_do_remove,
621620
.id_table = ibm_cffps_id,
622621
};
623622

drivers/hwmon/pmbus/inspur-ipsps.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ static struct i2c_driver ipsps_driver = {
216216
.of_match_table = of_match_ptr(ipsps_of_match),
217217
},
218218
.probe_new = ipsps_probe,
219-
.remove = pmbus_do_remove,
220219
.id_table = ipsps_id,
221220
};
222221

drivers/hwmon/pmbus/ir35221.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ static struct i2c_driver ir35221_driver = {
137137
.name = "ir35221",
138138
},
139139
.probe_new = ir35221_probe,
140-
.remove = pmbus_do_remove,
141140
.id_table = ir35221_id,
142141
};
143142

drivers/hwmon/pmbus/ir38064.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ static struct i2c_driver ir38064_driver = {
5353
.name = "ir38064",
5454
},
5555
.probe_new = ir38064_probe,
56-
.remove = pmbus_do_remove,
5756
.id_table = ir38064_id,
5857
};
5958

drivers/hwmon/pmbus/irps5401.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ static struct i2c_driver irps5401_driver = {
5555
.name = "irps5401",
5656
},
5757
.probe_new = irps5401_probe,
58-
.remove = pmbus_do_remove,
5958
.id_table = irps5401_id,
6059
};
6160

0 commit comments

Comments
 (0)