static LIST_HEAD(component_list);
static LIST_HEAD(unbind_card_list);
+#define for_each_component(component) \
+ list_for_each_entry(component, &component_list, list)
+
/*
* This is a timeout to do a DAPM powerdown after a stream is closed().
* It can be used to eliminate pops between different playback streams, e.g.
mutex_lock(&client_mutex);
- list_for_each_entry(component, &component_list, list)
+ for_each_component(component)
list_for_each_entry(dai, &component->dai_list, list)
seq_printf(m, "%s\n", dai->name);
mutex_lock(&client_mutex);
- list_for_each_entry(component, &component_list, list)
+ for_each_component(component)
seq_printf(m, "%s\n", component->name);
mutex_unlock(&client_mutex);
lockdep_assert_held(&client_mutex);
- list_for_each_entry(component, &component_list, list) {
+ for_each_component(component) {
if (of_node) {
if (component->dev->of_node == of_node)
return component;
lockdep_assert_held(&client_mutex);
/* Find CPU DAI from registered DAIs*/
- list_for_each_entry(component, &component_list, list) {
+ for_each_component(component) {
if (!snd_soc_is_matching_component(dlc, component))
continue;
list_for_each_entry(dai, &component->dai_list, list) {
rtd->codec_dai = codec_dais[0];
/* find one from the set of registered platforms */
- list_for_each_entry(component, &component_list, list) {
+ for_each_component(component) {
if (!snd_soc_is_matching_component(dai_link->platform,
component))
continue;
struct snd_soc_dai_link *dai_link;
int i;
- list_for_each_entry(component, &component_list, list) {
+ for_each_component(component) {
/* does this component override FEs ? */
if (!component->driver->ignore_machine)
snd_soc_component_setup_regmap(component);
}
+ /* see for_each_component */
list_add(&component->list, &component_list);
INIT_LIST_HEAD(&component->dobj_list);
int found = 0;
mutex_lock(&client_mutex);
- list_for_each_entry(component, &component_list, list) {
+ for_each_component(component) {
if (dev != component->dev)
continue;
ret = NULL;
mutex_lock(&client_mutex);
- list_for_each_entry(component, &component_list, list) {
+ for_each_component(component) {
if (dev != component->dev)
continue;
*/
ret = -ENOTSUPP;
mutex_lock(&client_mutex);
- list_for_each_entry(pos, &component_list, list) {
+ for_each_component(pos) {
struct device_node *component_of_node = pos->dev->of_node;
if (!component_of_node && pos->dev->parent)
int ret = -EPROBE_DEFER;
mutex_lock(&client_mutex);
- list_for_each_entry(pos, &component_list, list) {
+ for_each_component(pos) {
component_of_node = pos->dev->of_node;
if (!component_of_node && pos->dev->parent)
component_of_node = pos->dev->parent->of_node;