From 1c48a5c93da63132b92c4bbcd18e690c51539df6 Mon Sep 17 00:00:00 2001 From: Grant Likely Date: Thu, 17 Feb 2011 02:43:24 -0700 Subject: dt: Eliminate of_platform_{,un}register_driver Final step to eliminate of_platform_bus_type. They're all just platform drivers now. v2: fix type in pasemi_nand.c (thanks to Stephen Rothwell) Signed-off-by: Grant Likely --- drivers/atm/fore200e.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'drivers/atm') diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c index 44f778507770..bdd2719f3f68 100644 --- a/drivers/atm/fore200e.c +++ b/drivers/atm/fore200e.c @@ -2643,14 +2643,17 @@ fore200e_init(struct fore200e* fore200e, struct device *parent) } #ifdef CONFIG_SBUS -static int __devinit fore200e_sba_probe(struct platform_device *op, - const struct of_device_id *match) +static int __devinit fore200e_sba_probe(struct platform_device *op) { - const struct fore200e_bus *bus = match->data; + const struct fore200e_bus *bus; struct fore200e *fore200e; static int index = 0; int err; + if (!op->dev.of_match) + return -EINVAL; + bus = op->dev.of_match->data; + fore200e = kzalloc(sizeof(struct fore200e), GFP_KERNEL); if (!fore200e) return -ENOMEM; @@ -2694,7 +2697,7 @@ static const struct of_device_id fore200e_sba_match[] = { }; MODULE_DEVICE_TABLE(of, fore200e_sba_match); -static struct of_platform_driver fore200e_sba_driver = { +static struct platform_driver fore200e_sba_driver = { .driver = { .name = "fore_200e", .owner = THIS_MODULE, @@ -2795,7 +2798,7 @@ static int __init fore200e_module_init(void) printk(FORE200E "FORE Systems 200E-series ATM driver - version " FORE200E_VERSION "\n"); #ifdef CONFIG_SBUS - err = of_register_platform_driver(&fore200e_sba_driver); + err = platform_driver_register(&fore200e_sba_driver); if (err) return err; #endif @@ -2806,7 +2809,7 @@ static int __init fore200e_module_init(void) #ifdef CONFIG_SBUS if (err) - of_unregister_platform_driver(&fore200e_sba_driver); + platform_driver_unregister(&fore200e_sba_driver); #endif return err; @@ -2818,7 +2821,7 @@ static void __exit fore200e_module_cleanup(void) pci_unregister_driver(&fore200e_pca_driver); #endif #ifdef CONFIG_SBUS - of_unregister_platform_driver(&fore200e_sba_driver); + platform_driver_unregister(&fore200e_sba_driver); #endif } -- cgit v1.2.3