X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=drivers%2Fatm%2Ffore200e.c;h=bdd2719f3f68382084fb04170b1c14022e442425;hb=c5850150d0b9ae16840c5d9846f9d5a759996a15;hp=44f778507770b50624dc2699953dcbad4a72d0c2;hpb=97eb3f24352ec6632c2127b35d8087d2a809a9b9;p=~andy%2Flinux diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c index 44f77850777..bdd2719f3f6 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 }