aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2011-02-22 23:05:04 -0500
committerGrant Likely <grant.likely@secretlab.ca>2011-02-28 15:22:44 -0500
commitf07eb223a081b278be02a58394cb5fd66f1a1bbd (patch)
tree164e8f1405a21bb5be9033d92fe20d0387b3a565
parent18d306d1375696b0e6b5b39e4744d7fa2ad5e170 (diff)
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: Grant Likely <grant.likely@secretlab.ca>
-rw-r--r--sound/soc/fsl/fsl_dma.c9
-rw-r--r--sound/soc/fsl/fsl_ssi.c9
-rw-r--r--sound/soc/fsl/mpc5200_dma.c24
-rw-r--r--sound/soc/fsl/mpc5200_psc_ac97.c9
-rw-r--r--sound/soc/fsl/mpc5200_psc_i2s.c9
-rw-r--r--sound/sparc/amd7930.c8
-rw-r--r--sound/sparc/cs4231.c16
-rw-r--r--sound/sparc/dbri.c8
8 files changed, 43 insertions, 49 deletions
diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c
index 4cf98c03af2..15dac0f20cd 100644
--- a/sound/soc/fsl/fsl_dma.c
+++ b/sound/soc/fsl/fsl_dma.c
@@ -896,8 +896,7 @@ static struct snd_pcm_ops fsl_dma_ops = {
896 .pointer = fsl_dma_pointer, 896 .pointer = fsl_dma_pointer,
897}; 897};
898 898
899static int __devinit fsl_soc_dma_probe(struct platform_device *pdev, 899static int __devinit fsl_soc_dma_probe(struct platform_device *pdev)
900 const struct of_device_id *match)
901 { 900 {
902 struct dma_object *dma; 901 struct dma_object *dma;
903 struct device_node *np = pdev->dev.of_node; 902 struct device_node *np = pdev->dev.of_node;
@@ -979,7 +978,7 @@ static const struct of_device_id fsl_soc_dma_ids[] = {
979}; 978};
980MODULE_DEVICE_TABLE(of, fsl_soc_dma_ids); 979MODULE_DEVICE_TABLE(of, fsl_soc_dma_ids);
981 980
982static struct of_platform_driver fsl_soc_dma_driver = { 981static struct platform_driver fsl_soc_dma_driver = {
983 .driver = { 982 .driver = {
984 .name = "fsl-pcm-audio", 983 .name = "fsl-pcm-audio",
985 .owner = THIS_MODULE, 984 .owner = THIS_MODULE,
@@ -993,12 +992,12 @@ static int __init fsl_soc_dma_init(void)
993{ 992{
994 pr_info("Freescale Elo DMA ASoC PCM Driver\n"); 993 pr_info("Freescale Elo DMA ASoC PCM Driver\n");
995 994
996 return of_register_platform_driver(&fsl_soc_dma_driver); 995 return platform_driver_register(&fsl_soc_dma_driver);
997} 996}
998 997
999static void __exit fsl_soc_dma_exit(void) 998static void __exit fsl_soc_dma_exit(void)
1000{ 999{
1001 of_unregister_platform_driver(&fsl_soc_dma_driver); 1000 platform_driver_unregister(&fsl_soc_dma_driver);
1002} 1001}
1003 1002
1004module_init(fsl_soc_dma_init); 1003module_init(fsl_soc_dma_init);
diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c
index 4cc167a7aeb..313e0ccedd5 100644
--- a/sound/soc/fsl/fsl_ssi.c
+++ b/sound/soc/fsl/fsl_ssi.c
@@ -624,8 +624,7 @@ static void make_lowercase(char *s)
624 } 624 }
625} 625}
626 626
627static int __devinit fsl_ssi_probe(struct platform_device *pdev, 627static int __devinit fsl_ssi_probe(struct platform_device *pdev)
628 const struct of_device_id *match)
629{ 628{
630 struct fsl_ssi_private *ssi_private; 629 struct fsl_ssi_private *ssi_private;
631 int ret = 0; 630 int ret = 0;
@@ -774,7 +773,7 @@ static const struct of_device_id fsl_ssi_ids[] = {
774}; 773};
775MODULE_DEVICE_TABLE(of, fsl_ssi_ids); 774MODULE_DEVICE_TABLE(of, fsl_ssi_ids);
776 775
777static struct of_platform_driver fsl_ssi_driver = { 776static struct platform_driver fsl_ssi_driver = {
778 .driver = { 777 .driver = {
779 .name = "fsl-ssi-dai", 778 .name = "fsl-ssi-dai",
780 .owner = THIS_MODULE, 779 .owner = THIS_MODULE,
@@ -788,12 +787,12 @@ static int __init fsl_ssi_init(void)
788{ 787{
789 printk(KERN_INFO "Freescale Synchronous Serial Interface (SSI) ASoC Driver\n"); 788 printk(KERN_INFO "Freescale Synchronous Serial Interface (SSI) ASoC Driver\n");
790 789
791 return of_register_platform_driver(&fsl_ssi_driver); 790 return platform_driver_register(&fsl_ssi_driver);
792} 791}
793 792
794static void __exit fsl_ssi_exit(void) 793static void __exit fsl_ssi_exit(void)
795{ 794{
796 of_unregister_platform_driver(&fsl_ssi_driver); 795 platform_driver_unregister(&fsl_ssi_driver);
797} 796}
798 797
799module_init(fsl_ssi_init); 798module_init(fsl_ssi_init);
diff --git a/sound/soc/fsl/mpc5200_dma.c b/sound/soc/fsl/mpc5200_dma.c
index f92dca07cd3..fff695ccdd3 100644
--- a/sound/soc/fsl/mpc5200_dma.c
+++ b/sound/soc/fsl/mpc5200_dma.c
@@ -368,8 +368,7 @@ static struct snd_soc_platform_driver mpc5200_audio_dma_platform = {
368 .pcm_free = &psc_dma_free, 368 .pcm_free = &psc_dma_free,
369}; 369};
370 370
371static int mpc5200_hpcd_probe(struct of_device *op, 371static int mpc5200_hpcd_probe(struct of_device *op)
372 const struct of_device_id *match)
373{ 372{
374 phys_addr_t fifo; 373 phys_addr_t fifo;
375 struct psc_dma *psc_dma; 374 struct psc_dma *psc_dma;
@@ -511,32 +510,31 @@ static int mpc5200_hpcd_remove(struct of_device *op)
511} 510}
512 511
513static struct of_device_id mpc5200_hpcd_match[] = { 512static struct of_device_id mpc5200_hpcd_match[] = {
514 { 513 { .compatible = "fsl,mpc5200-pcm", },
515 .compatible = "fsl,mpc5200-pcm",
516 },
517 {} 514 {}
518}; 515};
519MODULE_DEVICE_TABLE(of, mpc5200_hpcd_match); 516MODULE_DEVICE_TABLE(of, mpc5200_hpcd_match);
520 517
521static struct of_platform_driver mpc5200_hpcd_of_driver = { 518static struct platform_driver mpc5200_hpcd_of_driver = {
522 .owner = THIS_MODULE,
523 .name = "mpc5200-pcm-audio",
524 .match_table = mpc5200_hpcd_match,
525 .probe = mpc5200_hpcd_probe, 519 .probe = mpc5200_hpcd_probe,
526 .remove = mpc5200_hpcd_remove, 520 .remove = mpc5200_hpcd_remove,
521 .dev = {
522 .owner = THIS_MODULE,
523 .name = "mpc5200-pcm-audio",
524 .of_match_table = mpc5200_hpcd_match,
525 }
527}; 526};
528 527
529static int __init mpc5200_hpcd_init(void) 528static int __init mpc5200_hpcd_init(void)
530{ 529{
531 return of_register_platform_driver(&mpc5200_hpcd_of_driver); 530 return platform_driver_register(&mpc5200_hpcd_of_driver);
532} 531}
532module_init(mpc5200_hpcd_init);
533 533
534static void __exit mpc5200_hpcd_exit(void) 534static void __exit mpc5200_hpcd_exit(void)
535{ 535{
536 of_unregister_platform_driver(&mpc5200_hpcd_of_driver); 536 platform_driver_unregister(&mpc5200_hpcd_of_driver);
537} 537}
538
539module_init(mpc5200_hpcd_init);
540module_exit(mpc5200_hpcd_exit); 538module_exit(mpc5200_hpcd_exit);
541 539
542MODULE_AUTHOR("Grant Likely <grant.likely@secretlab.ca>"); 540MODULE_AUTHOR("Grant Likely <grant.likely@secretlab.ca>");
diff --git a/sound/soc/fsl/mpc5200_psc_ac97.c b/sound/soc/fsl/mpc5200_psc_ac97.c
index 40acc8e2b1c..ad36b095bb7 100644
--- a/sound/soc/fsl/mpc5200_psc_ac97.c
+++ b/sound/soc/fsl/mpc5200_psc_ac97.c
@@ -272,8 +272,7 @@ static struct snd_soc_dai_driver psc_ac97_dai[] = {
272 * - Probe/remove operations 272 * - Probe/remove operations
273 * - OF device match table 273 * - OF device match table
274 */ 274 */
275static int __devinit psc_ac97_of_probe(struct platform_device *op, 275static int __devinit psc_ac97_of_probe(struct platform_device *op)
276 const struct of_device_id *match)
277{ 276{
278 int rc; 277 int rc;
279 struct snd_ac97 ac97; 278 struct snd_ac97 ac97;
@@ -316,7 +315,7 @@ static struct of_device_id psc_ac97_match[] __devinitdata = {
316}; 315};
317MODULE_DEVICE_TABLE(of, psc_ac97_match); 316MODULE_DEVICE_TABLE(of, psc_ac97_match);
318 317
319static struct of_platform_driver psc_ac97_driver = { 318static struct platform_driver psc_ac97_driver = {
320 .probe = psc_ac97_of_probe, 319 .probe = psc_ac97_of_probe,
321 .remove = __devexit_p(psc_ac97_of_remove), 320 .remove = __devexit_p(psc_ac97_of_remove),
322 .driver = { 321 .driver = {
@@ -332,13 +331,13 @@ static struct of_platform_driver psc_ac97_driver = {
332 */ 331 */
333static int __init psc_ac97_init(void) 332static int __init psc_ac97_init(void)
334{ 333{
335 return of_register_platform_driver(&psc_ac97_driver); 334 return platform_driver_register(&psc_ac97_driver);
336} 335}
337module_init(psc_ac97_init); 336module_init(psc_ac97_init);
338 337
339static void __exit psc_ac97_exit(void) 338static void __exit psc_ac97_exit(void)
340{ 339{
341 of_unregister_platform_driver(&psc_ac97_driver); 340 platform_driver_unregister(&psc_ac97_driver);
342} 341}
343module_exit(psc_ac97_exit); 342module_exit(psc_ac97_exit);
344 343
diff --git a/sound/soc/fsl/mpc5200_psc_i2s.c b/sound/soc/fsl/mpc5200_psc_i2s.c
index 9018fa5bf0d..87cf2a5c2b2 100644
--- a/sound/soc/fsl/mpc5200_psc_i2s.c
+++ b/sound/soc/fsl/mpc5200_psc_i2s.c
@@ -150,8 +150,7 @@ static struct snd_soc_dai_driver psc_i2s_dai[] = {{
150 * - Probe/remove operations 150 * - Probe/remove operations
151 * - OF device match table 151 * - OF device match table
152 */ 152 */
153static int __devinit psc_i2s_of_probe(struct platform_device *op, 153static int __devinit psc_i2s_of_probe(struct platform_device *op)
154 const struct of_device_id *match)
155{ 154{
156 int rc; 155 int rc;
157 struct psc_dma *psc_dma; 156 struct psc_dma *psc_dma;
@@ -213,7 +212,7 @@ static struct of_device_id psc_i2s_match[] __devinitdata = {
213}; 212};
214MODULE_DEVICE_TABLE(of, psc_i2s_match); 213MODULE_DEVICE_TABLE(of, psc_i2s_match);
215 214
216static struct of_platform_driver psc_i2s_driver = { 215static struct platform_driver psc_i2s_driver = {
217 .probe = psc_i2s_of_probe, 216 .probe = psc_i2s_of_probe,
218 .remove = __devexit_p(psc_i2s_of_remove), 217 .remove = __devexit_p(psc_i2s_of_remove),
219 .driver = { 218 .driver = {
@@ -229,13 +228,13 @@ static struct of_platform_driver psc_i2s_driver = {
229 */ 228 */
230static int __init psc_i2s_init(void) 229static int __init psc_i2s_init(void)
231{ 230{
232 return of_register_platform_driver(&psc_i2s_driver); 231 return platform_driver_register(&psc_i2s_driver);
233} 232}
234module_init(psc_i2s_init); 233module_init(psc_i2s_init);
235 234
236static void __exit psc_i2s_exit(void) 235static void __exit psc_i2s_exit(void)
237{ 236{
238 of_unregister_platform_driver(&psc_i2s_driver); 237 platform_driver_unregister(&psc_i2s_driver);
239} 238}
240module_exit(psc_i2s_exit); 239module_exit(psc_i2s_exit);
241 240
diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c
index f8bcfc30f80..ad7d4d7d923 100644
--- a/sound/sparc/amd7930.c
+++ b/sound/sparc/amd7930.c
@@ -1002,7 +1002,7 @@ static int __devinit snd_amd7930_create(struct snd_card *card,
1002 return 0; 1002 return 0;
1003} 1003}
1004 1004
1005static int __devinit amd7930_sbus_probe(struct platform_device *op, const struct of_device_id *match) 1005static int __devinit amd7930_sbus_probe(struct platform_device *op)
1006{ 1006{
1007 struct resource *rp = &op->resource[0]; 1007 struct resource *rp = &op->resource[0];
1008 static int dev_num; 1008 static int dev_num;
@@ -1064,7 +1064,7 @@ static const struct of_device_id amd7930_match[] = {
1064 {}, 1064 {},
1065}; 1065};
1066 1066
1067static struct of_platform_driver amd7930_sbus_driver = { 1067static struct platform_driver amd7930_sbus_driver = {
1068 .driver = { 1068 .driver = {
1069 .name = "audio", 1069 .name = "audio",
1070 .owner = THIS_MODULE, 1070 .owner = THIS_MODULE,
@@ -1075,7 +1075,7 @@ static struct of_platform_driver amd7930_sbus_driver = {
1075 1075
1076static int __init amd7930_init(void) 1076static int __init amd7930_init(void)
1077{ 1077{
1078 return of_register_platform_driver(&amd7930_sbus_driver); 1078 return platform_driver_register(&amd7930_sbus_driver);
1079} 1079}
1080 1080
1081static void __exit amd7930_exit(void) 1081static void __exit amd7930_exit(void)
@@ -1092,7 +1092,7 @@ static void __exit amd7930_exit(void)
1092 1092
1093 amd7930_list = NULL; 1093 amd7930_list = NULL;
1094 1094
1095 of_unregister_platform_driver(&amd7930_sbus_driver); 1095 platform_driver_unregister(&amd7930_sbus_driver);
1096} 1096}
1097 1097
1098module_init(amd7930_init); 1098module_init(amd7930_init);
diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c
index c276086c3b5..0e618f82808 100644
--- a/sound/sparc/cs4231.c
+++ b/sound/sparc/cs4231.c
@@ -1856,7 +1856,7 @@ static int __devinit snd_cs4231_sbus_create(struct snd_card *card,
1856 return 0; 1856 return 0;
1857} 1857}
1858 1858
1859static int __devinit cs4231_sbus_probe(struct platform_device *op, const struct of_device_id *match) 1859static int __devinit cs4231_sbus_probe(struct platform_device *op)
1860{ 1860{
1861 struct resource *rp = &op->resource[0]; 1861 struct resource *rp = &op->resource[0];
1862 struct snd_card *card; 1862 struct snd_card *card;
@@ -2048,7 +2048,7 @@ static int __devinit snd_cs4231_ebus_create(struct snd_card *card,
2048 return 0; 2048 return 0;
2049} 2049}
2050 2050
2051static int __devinit cs4231_ebus_probe(struct platform_device *op, const struct of_device_id *match) 2051static int __devinit cs4231_ebus_probe(struct platform_device *op)
2052{ 2052{
2053 struct snd_card *card; 2053 struct snd_card *card;
2054 int err; 2054 int err;
@@ -2072,16 +2072,16 @@ static int __devinit cs4231_ebus_probe(struct platform_device *op, const struct
2072} 2072}
2073#endif 2073#endif
2074 2074
2075static int __devinit cs4231_probe(struct platform_device *op, const struct of_device_id *match) 2075static int __devinit cs4231_probe(struct platform_device *op)
2076{ 2076{
2077#ifdef EBUS_SUPPORT 2077#ifdef EBUS_SUPPORT
2078 if (!strcmp(op->dev.of_node->parent->name, "ebus")) 2078 if (!strcmp(op->dev.of_node->parent->name, "ebus"))
2079 return cs4231_ebus_probe(op, match); 2079 return cs4231_ebus_probe(op);
2080#endif 2080#endif
2081#ifdef SBUS_SUPPORT 2081#ifdef SBUS_SUPPORT
2082 if (!strcmp(op->dev.of_node->parent->name, "sbus") || 2082 if (!strcmp(op->dev.of_node->parent->name, "sbus") ||
2083 !strcmp(op->dev.of_node->parent->name, "sbi")) 2083 !strcmp(op->dev.of_node->parent->name, "sbi"))
2084 return cs4231_sbus_probe(op, match); 2084 return cs4231_sbus_probe(op);
2085#endif 2085#endif
2086 return -ENODEV; 2086 return -ENODEV;
2087} 2087}
@@ -2108,7 +2108,7 @@ static const struct of_device_id cs4231_match[] = {
2108 2108
2109MODULE_DEVICE_TABLE(of, cs4231_match); 2109MODULE_DEVICE_TABLE(of, cs4231_match);
2110 2110
2111static struct of_platform_driver cs4231_driver = { 2111static struct platform_driver cs4231_driver = {
2112 .driver = { 2112 .driver = {
2113 .name = "audio", 2113 .name = "audio",
2114 .owner = THIS_MODULE, 2114 .owner = THIS_MODULE,
@@ -2120,12 +2120,12 @@ static struct of_platform_driver cs4231_driver = {
2120 2120
2121static int __init cs4231_init(void) 2121static int __init cs4231_init(void)
2122{ 2122{
2123 return of_register_platform_driver(&cs4231_driver); 2123 return platform_driver_register(&cs4231_driver);
2124} 2124}
2125 2125
2126static void __exit cs4231_exit(void) 2126static void __exit cs4231_exit(void)
2127{ 2127{
2128 of_unregister_platform_driver(&cs4231_driver); 2128 platform_driver_unregister(&cs4231_driver);
2129} 2129}
2130 2130
2131module_init(cs4231_init); 2131module_init(cs4231_init);
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c
index 39cd5d69d05..73f9cbacc07 100644
--- a/sound/sparc/dbri.c
+++ b/sound/sparc/dbri.c
@@ -2592,7 +2592,7 @@ static void snd_dbri_free(struct snd_dbri *dbri)
2592 (void *)dbri->dma, dbri->dma_dvma); 2592 (void *)dbri->dma, dbri->dma_dvma);
2593} 2593}
2594 2594
2595static int __devinit dbri_probe(struct platform_device *op, const struct of_device_id *match) 2595static int __devinit dbri_probe(struct platform_device *op)
2596{ 2596{
2597 struct snd_dbri *dbri; 2597 struct snd_dbri *dbri;
2598 struct resource *rp; 2598 struct resource *rp;
@@ -2686,7 +2686,7 @@ static const struct of_device_id dbri_match[] = {
2686 2686
2687MODULE_DEVICE_TABLE(of, dbri_match); 2687MODULE_DEVICE_TABLE(of, dbri_match);
2688 2688
2689static struct of_platform_driver dbri_sbus_driver = { 2689static struct platform_driver dbri_sbus_driver = {
2690 .driver = { 2690 .driver = {
2691 .name = "dbri", 2691 .name = "dbri",
2692 .owner = THIS_MODULE, 2692 .owner = THIS_MODULE,
@@ -2699,12 +2699,12 @@ static struct of_platform_driver dbri_sbus_driver = {
2699/* Probe for the dbri chip and then attach the driver. */ 2699/* Probe for the dbri chip and then attach the driver. */
2700static int __init dbri_init(void) 2700static int __init dbri_init(void)
2701{ 2701{
2702 return of_register_platform_driver(&dbri_sbus_driver); 2702 return platform_driver_register(&dbri_sbus_driver);
2703} 2703}
2704 2704
2705static void __exit dbri_exit(void) 2705static void __exit dbri_exit(void)
2706{ 2706{
2707 of_unregister_platform_driver(&dbri_sbus_driver); 2707 platform_driver_unregister(&dbri_sbus_driver);
2708} 2708}
2709 2709
2710module_init(dbri_init); 2710module_init(dbri_init);