Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f07eb223 authored by Grant Likely's avatar Grant Likely
Browse files

dt/sound: Eliminate users of of_platform_{,un}register_driver



Get rid of users of of_platform_driver in drivers/sound.  The
of_platform_{,un}register_driver functions are going away, so the
users need to be converted to using the platform_bus_type directly.

Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 18d306d1
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -896,8 +896,7 @@ static struct snd_pcm_ops fsl_dma_ops = {
	.pointer	= fsl_dma_pointer,
};

static int __devinit fsl_soc_dma_probe(struct platform_device *pdev,
				       const struct of_device_id *match)
static int __devinit fsl_soc_dma_probe(struct platform_device *pdev)
 {
	struct dma_object *dma;
	struct device_node *np = pdev->dev.of_node;
@@ -979,7 +978,7 @@ static const struct of_device_id fsl_soc_dma_ids[] = {
};
MODULE_DEVICE_TABLE(of, fsl_soc_dma_ids);

static struct of_platform_driver fsl_soc_dma_driver = {
static struct platform_driver fsl_soc_dma_driver = {
	.driver = {
		.name = "fsl-pcm-audio",
		.owner = THIS_MODULE,
@@ -993,12 +992,12 @@ static int __init fsl_soc_dma_init(void)
{
	pr_info("Freescale Elo DMA ASoC PCM Driver\n");

	return of_register_platform_driver(&fsl_soc_dma_driver);
	return platform_driver_register(&fsl_soc_dma_driver);
}

static void __exit fsl_soc_dma_exit(void)
{
	of_unregister_platform_driver(&fsl_soc_dma_driver);
	platform_driver_unregister(&fsl_soc_dma_driver);
}

module_init(fsl_soc_dma_init);
+4 −5
Original line number Diff line number Diff line
@@ -624,8 +624,7 @@ static void make_lowercase(char *s)
	}
}

static int __devinit fsl_ssi_probe(struct platform_device *pdev,
				   const struct of_device_id *match)
static int __devinit fsl_ssi_probe(struct platform_device *pdev)
{
	struct fsl_ssi_private *ssi_private;
	int ret = 0;
@@ -774,7 +773,7 @@ static const struct of_device_id fsl_ssi_ids[] = {
};
MODULE_DEVICE_TABLE(of, fsl_ssi_ids);

static struct of_platform_driver fsl_ssi_driver = {
static struct platform_driver fsl_ssi_driver = {
	.driver = {
		.name = "fsl-ssi-dai",
		.owner = THIS_MODULE,
@@ -788,12 +787,12 @@ static int __init fsl_ssi_init(void)
{
	printk(KERN_INFO "Freescale Synchronous Serial Interface (SSI) ASoC Driver\n");

	return of_register_platform_driver(&fsl_ssi_driver);
	return platform_driver_register(&fsl_ssi_driver);
}

static void __exit fsl_ssi_exit(void)
{
	of_unregister_platform_driver(&fsl_ssi_driver);
	platform_driver_unregister(&fsl_ssi_driver);
}

module_init(fsl_ssi_init);
+11 −13
Original line number Diff line number Diff line
@@ -368,8 +368,7 @@ static struct snd_soc_platform_driver mpc5200_audio_dma_platform = {
	.pcm_free	= &psc_dma_free,
};

static int mpc5200_hpcd_probe(struct of_device *op,
		const struct of_device_id *match)
static int mpc5200_hpcd_probe(struct of_device *op)
{
	phys_addr_t fifo;
	struct psc_dma *psc_dma;
@@ -511,32 +510,31 @@ static int mpc5200_hpcd_remove(struct of_device *op)
}

static struct of_device_id mpc5200_hpcd_match[] = {
	{
		.compatible = "fsl,mpc5200-pcm",
	},
	{ .compatible = "fsl,mpc5200-pcm", },
	{}
};
MODULE_DEVICE_TABLE(of, mpc5200_hpcd_match);

static struct of_platform_driver mpc5200_hpcd_of_driver = {
	.owner		= THIS_MODULE,
	.name		= "mpc5200-pcm-audio",
	.match_table    = mpc5200_hpcd_match,
static struct platform_driver mpc5200_hpcd_of_driver = {
	.probe		= mpc5200_hpcd_probe,
	.remove		= mpc5200_hpcd_remove,
	.dev = {
		.owner		= THIS_MODULE,
		.name		= "mpc5200-pcm-audio",
		.of_match_table    = mpc5200_hpcd_match,
	}
};

static int __init mpc5200_hpcd_init(void)
{
	return of_register_platform_driver(&mpc5200_hpcd_of_driver);
	return platform_driver_register(&mpc5200_hpcd_of_driver);
}
module_init(mpc5200_hpcd_init);

static void __exit mpc5200_hpcd_exit(void)
{
	of_unregister_platform_driver(&mpc5200_hpcd_of_driver);
	platform_driver_unregister(&mpc5200_hpcd_of_driver);
}

module_init(mpc5200_hpcd_init);
module_exit(mpc5200_hpcd_exit);

MODULE_AUTHOR("Grant Likely <grant.likely@secretlab.ca>");
+4 −5
Original line number Diff line number Diff line
@@ -272,8 +272,7 @@ static struct snd_soc_dai_driver psc_ac97_dai[] = {
 * - Probe/remove operations
 * - OF device match table
 */
static int __devinit psc_ac97_of_probe(struct platform_device *op,
				      const struct of_device_id *match)
static int __devinit psc_ac97_of_probe(struct platform_device *op)
{
	int rc;
	struct snd_ac97 ac97;
@@ -316,7 +315,7 @@ static struct of_device_id psc_ac97_match[] __devinitdata = {
};
MODULE_DEVICE_TABLE(of, psc_ac97_match);

static struct of_platform_driver psc_ac97_driver = {
static struct platform_driver psc_ac97_driver = {
	.probe = psc_ac97_of_probe,
	.remove = __devexit_p(psc_ac97_of_remove),
	.driver = {
@@ -332,13 +331,13 @@ static struct of_platform_driver psc_ac97_driver = {
 */
static int __init psc_ac97_init(void)
{
	return of_register_platform_driver(&psc_ac97_driver);
	return platform_driver_register(&psc_ac97_driver);
}
module_init(psc_ac97_init);

static void __exit psc_ac97_exit(void)
{
	of_unregister_platform_driver(&psc_ac97_driver);
	platform_driver_unregister(&psc_ac97_driver);
}
module_exit(psc_ac97_exit);

+4 −5
Original line number Diff line number Diff line
@@ -150,8 +150,7 @@ static struct snd_soc_dai_driver psc_i2s_dai[] = {{
 * - Probe/remove operations
 * - OF device match table
 */
static int __devinit psc_i2s_of_probe(struct platform_device *op,
				      const struct of_device_id *match)
static int __devinit psc_i2s_of_probe(struct platform_device *op)
{
	int rc;
	struct psc_dma *psc_dma;
@@ -213,7 +212,7 @@ static struct of_device_id psc_i2s_match[] __devinitdata = {
};
MODULE_DEVICE_TABLE(of, psc_i2s_match);

static struct of_platform_driver psc_i2s_driver = {
static struct platform_driver psc_i2s_driver = {
	.probe = psc_i2s_of_probe,
	.remove = __devexit_p(psc_i2s_of_remove),
	.driver = {
@@ -229,13 +228,13 @@ static struct of_platform_driver psc_i2s_driver = {
 */
static int __init psc_i2s_init(void)
{
	return of_register_platform_driver(&psc_i2s_driver);
	return platform_driver_register(&psc_i2s_driver);
}
module_init(psc_i2s_init);

static void __exit psc_i2s_exit(void)
{
	of_unregister_platform_driver(&psc_i2s_driver);
	platform_driver_unregister(&psc_i2s_driver);
}
module_exit(psc_i2s_exit);

Loading