ASoC: fsl_audmix: Remove unneeded data field
The .data field is only used to pass the string name to platform_device_register_data(). Pass the string name directly to make the code simpler. Signed-off-by: Fabio Estevam <festevam@gmail.com> Link: https://lore.kernel.org/r/20201203013439.10617-1-festevam@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
7a51b4cb97
commit
5057d108d6
@ -455,7 +455,6 @@ static const struct regmap_config fsl_audmix_regmap_config = {
|
|||||||
static const struct of_device_id fsl_audmix_ids[] = {
|
static const struct of_device_id fsl_audmix_ids[] = {
|
||||||
{
|
{
|
||||||
.compatible = "fsl,imx8qm-audmix",
|
.compatible = "fsl,imx8qm-audmix",
|
||||||
.data = "imx-audmix",
|
|
||||||
},
|
},
|
||||||
{ /* sentinel */ }
|
{ /* sentinel */ }
|
||||||
};
|
};
|
||||||
@ -465,17 +464,9 @@ static int fsl_audmix_probe(struct platform_device *pdev)
|
|||||||
{
|
{
|
||||||
struct device *dev = &pdev->dev;
|
struct device *dev = &pdev->dev;
|
||||||
struct fsl_audmix *priv;
|
struct fsl_audmix *priv;
|
||||||
const char *mdrv;
|
|
||||||
const struct of_device_id *of_id;
|
|
||||||
void __iomem *regs;
|
void __iomem *regs;
|
||||||
int ret;
|
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);
|
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
|
||||||
if (!priv)
|
if (!priv)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
@ -510,10 +501,10 @@ static int fsl_audmix_probe(struct platform_device *pdev)
|
|||||||
goto err_disable_pm;
|
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)) {
|
if (IS_ERR(priv->pdev)) {
|
||||||
ret = PTR_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;
|
goto err_disable_pm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user