driver core: attribute_container: Remove unused functions
I can't find any use of 'attribute_container_add_class_device_adapter' or 'attribute_container_trigger' in git history. Their export decls went in 2006: commit1740757e8f
("[PATCH] Driver Core: remove unused exports") and their docs disappeared in 2016: commit47cb398dd7
("Docs: sphinxify device-drivers.tmpl") Remove them. Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org> Link: https://lore.kernel.org/r/20240913010955.1393995-1-linux@treblig.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
efb0b309fa
commit
6a36d828bd
@ -346,8 +346,7 @@ attribute_container_device_trigger_safe(struct device *dev,
|
|||||||
* @fn: the function to execute for each classdev.
|
* @fn: the function to execute for each classdev.
|
||||||
*
|
*
|
||||||
* This function is for executing a trigger when you need to know both
|
* This function is for executing a trigger when you need to know both
|
||||||
* the container and the classdev. If you only care about the
|
* the container and the classdev.
|
||||||
* container, then use attribute_container_trigger() instead.
|
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
attribute_container_device_trigger(struct device *dev,
|
attribute_container_device_trigger(struct device *dev,
|
||||||
@ -378,33 +377,6 @@ attribute_container_device_trigger(struct device *dev,
|
|||||||
mutex_unlock(&attribute_container_mutex);
|
mutex_unlock(&attribute_container_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* attribute_container_trigger - trigger a function for each matching container
|
|
||||||
*
|
|
||||||
* @dev: The generic device to activate the trigger for
|
|
||||||
* @fn: the function to trigger
|
|
||||||
*
|
|
||||||
* This routine triggers a function that only needs to know the
|
|
||||||
* matching containers (not the classdev) associated with a device.
|
|
||||||
* It is more lightweight than attribute_container_device_trigger, so
|
|
||||||
* should be used in preference unless the triggering function
|
|
||||||
* actually needs to know the classdev.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
attribute_container_trigger(struct device *dev,
|
|
||||||
int (*fn)(struct attribute_container *,
|
|
||||||
struct device *))
|
|
||||||
{
|
|
||||||
struct attribute_container *cont;
|
|
||||||
|
|
||||||
mutex_lock(&attribute_container_mutex);
|
|
||||||
list_for_each_entry(cont, &attribute_container_list, node) {
|
|
||||||
if (cont->match(cont, dev))
|
|
||||||
fn(cont, dev);
|
|
||||||
}
|
|
||||||
mutex_unlock(&attribute_container_mutex);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* attribute_container_add_attrs - add attributes
|
* attribute_container_add_attrs - add attributes
|
||||||
*
|
*
|
||||||
@ -458,24 +430,6 @@ attribute_container_add_class_device(struct device *classdev)
|
|||||||
return attribute_container_add_attrs(classdev);
|
return attribute_container_add_attrs(classdev);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* attribute_container_add_class_device_adapter - simple adapter for triggers
|
|
||||||
*
|
|
||||||
* @cont: the container to register.
|
|
||||||
* @dev: the generic device to activate the trigger for
|
|
||||||
* @classdev: the class device to add
|
|
||||||
*
|
|
||||||
* This function is identical to attribute_container_add_class_device except
|
|
||||||
* that it is designed to be called from the triggers
|
|
||||||
*/
|
|
||||||
int
|
|
||||||
attribute_container_add_class_device_adapter(struct attribute_container *cont,
|
|
||||||
struct device *dev,
|
|
||||||
struct device *classdev)
|
|
||||||
{
|
|
||||||
return attribute_container_add_class_device(classdev);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* attribute_container_remove_attrs - remove any attribute files
|
* attribute_container_remove_attrs - remove any attribute files
|
||||||
*
|
*
|
||||||
|
@ -61,14 +61,8 @@ int attribute_container_device_trigger_safe(struct device *dev,
|
|||||||
int (*undo)(struct attribute_container *,
|
int (*undo)(struct attribute_container *,
|
||||||
struct device *,
|
struct device *,
|
||||||
struct device *));
|
struct device *));
|
||||||
void attribute_container_trigger(struct device *dev,
|
|
||||||
int (*fn)(struct attribute_container *,
|
|
||||||
struct device *));
|
|
||||||
int attribute_container_add_attrs(struct device *classdev);
|
int attribute_container_add_attrs(struct device *classdev);
|
||||||
int attribute_container_add_class_device(struct device *classdev);
|
int attribute_container_add_class_device(struct device *classdev);
|
||||||
int attribute_container_add_class_device_adapter(struct attribute_container *cont,
|
|
||||||
struct device *dev,
|
|
||||||
struct device *classdev);
|
|
||||||
void attribute_container_remove_attrs(struct device *classdev);
|
void attribute_container_remove_attrs(struct device *classdev);
|
||||||
void attribute_container_class_device_del(struct device *classdev);
|
void attribute_container_class_device_del(struct device *classdev);
|
||||||
struct attribute_container *attribute_container_classdev_to_container(struct device *);
|
struct attribute_container *attribute_container_classdev_to_container(struct device *);
|
||||||
|
Loading…
Reference in New Issue
Block a user