return ebus_dma_residue(&sparc_ebus_dmas[dmanr].info);
 }
 
-static int __devinit ecpp_probe(struct platform_device *op, const struct of_device_id *match)
+static int __devinit ecpp_probe(struct platform_device *op)
 {
        unsigned long base = op->resource[0].start;
        unsigned long config = op->resource[1].start;
        {},
 };
 
-static struct of_platform_driver ecpp_driver = {
+static struct platform_driver ecpp_driver = {
        .driver = {
                .name = "ecpp",
                .owner = THIS_MODULE,
 
 static int parport_pc_find_nonpci_ports(int autoirq, int autodma)
 {
-       return of_register_platform_driver(&ecpp_driver);
+       return platform_driver_register(&ecpp_driver);
 }
 
 #endif /* !(_ASM_SPARC64_PARPORT_H */
 
 
 static struct miscdevice apc_miscdev = { APC_MINOR, APC_DEVNAME, &apc_fops };
 
-static int __devinit apc_probe(struct platform_device *op,
-                              const struct of_device_id *match)
+static int __devinit apc_probe(struct platform_device *op)
 {
        int err;
 
 };
 MODULE_DEVICE_TABLE(of, apc_match);
 
-static struct of_platform_driver apc_driver = {
+static struct platform_driver apc_driver = {
        .driver = {
                .name = "apc",
                .owner = THIS_MODULE,
 
 static int __init apc_init(void)
 {
-       return of_register_platform_driver(&apc_driver);
+       return platform_driver_register(&apc_driver);
 }
 
 /* This driver is not critical to the boot process
 
 
 MODULE_DEVICE_TABLE(of, auxio_match);
 
-static int __devinit auxio_probe(struct platform_device *dev,
-                                const struct of_device_id *match)
+static int __devinit auxio_probe(struct platform_device *dev)
 {
        struct device_node *dp = dev->dev.of_node;
        unsigned long size;
        return 0;
 }
 
-static struct of_platform_driver auxio_driver = {
+static struct platform_driver auxio_driver = {
        .probe          = auxio_probe,
        .driver = {
                .name = "auxio",
 
 static int __init auxio_init(void)
 {
-       return of_register_platform_driver(&auxio_driver);
+       return platform_driver_register(&auxio_driver);
 }
 
 /* Must be after subsys_initcall() so that busses are probed.  Must
 
        }
 }
 
-static int __devinit clock_board_probe(struct platform_device *op,
-                                      const struct of_device_id *match)
+static int __devinit clock_board_probe(struct platform_device *op)
 {
        struct clock_board *p = kzalloc(sizeof(*p), GFP_KERNEL);
        int err = -ENOMEM;
        {},
 };
 
-static struct of_platform_driver clock_board_driver = {
+static struct platform_driver clock_board_driver = {
        .probe          = clock_board_probe,
        .driver = {
                .name = "clock_board",
        },
 };
 
-static int __devinit fhc_probe(struct platform_device *op,
-                              const struct of_device_id *match)
+static int __devinit fhc_probe(struct platform_device *op)
 {
        struct fhc *p = kzalloc(sizeof(*p), GFP_KERNEL);
        int err = -ENOMEM;
        {},
 };
 
-static struct of_platform_driver fhc_driver = {
+static struct platform_driver fhc_driver = {
        .probe          = fhc_probe,
        .driver = {
                .name = "fhc",
 
 static int __init sunfire_init(void)
 {
-       (void) of_register_platform_driver(&fhc_driver);
-       (void) of_register_platform_driver(&clock_board_driver);
+       (void) platform_driver_register(&fhc_driver);
+       (void) platform_driver_register(&clock_board_driver);
        return 0;
 }
 
 
        }
 }
 
-static int __devinit jbusmc_probe(struct platform_device *op,
-                                 const struct of_device_id *match)
+static int __devinit jbusmc_probe(struct platform_device *op)
 {
        const struct linux_prom64_registers *mem_regs;
        struct device_node *mem_node;
                                      chmc_read_mcreg(p, CHMCTRL_DECODE4));
 }
 
-static int __devinit chmc_probe(struct platform_device *op,
-                               const struct of_device_id *match)
+static int __devinit chmc_probe(struct platform_device *op)
 {
        struct device_node *dp = op->dev.of_node;
        unsigned long ver;
        goto out;
 }
 
-static int __devinit us3mc_probe(struct platform_device *op,
-                               const struct of_device_id *match)
+static int __devinit us3mc_probe(struct platform_device *op)
 {
        if (mc_type == MC_TYPE_SAFARI)
-               return chmc_probe(op, match);
+               return chmc_probe(op);
        else if (mc_type == MC_TYPE_JBUS)
-               return jbusmc_probe(op, match);
+               return jbusmc_probe(op);
        return -ENODEV;
 }
 
 };
 MODULE_DEVICE_TABLE(of, us3mc_match);
 
-static struct of_platform_driver us3mc_driver = {
+static struct platform_driver us3mc_driver = {
        .driver = {
                .name = "us3mc",
                .owner = THIS_MODULE,
        ret = register_dimm_printer(us3mc_dimm_printer);
 
        if (!ret) {
-               ret = of_register_platform_driver(&us3mc_driver);
+               ret = platform_driver_register(&us3mc_driver);
                if (ret)
                        unregister_dimm_printer(us3mc_dimm_printer);
        }
 {
        if (us3mc_platform()) {
                unregister_dimm_printer(us3mc_dimm_printer);
-               of_unregister_platform_driver(&us3mc_driver);
+               platform_driver_unregister(&us3mc_driver);
        }
 }
 
 
        return 0;
 }
 
-static int __devinit fire_probe(struct platform_device *op,
-                               const struct of_device_id *match)
+static int __devinit fire_probe(struct platform_device *op)
 {
        struct device_node *dp = op->dev.of_node;
        struct pci_pbm_info *pbm;
        {},
 };
 
-static struct of_platform_driver fire_driver = {
+static struct platform_driver fire_driver = {
        .driver = {
                .name = DRIVER_NAME,
                .owner = THIS_MODULE,
 
 static int __init fire_init(void)
 {
-       return of_register_platform_driver(&fire_driver);
+       return platform_driver_register(&fire_driver);
 }
 
 subsys_initcall(fire_init);
 
 
 #define PSYCHO_CONFIGSPACE     0x001000000UL
 
-static int __devinit psycho_probe(struct platform_device *op,
-                                 const struct of_device_id *match)
+static int __devinit psycho_probe(struct platform_device *op)
 {
        const struct linux_prom64_registers *pr_regs;
        struct device_node *dp = op->dev.of_node;
        {},
 };
 
-static struct of_platform_driver psycho_driver = {
+static struct platform_driver psycho_driver = {
        .driver = {
                .name = DRIVER_NAME,
                .owner = THIS_MODULE,
 
 static int __init psycho_init(void)
 {
-       return of_register_platform_driver(&psycho_driver);
+       return platform_driver_register(&psycho_driver);
 }
 
 subsys_initcall(psycho_init);
 
        sabre_scan_bus(pbm, &op->dev);
 }
 
-static int __devinit sabre_probe(struct platform_device *op,
-                                const struct of_device_id *match)
+static int __devinit sabre_probe(struct platform_device *op)
 {
        const struct linux_prom64_registers *pr_regs;
        struct device_node *dp = op->dev.of_node;
        const u32 *vdma;
        u64 clear_irq;
 
-       hummingbird_p = (match->data != NULL);
+       hummingbird_p = op->dev.of_match && (op->dev.of_match->data != NULL);
        if (!hummingbird_p) {
                struct device_node *cpu_dp;
 
        {},
 };
 
-static struct of_platform_driver sabre_driver = {
+static struct platform_driver sabre_driver = {
        .driver = {
                .name = DRIVER_NAME,
                .owner = THIS_MODULE,
 
 static int __init sabre_init(void)
 {
-       return of_register_platform_driver(&sabre_driver);
+       return platform_driver_register(&sabre_driver);
 }
 
 subsys_initcall(sabre_init);
 
        return err;
 }
 
-static int __devinit schizo_probe(struct platform_device *op,
-                                 const struct of_device_id *match)
+static int __devinit schizo_probe(struct platform_device *op)
 {
-       return __schizo_init(op, (unsigned long) match->data);
+       if (!op->dev.of_match)
+               return -EINVAL;
+       return __schizo_init(op, (unsigned long) op->dev.of_match->data);
 }
 
 /* The ordering of this table is very important.  Some Tomatillo
        {},
 };
 
-static struct of_platform_driver schizo_driver = {
+static struct platform_driver schizo_driver = {
        .driver = {
                .name = DRIVER_NAME,
                .owner = THIS_MODULE,
 
 static int __init schizo_init(void)
 {
-       return of_register_platform_driver(&schizo_driver);
+       return platform_driver_register(&schizo_driver);
 }
 
 subsys_initcall(schizo_init);
 
        return 0;
 }
 
-static int __devinit pci_sun4v_probe(struct platform_device *op,
-                                    const struct of_device_id *match)
+static int __devinit pci_sun4v_probe(struct platform_device *op)
 {
        const struct linux_prom64_registers *regs;
        static int hvapi_negotiated = 0;
        {},
 };
 
-static struct of_platform_driver pci_sun4v_driver = {
+static struct platform_driver pci_sun4v_driver = {
        .driver = {
                .name = DRIVER_NAME,
                .owner = THIS_MODULE,
 
 static int __init pci_sun4v_init(void)
 {
-       return of_register_platform_driver(&pci_sun4v_driver);
+       return platform_driver_register(&pci_sun4v_driver);
 }
 
 subsys_initcall(pci_sun4v_init);
 
 #endif
 }
 
-static int __devinit pmc_probe(struct platform_device *op,
-                              const struct of_device_id *match)
+static int __devinit pmc_probe(struct platform_device *op)
 {
        regs = of_ioremap(&op->resource[0], 0,
                          resource_size(&op->resource[0]), PMC_OBPNAME);
 };
 MODULE_DEVICE_TABLE(of, pmc_match);
 
-static struct of_platform_driver pmc_driver = {
+static struct platform_driver pmc_driver = {
        .driver = {
                .name = "pmc",
                .owner = THIS_MODULE,
 
 static int __init pmc_init(void)
 {
-       return of_register_platform_driver(&pmc_driver);
+       return platform_driver_register(&pmc_driver);
 }
 
 /* This driver is not critical to the boot process
 
        return 1;
 }
 
-static int __devinit power_probe(struct platform_device *op, const struct of_device_id *match)
+static int __devinit power_probe(struct platform_device *op)
 {
        struct resource *res = &op->resource[0];
        unsigned int irq = op->archdata.irqs[0];
        {},
 };
 
-static struct of_platform_driver power_driver = {
+static struct platform_driver power_driver = {
        .probe          = power_probe,
        .driver = {
                .name = "power",
 
 static int __init power_init(void)
 {
-       return of_register_platform_driver(&power_driver);
+       return platform_driver_register(&power_driver);
 }
 
 device_initcall(power_init);
 
        },
 };
 
-static int __devinit clock_probe(struct platform_device *op, const struct of_device_id *match)
+static int __devinit clock_probe(struct platform_device *op)
 {
        struct device_node *dp = op->dev.of_node;
        const char *model = of_get_property(dp, "model", NULL);
        {},
 };
 
-static struct of_platform_driver clock_driver = {
+static struct platform_driver clock_driver = {
        .probe          = clock_probe,
        .driver = {
                .name = "rtc",
 /* Probe for the mostek real time clock chip. */
 static int __init clock_init(void)
 {
-       return of_register_platform_driver(&clock_driver);
+       return platform_driver_register(&clock_driver);
 }
 /* Must be after subsys_initcall() so that busses are probed.  Must
  * be before device_initcall() because things like the RTC driver
 
        .num_resources  = 1,
 };
 
-static int __devinit rtc_probe(struct platform_device *op, const struct of_device_id *match)
+static int __devinit rtc_probe(struct platform_device *op)
 {
        struct resource *r;
 
        {},
 };
 
-static struct of_platform_driver rtc_driver = {
+static struct platform_driver rtc_driver = {
        .probe          = rtc_probe,
        .driver = {
                .name = "rtc",
        .num_resources  = 1,
 };
 
-static int __devinit bq4802_probe(struct platform_device *op, const struct of_device_id *match)
+static int __devinit bq4802_probe(struct platform_device *op)
 {
 
        printk(KERN_INFO "%s: BQ4802 regs at 0x%llx\n",
        {},
 };
 
-static struct of_platform_driver bq4802_driver = {
+static struct platform_driver bq4802_driver = {
        .probe          = bq4802_probe,
        .driver = {
                .name = "bq4802",
        },
 };
 
-static int __devinit mostek_probe(struct platform_device *op, const struct of_device_id *match)
+static int __devinit mostek_probe(struct platform_device *op)
 {
        struct device_node *dp = op->dev.of_node;
 
        {},
 };
 
-static struct of_platform_driver mostek_driver = {
+static struct platform_driver mostek_driver = {
        .probe          = mostek_probe,
        .driver = {
                .name = "mostek",
        if (tlb_type == hypervisor)
                return platform_device_register(&rtc_sun4v_device);
 
-       (void) of_register_platform_driver(&rtc_driver);
-       (void) of_register_platform_driver(&mostek_driver);
-       (void) of_register_platform_driver(&bq4802_driver);
+       (void) platform_driver_register(&rtc_driver);
+       (void) platform_driver_register(&mostek_driver);
+       (void) platform_driver_register(&bq4802_driver);
 
        return 0;
 }
 
                pr_info("%s", version);
 }
 
-static int __devinit n2rng_probe(struct platform_device *op,
-                                const struct of_device_id *match)
+static int __devinit n2rng_probe(struct platform_device *op)
 {
-       int victoria_falls = (match->data != NULL);
+       int victoria_falls;
        int err = -ENOMEM;
        struct n2rng *np;
 
-       n2rng_driver_version();
+       if (!op->dev.of_match)
+               return -EINVAL;
+       victoria_falls = (op->dev.of_match->data != NULL);
 
+       n2rng_driver_version();
        np = kzalloc(sizeof(*np), GFP_KERNEL);
        if (!np)
                goto out;
 };
 MODULE_DEVICE_TABLE(of, n2rng_match);
 
-static struct of_platform_driver n2rng_driver = {
+static struct platform_driver n2rng_driver = {
        .driver = {
                .name = "n2rng",
                .owner = THIS_MODULE,
 
 static int __init n2rng_init(void)
 {
-       return of_register_platform_driver(&n2rng_driver);
+       return platform_driver_register(&n2rng_driver);
 }
 
 static void __exit n2rng_exit(void)
 {
-       of_unregister_platform_driver(&n2rng_driver);
+       platform_driver_unregister(&n2rng_driver);
 }
 
 module_init(n2rng_init);
 
                pr_info("%s", version);
 }
 
-static int __devinit n2_crypto_probe(struct platform_device *dev,
-                                    const struct of_device_id *match)
+static int __devinit n2_crypto_probe(struct platform_device *dev)
 {
        struct mdesc_handle *mdesc;
        const char *full_name;
        kfree(mp);
 }
 
-static int __devinit n2_mau_probe(struct platform_device *dev,
-                                    const struct of_device_id *match)
+static int __devinit n2_mau_probe(struct platform_device *dev)
 {
        struct mdesc_handle *mdesc;
        const char *full_name;
 
 MODULE_DEVICE_TABLE(of, n2_crypto_match);
 
-static struct of_platform_driver n2_crypto_driver = {
+static struct platform_driver n2_crypto_driver = {
        .driver = {
                .name           =       "n2cp",
                .owner          =       THIS_MODULE,
 
 MODULE_DEVICE_TABLE(of, n2_mau_match);
 
-static struct of_platform_driver n2_mau_driver = {
+static struct platform_driver n2_mau_driver = {
        .driver = {
                .name           =       "ncp",
                .owner          =       THIS_MODULE,
 
 static int __init n2_init(void)
 {
-       int err = of_register_platform_driver(&n2_crypto_driver);
+       int err = platform_driver_register(&n2_crypto_driver);
 
        if (!err) {
-               err = of_register_platform_driver(&n2_mau_driver);
+               err = platform_driver_register(&n2_mau_driver);
                if (err)
-                       of_unregister_platform_driver(&n2_crypto_driver);
+                       platform_driver_unregister(&n2_crypto_driver);
        }
        return err;
 }
 
 static void __exit n2_exit(void)
 {
-       of_unregister_platform_driver(&n2_mau_driver);
-       of_unregister_platform_driver(&n2_crypto_driver);
+       platform_driver_unregister(&n2_mau_driver);
+       platform_driver_unregister(&n2_crypto_driver);
 }
 
 module_init(n2_init);
 
        .attrs = env_attributes,
 };
 
-static int __devinit env_probe(struct platform_device *op,
-                              const struct of_device_id *match)
+static int __devinit env_probe(struct platform_device *op)
 {
        struct env *p = kzalloc(sizeof(*p), GFP_KERNEL);
        int err = -ENOMEM;
 };
 MODULE_DEVICE_TABLE(of, env_match);
 
-static struct of_platform_driver env_driver = {
+static struct platform_driver env_driver = {
        .driver = {
                .name = "ultra45_env",
                .owner = THIS_MODULE,
 
 static int __init env_init(void)
 {
-       return of_register_platform_driver(&env_driver);
+       return platform_driver_register(&env_driver);
 }
 
 static void __exit env_exit(void)
 {
-       of_unregister_platform_driver(&env_driver);
+       platform_driver_unregister(&env_driver);
 }
 
 module_init(env_init);
 
        return 0;
 }
 
-static int sparcspkr_shutdown(struct platform_device *dev)
+static void sparcspkr_shutdown(struct platform_device *dev)
 {
        struct sparcspkr_state *state = dev_get_drvdata(&dev->dev);
        struct input_dev *input_dev = state->input_dev;
 
        /* turn off the speaker */
        state->event(input_dev, EV_SND, SND_BELL, 0);
-
-       return 0;
 }
 
-static int __devinit bbc_beep_probe(struct platform_device *op, const struct of_device_id *match)
+static int __devinit bbc_beep_probe(struct platform_device *op)
 {
        struct sparcspkr_state *state;
        struct bbc_beep_info *info;
        {},
 };
 
-static struct of_platform_driver bbc_beep_driver = {
+static struct platform_driver bbc_beep_driver = {
        .driver = {
                .name = "bbcbeep",
                .owner = THIS_MODULE,
        .shutdown       = sparcspkr_shutdown,
 };
 
-static int __devinit grover_beep_probe(struct platform_device *op, const struct of_device_id *match)
+static int __devinit grover_beep_probe(struct platform_device *op)
 {
        struct sparcspkr_state *state;
        struct grover_beep_info *info;
        {},
 };
 
-static struct of_platform_driver grover_beep_driver = {
+static struct platform_driver grover_beep_driver = {
        .driver = {
                .name = "groverbeep",
                .owner = THIS_MODULE,
 
 static int __init sparcspkr_init(void)
 {
-       int err = of_register_platform_driver(&bbc_beep_driver);
+       int err = platform_driver_register(&bbc_beep_driver);
 
        if (!err) {
-               err = of_register_platform_driver(&grover_beep_driver);
+               err = platform_driver_register(&grover_beep_driver);
                if (err)
-                       of_unregister_platform_driver(&bbc_beep_driver);
+                       platform_driver_unregister(&bbc_beep_driver);
        }
 
        return err;
 
 static void __exit sparcspkr_exit(void)
 {
-       of_unregister_platform_driver(&bbc_beep_driver);
-       of_unregister_platform_driver(&grover_beep_driver);
+       platform_driver_unregister(&bbc_beep_driver);
+       platform_driver_unregister(&grover_beep_driver);
 }
 
 module_init(sparcspkr_init);
 
 #define OBP_PS2MS_NAME1                "kdmouse"
 #define OBP_PS2MS_NAME2                "mouse"
 
-static int __devinit sparc_i8042_probe(struct platform_device *op, const struct of_device_id *match)
+static int __devinit sparc_i8042_probe(struct platform_device *op)
 {
        struct device_node *dp = op->dev.of_node;
 
 };
 MODULE_DEVICE_TABLE(of, sparc_i8042_match);
 
-static struct of_platform_driver sparc_i8042_driver = {
+static struct platform_driver sparc_i8042_driver = {
        .driver = {
                .name = "i8042",
                .owner = THIS_MODULE,
                if (!kbd_iobase)
                        return -ENODEV;
        } else {
-               int err = of_register_platform_driver(&sparc_i8042_driver);
+               int err = platform_driver_register(&sparc_i8042_driver);
                if (err)
                        return err;
 
        struct device_node *root = of_find_node_by_path("/");
 
        if (strcmp(root->name, "SUNW,JavaStation-1"))
-               of_unregister_platform_driver(&sparc_i8042_driver);
+               platform_driver_unregister(&sparc_i8042_driver);
 }
 
 #else /* !CONFIG_PCI */
 
        .owner          = THIS_MODULE,
 };
 
-static int __devinit bpp_probe(struct platform_device *op, const struct of_device_id *match)
+static int __devinit bpp_probe(struct platform_device *op)
 {
        struct parport_operations *ops;
        struct bpp_regs __iomem *regs;
 
 MODULE_DEVICE_TABLE(of, bpp_match);
 
-static struct of_platform_driver bpp_sbus_driver = {
+static struct platform_driver bpp_sbus_driver = {
        .driver = {
                .name = "bpp",
                .owner = THIS_MODULE,
 
 static int __init parport_sunbpp_init(void)
 {
-       return of_register_platform_driver(&bpp_sbus_driver);
+       return platform_driver_register(&bpp_sbus_driver);
 }
 
 static void __exit parport_sunbpp_exit(void)
 {
-       of_unregister_platform_driver(&bpp_sbus_driver);
+       platform_driver_unregister(&bpp_sbus_driver);
 }
 
 MODULE_AUTHOR("Derrick J Brashear");
 
 extern int bbc_envctrl_init(struct bbc_i2c_bus *bp);
 extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp);
 
-static int __devinit bbc_i2c_probe(struct platform_device *op,
-                                  const struct of_device_id *match)
+static int __devinit bbc_i2c_probe(struct platform_device *op)
 {
        struct bbc_i2c_bus *bp;
        int err, index = 0;
 };
 MODULE_DEVICE_TABLE(of, bbc_i2c_match);
 
-static struct of_platform_driver bbc_i2c_driver = {
+static struct platform_driver bbc_i2c_driver = {
        .driver = {
                .name = "bbc_i2c",
                .owner = THIS_MODULE,
 
 static int __init bbc_i2c_init(void)
 {
-       return of_register_platform_driver(&bbc_i2c_driver);
+       return platform_driver_register(&bbc_i2c_driver);
 }
 
 static void __exit bbc_i2c_exit(void)
 {
-       of_unregister_platform_driver(&bbc_i2c_driver);
+       platform_driver_unregister(&bbc_i2c_driver);
 }
 
 module_init(bbc_i2c_init);
 
        .fops           = &d7s_fops
 };
 
-static int __devinit d7s_probe(struct platform_device *op,
-                              const struct of_device_id *match)
+static int __devinit d7s_probe(struct platform_device *op)
 {
        struct device_node *opts;
        int err = -EINVAL;
 };
 MODULE_DEVICE_TABLE(of, d7s_match);
 
-static struct of_platform_driver d7s_driver = {
+static struct platform_driver d7s_driver = {
        .driver = {
                .name = DRIVER_NAME,
                .owner = THIS_MODULE,
 
 static int __init d7s_init(void)
 {
-       return of_register_platform_driver(&d7s_driver);
+       return platform_driver_register(&d7s_driver);
 }
 
 static void __exit d7s_exit(void)
 {
-       of_unregister_platform_driver(&d7s_driver);
+       platform_driver_unregister(&d7s_driver);
 }
 
 module_init(d7s_init);
 
        return 0;
 }
 
-static int __devinit envctrl_probe(struct platform_device *op,
-                                  const struct of_device_id *match)
+static int __devinit envctrl_probe(struct platform_device *op)
 {
        struct device_node *dp;
        int index, err;
 };
 MODULE_DEVICE_TABLE(of, envctrl_match);
 
-static struct of_platform_driver envctrl_driver = {
+static struct platform_driver envctrl_driver = {
        .driver = {
                .name = DRIVER_NAME,
                .owner = THIS_MODULE,
 
 static int __init envctrl_init(void)
 {
-       return of_register_platform_driver(&envctrl_driver);
+       return platform_driver_register(&envctrl_driver);
 }
 
 static void __exit envctrl_exit(void)
 {
-       of_unregister_platform_driver(&envctrl_driver);
+       platform_driver_unregister(&envctrl_driver);
 }
 
 module_init(envctrl_init);
 
 
 static struct miscdevice flash_dev = { FLASH_MINOR, "flash", &flash_fops };
 
-static int __devinit flash_probe(struct platform_device *op,
-                                const struct of_device_id *match)
+static int __devinit flash_probe(struct platform_device *op)
 {
        struct device_node *dp = op->dev.of_node;
        struct device_node *parent;
 };
 MODULE_DEVICE_TABLE(of, flash_match);
 
-static struct of_platform_driver flash_driver = {
+static struct platform_driver flash_driver = {
        .driver = {
                .name = "flash",
                .owner = THIS_MODULE,
 
 static int __init flash_init(void)
 {
-       return of_register_platform_driver(&flash_driver);
+       return platform_driver_register(&flash_driver);
 }
 
 static void __exit flash_cleanup(void)
 {
-       of_unregister_platform_driver(&flash_driver);
+       platform_driver_unregister(&flash_driver);
 }
 
 module_init(flash_init);
 
        
 }
 
-static int __devinit uctrl_probe(struct platform_device *op,
-                                const struct of_device_id *match)
+static int __devinit uctrl_probe(struct platform_device *op)
 {
        struct uctrl_driver *p;
        int err = -ENOMEM;
 };
 MODULE_DEVICE_TABLE(of, uctrl_match);
 
-static struct of_platform_driver uctrl_driver = {
+static struct platform_driver uctrl_driver = {
        .driver = {
                .name = "uctrl",
                .owner = THIS_MODULE,
 
 static int __init uctrl_init(void)
 {
-       return of_register_platform_driver(&uctrl_driver);
+       return platform_driver_register(&uctrl_driver);
 }
 
 static void __exit uctrl_exit(void)
 {
-       of_unregister_platform_driver(&uctrl_driver);
+       platform_driver_unregister(&uctrl_driver);
 }
 
 module_init(uctrl_init);
 
        .use_clustering         = ENABLE_CLUSTERING,
 };
 
-static int __devinit qpti_sbus_probe(struct platform_device *op, const struct of_device_id *match)
+static int __devinit qpti_sbus_probe(struct platform_device *op)
 {
-       struct scsi_host_template *tpnt = match->data;
+       struct scsi_host_template *tpnt;
        struct device_node *dp = op->dev.of_node;
        struct Scsi_Host *host;
        struct qlogicpti *qpti;
        static int nqptis;
        const char *fcode;
 
+       if (!op->dev.of_match)
+               return -EINVAL;
+       tpnt = op->dev.of_match->data;
+
        /* Sometimes Antares cards come up not completely
         * setup, and we get a report of a zero IRQ.
         */
 };
 MODULE_DEVICE_TABLE(of, qpti_match);
 
-static struct of_platform_driver qpti_sbus_driver = {
+static struct platform_driver qpti_sbus_driver = {
        .driver = {
                .name = "qpti",
                .owner = THIS_MODULE,
 
 static int __init qpti_init(void)
 {
-       return of_register_platform_driver(&qpti_sbus_driver);
+       return platform_driver_register(&qpti_sbus_driver);
 }
 
 static void __exit qpti_exit(void)
 {
-       of_unregister_platform_driver(&qpti_sbus_driver);
+       platform_driver_unregister(&qpti_sbus_driver);
 }
 
 MODULE_DESCRIPTION("QlogicISP SBUS driver");
 
        return err;
 }
 
-static int __devinit esp_sbus_probe(struct platform_device *op, const struct of_device_id *match)
+static int __devinit esp_sbus_probe(struct platform_device *op)
 {
        struct device_node *dma_node = NULL;
        struct device_node *dp = op->dev.of_node;
 };
 MODULE_DEVICE_TABLE(of, esp_match);
 
-static struct of_platform_driver esp_sbus_driver = {
+static struct platform_driver esp_sbus_driver = {
        .driver = {
                .name = "esp",
                .owner = THIS_MODULE,
 
 static int __init sunesp_init(void)
 {
-       return of_register_platform_driver(&esp_sbus_driver);
+       return platform_driver_register(&esp_sbus_driver);
 }
 
 static void __exit sunesp_exit(void)
 {
-       of_unregister_platform_driver(&esp_sbus_driver);
+       platform_driver_unregister(&esp_sbus_driver);
 }
 
 MODULE_DESCRIPTION("Sun ESP SCSI driver");