static const struct of_device_id fsl_audmix_ids[] = {
{
.compatible = "fsl,imx8qm-audmix",
- .data = "imx-audmix",
},
{ /* sentinel */ }
};
{
struct device *dev = &pdev->dev;
struct fsl_audmix *priv;
- const char *mdrv;
- const struct of_device_id *of_id;
void __iomem *regs;
int ret;
- of_id = of_match_device(fsl_audmix_ids, dev);
- if (!of_id || !of_id->data)
- return -EINVAL;
-
- mdrv = of_id->data;
-
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
goto err_disable_pm;
}
- priv->pdev = platform_device_register_data(dev, mdrv, 0, NULL, 0);
+ priv->pdev = platform_device_register_data(dev, "imx-audmix", 0, NULL, 0);
if (IS_ERR(priv->pdev)) {
ret = PTR_ERR(priv->pdev);
- dev_err(dev, "failed to register platform %s: %d\n", mdrv, ret);
+ dev_err(dev, "failed to register platform: %d\n", ret);
goto err_disable_pm;
}