@@ -713,9 +713,6 @@ struct snd_soc_component_driver {
void (*remove)(struct snd_soc_component *);
/* DT */
- int (*of_xlate_dai_name)(struct snd_soc_component *component,
- struct of_phandle_args *args,
- const char **dai_name);
void (*seq_notifier)(struct snd_soc_component *, enum snd_soc_dapm_type,
int subseq);
int (*stream_event)(struct snd_soc_component *, int event);
@@ -3462,39 +3462,33 @@ static int snd_soc_get_dai_name(struct of_phandle_args *args,
mutex_lock(&client_mutex);
list_for_each_entry(pos, &component_list, list) {
+ int id = -1;
+
if (pos->dev->of_node != args->np)
continue;
- if (pos->driver->of_xlate_dai_name) {
- ret = pos->driver->of_xlate_dai_name(pos,
- args,
- dai_name);
- } else {
- int id = -1;
-
- switch (args->args_count) {
- case 0:
- id = 0; /* same as dai_drv[0] */
- break;
- case 1:
- id = args->args[0];
- break;
- default:
- /* not supported */
- break;
- }
+ switch (args->args_count) {
+ case 0:
+ id = 0; /* same as dai_drv[0] */
+ break;
+ case 1:
+ id = args->args[0];
+ break;
+ default:
+ /* not supported */
+ break;
+ }
- if (id < 0 || id >= pos->num_dai) {
- ret = -EINVAL;
- continue;
- }
+ if (id < 0 || id >= pos->num_dai) {
+ ret = -EINVAL;
+ continue;
+ }
- ret = 0;
+ ret = 0;
- *dai_name = pos->dai_drv[id].name;
- if (!*dai_name)
- *dai_name = pos->name;
- }
+ *dai_name = pos->dai_drv[id].name;
+ if (!*dai_name)
+ *dai_name = pos->name;
break;
}