aboutsummaryrefslogtreecommitdiff
path: root/drivers/hwmon/hwmon.c
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2024-09-13 07:11:42 -0700
committerGuenter Roeck <linux@roeck-us.net>2024-09-13 07:27:36 -0700
commit2cb4acf2140be8a4f299c0b887cc314845ef6ec8 (patch)
tree7db748ef5811cde9ab13276392499169b7f7098b /drivers/hwmon/hwmon.c
parent3017d28d6c0fe995703a1f34275e1cade424dc35 (diff)
hwmon: Remove devm_hwmon_device_unregister() API function
devm_hwmon_device_unregister() has no in-tree user, and its implementation is wrong since it does not pass the to-be-removed hardware monitoring device as parameter. I do not envision a valid use for it; drivers needing it should not have called devm_hwmon_device_register_with_info() in the first place. Remove it. Reported-by: Matthew Sanders <m@ttsande.rs> Closes: https://lore.kernel.org/linux-hwmon/488b3bdf870ea76c4b943dbe5fd15ac8113019dc.camel@kernel.org/ Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon/hwmon.c')
-rw-r--r--drivers/hwmon/hwmon.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/drivers/hwmon/hwmon.c b/drivers/hwmon/hwmon.c
index a362080d41fa..9c35c4d0369d 100644
--- a/drivers/hwmon/hwmon.c
+++ b/drivers/hwmon/hwmon.c
@@ -1188,24 +1188,6 @@ error:
}
EXPORT_SYMBOL_GPL(devm_hwmon_device_register_with_info);
-static int devm_hwmon_match(struct device *dev, void *res, void *data)
-{
- struct device **hwdev = res;
-
- return *hwdev == data;
-}
-
-/**
- * devm_hwmon_device_unregister - removes a previously registered hwmon device
- *
- * @dev: the parent device of the device to unregister
- */
-void devm_hwmon_device_unregister(struct device *dev)
-{
- WARN_ON(devres_release(dev, devm_hwmon_release, devm_hwmon_match, dev));
-}
-EXPORT_SYMBOL_GPL(devm_hwmon_device_unregister);
-
static char *__hwmon_sanitize_name(struct device *dev, const char *old_name)
{
char *name, *p;