ASoC: blackfin: Convert to devm_snd_soc_register_card
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
6ff33f3902
commit
76b0d1f5e7
|
@ -87,27 +87,18 @@ static int bf5xx_ad1836_driver_probe(struct platform_device *pdev)
|
||||||
card->dev = &pdev->dev;
|
card->dev = &pdev->dev;
|
||||||
platform_set_drvdata(pdev, card);
|
platform_set_drvdata(pdev, card);
|
||||||
|
|
||||||
ret = snd_soc_register_card(card);
|
ret = devm_snd_soc_register_card(&pdev->dev, card);
|
||||||
if (ret)
|
if (ret)
|
||||||
dev_err(&pdev->dev, "Failed to register card\n");
|
dev_err(&pdev->dev, "Failed to register card\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int bf5xx_ad1836_driver_remove(struct platform_device *pdev)
|
|
||||||
{
|
|
||||||
struct snd_soc_card *card = platform_get_drvdata(pdev);
|
|
||||||
|
|
||||||
snd_soc_unregister_card(card);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct platform_driver bf5xx_ad1836_driver = {
|
static struct platform_driver bf5xx_ad1836_driver = {
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "bfin-snd-ad1836",
|
.name = "bfin-snd-ad1836",
|
||||||
.pm = &snd_soc_pm_ops,
|
.pm = &snd_soc_pm_ops,
|
||||||
},
|
},
|
||||||
.probe = bf5xx_ad1836_driver_probe,
|
.probe = bf5xx_ad1836_driver_probe,
|
||||||
.remove = bf5xx_ad1836_driver_remove,
|
|
||||||
};
|
};
|
||||||
module_platform_driver(bf5xx_ad1836_driver);
|
module_platform_driver(bf5xx_ad1836_driver);
|
||||||
|
|
||||||
|
|
|
@ -154,16 +154,7 @@ static int bfin_eval_adau1373_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
card->dev = &pdev->dev;
|
card->dev = &pdev->dev;
|
||||||
|
|
||||||
return snd_soc_register_card(&bfin_eval_adau1373);
|
return devm_snd_soc_register_card(&pdev->dev, &bfin_eval_adau1373);
|
||||||
}
|
|
||||||
|
|
||||||
static int bfin_eval_adau1373_remove(struct platform_device *pdev)
|
|
||||||
{
|
|
||||||
struct snd_soc_card *card = platform_get_drvdata(pdev);
|
|
||||||
|
|
||||||
snd_soc_unregister_card(card);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct platform_driver bfin_eval_adau1373_driver = {
|
static struct platform_driver bfin_eval_adau1373_driver = {
|
||||||
|
@ -172,7 +163,6 @@ static struct platform_driver bfin_eval_adau1373_driver = {
|
||||||
.pm = &snd_soc_pm_ops,
|
.pm = &snd_soc_pm_ops,
|
||||||
},
|
},
|
||||||
.probe = bfin_eval_adau1373_probe,
|
.probe = bfin_eval_adau1373_probe,
|
||||||
.remove = bfin_eval_adau1373_remove,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module_platform_driver(bfin_eval_adau1373_driver);
|
module_platform_driver(bfin_eval_adau1373_driver);
|
||||||
|
|
|
@ -94,16 +94,7 @@ static int bfin_eval_adau1701_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
card->dev = &pdev->dev;
|
card->dev = &pdev->dev;
|
||||||
|
|
||||||
return snd_soc_register_card(&bfin_eval_adau1701);
|
return devm_snd_soc_register_card(&pdev->dev, &bfin_eval_adau1701);
|
||||||
}
|
|
||||||
|
|
||||||
static int bfin_eval_adau1701_remove(struct platform_device *pdev)
|
|
||||||
{
|
|
||||||
struct snd_soc_card *card = platform_get_drvdata(pdev);
|
|
||||||
|
|
||||||
snd_soc_unregister_card(card);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct platform_driver bfin_eval_adau1701_driver = {
|
static struct platform_driver bfin_eval_adau1701_driver = {
|
||||||
|
@ -112,7 +103,6 @@ static struct platform_driver bfin_eval_adau1701_driver = {
|
||||||
.pm = &snd_soc_pm_ops,
|
.pm = &snd_soc_pm_ops,
|
||||||
},
|
},
|
||||||
.probe = bfin_eval_adau1701_probe,
|
.probe = bfin_eval_adau1701_probe,
|
||||||
.remove = bfin_eval_adau1701_remove,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
module_platform_driver(bfin_eval_adau1701_driver);
|
module_platform_driver(bfin_eval_adau1701_driver);
|
||||||
|
|
|
@ -119,16 +119,7 @@ static int bfin_eval_adav80x_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
card->dev = &pdev->dev;
|
card->dev = &pdev->dev;
|
||||||
|
|
||||||
return snd_soc_register_card(&bfin_eval_adav80x);
|
return devm_snd_soc_register_card(&pdev->dev, &bfin_eval_adav80x);
|
||||||
}
|
|
||||||
|
|
||||||
static int bfin_eval_adav80x_remove(struct platform_device *pdev)
|
|
||||||
{
|
|
||||||
struct snd_soc_card *card = platform_get_drvdata(pdev);
|
|
||||||
|
|
||||||
snd_soc_unregister_card(card);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct platform_device_id bfin_eval_adav80x_ids[] = {
|
static const struct platform_device_id bfin_eval_adav80x_ids[] = {
|
||||||
|
@ -144,7 +135,6 @@ static struct platform_driver bfin_eval_adav80x_driver = {
|
||||||
.pm = &snd_soc_pm_ops,
|
.pm = &snd_soc_pm_ops,
|
||||||
},
|
},
|
||||||
.probe = bfin_eval_adav80x_probe,
|
.probe = bfin_eval_adav80x_probe,
|
||||||
.remove = bfin_eval_adav80x_remove,
|
|
||||||
.id_table = bfin_eval_adav80x_ids,
|
.id_table = bfin_eval_adav80x_ids,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue