]> Pileus Git - ~andy/linux/blobdiff - drivers/atm/fore200e.c
Merge branch 'stable/bug-fixes-rc1' of git://git.kernel.org/pub/scm/linux/kernel...
[~andy/linux] / drivers / atm / fore200e.c
index 44f778507770b50624dc2699953dcbad4a72d0c2..bdd2719f3f68382084fb04170b1c14022e442425 100644 (file)
@@ -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
 }