summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-11-09 15:07:11 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-11-10 18:27:54 +0100
commit0f0605d550ed986279030d452c7ed10df34da449 (patch)
treecd5565ec83cd4fdbcbcf9b9d56487284da55aaf1 /drivers/base
parent927bdd1e65bd14ae035d9c625df2f4ccd51e8a83 (diff)
downloadlinux-stable-0f0605d550ed986279030d452c7ed10df34da449.tar.gz
linux-stable-0f0605d550ed986279030d452c7ed10df34da449.tar.bz2
linux-stable-0f0605d550ed986279030d452c7ed10df34da449.zip
driver core: remove devm_device_remove_group()
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-2-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/core.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c
index 5fd99f2df692..af721e6c0253 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -2585,11 +2585,6 @@ union device_attr_group_devres {
const struct attribute_group **groups;
};
-static int devm_attr_group_match(struct device *dev, void *res, void *data)
-{
- return ((union device_attr_group_devres *)res)->group == data;
-}
-
static void devm_attr_group_remove(struct device *dev, void *res)
{
union device_attr_group_devres *devres = res;
@@ -2641,23 +2636,6 @@ int devm_device_add_group(struct device *dev, const struct attribute_group *grp)
EXPORT_SYMBOL_GPL(devm_device_add_group);
/**
- * devm_device_remove_group: remove a managed group from a device
- * @dev: device to remove the group from
- * @grp: group to remove
- *
- * This function removes a group of attributes from a device. The attributes
- * previously have to have been created for this group, otherwise it will fail.
- */
-void devm_device_remove_group(struct device *dev,
- const struct attribute_group *grp)
-{
- WARN_ON(devres_release(dev, devm_attr_group_remove,
- devm_attr_group_match,
- /* cast away const */ (void *)grp));
-}
-EXPORT_SYMBOL_GPL(devm_device_remove_group);
-
-/**
* devm_device_add_groups - create a bunch of managed attribute groups
* @dev: The device to create the group for
* @groups: The attribute groups to create, NULL terminated