driver core: remove devm_device_remove_groups()
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Nov 2022 14:07:10 +0000 (15:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Nov 2022 17:27:49 +0000 (18:27 +0100)
There is no in-kernel user of this function, so it is not needed anymore
and can be removed.

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Rafael J. Wysocki <rafael@kernel.org>
Link: https://lore.kernel.org/r/20221109140711.105222-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/core.c
include/linux/device.h

index f07b1c3..5fd99f2 100644 (file)
@@ -2693,23 +2693,6 @@ int devm_device_add_groups(struct device *dev,
 }
 EXPORT_SYMBOL_GPL(devm_device_add_groups);
 
-/**
- * devm_device_remove_groups - remove a list of managed groups
- *
- * @dev:       The device for the groups to be removed from
- * @groups:    NULL terminated list of groups to be removed
- *
- * If groups is not NULL, remove the specified groups from the device.
- */
-void devm_device_remove_groups(struct device *dev,
-                              const struct attribute_group **groups)
-{
-       WARN_ON(devres_release(dev, devm_attr_groups_remove,
-                              devm_attr_group_match,
-                              /* cast away const */ (void *)groups));
-}
-EXPORT_SYMBOL_GPL(devm_device_remove_groups);
-
 static int device_add_attrs(struct device *dev)
 {
        struct class *class = dev->class;
index 023ea50..4efc607 100644 (file)
@@ -1062,8 +1062,6 @@ static inline void device_remove_group(struct device *dev,
 
 int __must_check devm_device_add_groups(struct device *dev,
                                        const struct attribute_group **groups);
-void devm_device_remove_groups(struct device *dev,
-                              const struct attribute_group **groups);
 int __must_check devm_device_add_group(struct device *dev,
                                       const struct attribute_group *grp);
 void devm_device_remove_group(struct device *dev,