+static int fsl_dai_probe(struct platform_device *pdev)Maybe this can follow a more standard approach using DT aliases. Just like we assign IDs to things like SPI or I2C masters.
+{
[...]
+ ret = of_property_read_u32(np, "fsl,dai-index", &dai_index);
+ if (ret) {
+ dev_err(&pdev->dev, "dai-index missing or invalid\n");
+ return ret;
+ }
+This breaks as soon as there is more than one DAI in the system since you are sharing a global struct between them.
+ fsl_dai.name = dai_name;