]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/edac/mpc85xx_edac.c
edac: mpc85xx: fix coldplug/hotplug module autoloading
[net-next-2.6.git] / drivers / edac / mpc85xx_edac.c
index 6c1886b497ff673add09b99809f065c9a294090b..1052340e6802658db085627f501f3c6102347e67 100644 (file)
@@ -229,7 +229,7 @@ static int __devinit mpc85xx_pci_err_probe(struct of_device *op,
 
        pdata->edac_idx = edac_pci_idx++;
 
-       res = of_address_to_resource(op->node, 0, &r);
+       res = of_address_to_resource(op->dev.of_node, 0, &r);
        if (res) {
                printk(KERN_ERR "%s: Unable to get resource for "
                       "PCI err regs\n", __func__);
@@ -274,7 +274,7 @@ static int __devinit mpc85xx_pci_err_probe(struct of_device *op,
        }
 
        if (edac_op_state == EDAC_OPSTATE_INT) {
-               pdata->irq = irq_of_parse_and_map(op->node, 0);
+               pdata->irq = irq_of_parse_and_map(op->dev.of_node, 0);
                res = devm_request_irq(&op->dev, pdata->irq,
                                       mpc85xx_pci_isr, IRQF_DISABLED,
                                       "[EDAC] PCI err", pci);
@@ -336,6 +336,7 @@ static struct of_device_id mpc85xx_pci_err_of_match[] = {
        },
        {},
 };
+MODULE_DEVICE_TABLE(of, mpc85xx_pci_err_of_match);
 
 static struct of_platform_driver mpc85xx_pci_err_driver = {
        .probe = mpc85xx_pci_err_probe,
@@ -529,7 +530,7 @@ static int __devinit mpc85xx_l2_err_probe(struct of_device *op,
        edac_dev->ctl_name = pdata->name;
        edac_dev->dev_name = pdata->name;
 
-       res = of_address_to_resource(op->node, 0, &r);
+       res = of_address_to_resource(op->dev.of_node, 0, &r);
        if (res) {
                printk(KERN_ERR "%s: Unable to get resource for "
                       "L2 err regs\n", __func__);
@@ -576,7 +577,7 @@ static int __devinit mpc85xx_l2_err_probe(struct of_device *op,
        }
 
        if (edac_op_state == EDAC_OPSTATE_INT) {
-               pdata->irq = irq_of_parse_and_map(op->node, 0);
+               pdata->irq = irq_of_parse_and_map(op->dev.of_node, 0);
                res = devm_request_irq(&op->dev, pdata->irq,
                                       mpc85xx_l2_isr, IRQF_DISABLED,
                                       "[EDAC] L2 err", edac_dev);
@@ -650,6 +651,7 @@ static struct of_device_id mpc85xx_l2_err_of_match[] = {
        { .compatible = "fsl,p2020-l2-cache-controller", },
        {},
 };
+MODULE_DEVICE_TABLE(of, mpc85xx_l2_err_of_match);
 
 static struct of_platform_driver mpc85xx_l2_err_driver = {
        .probe = mpc85xx_l2_err_probe,
@@ -978,7 +980,7 @@ static int __devinit mpc85xx_mc_err_probe(struct of_device *op,
        mci->ctl_name = pdata->name;
        mci->dev_name = pdata->name;
 
-       res = of_address_to_resource(op->node, 0, &r);
+       res = of_address_to_resource(op->dev.of_node, 0, &r);
        if (res) {
                printk(KERN_ERR "%s: Unable to get resource for MC err regs\n",
                       __func__);
@@ -1052,7 +1054,7 @@ static int __devinit mpc85xx_mc_err_probe(struct of_device *op,
                out_be32(pdata->mc_vbase + MPC85XX_MC_ERR_SBE, 0x10000);
 
                /* register interrupts */
-               pdata->irq = irq_of_parse_and_map(op->node, 0);
+               pdata->irq = irq_of_parse_and_map(op->dev.of_node, 0);
                res = devm_request_irq(&op->dev, pdata->irq,
                                       mpc85xx_mc_isr,
                                        IRQF_DISABLED | IRQF_SHARED,
@@ -1120,11 +1122,13 @@ static struct of_device_id mpc85xx_mc_err_of_match[] = {
        { .compatible = "fsl,mpc8555-memory-controller", },
        { .compatible = "fsl,mpc8560-memory-controller", },
        { .compatible = "fsl,mpc8568-memory-controller", },
+       { .compatible = "fsl,mpc8569-memory-controller", },
        { .compatible = "fsl,mpc8572-memory-controller", },
        { .compatible = "fsl,mpc8349-memory-controller", },
        { .compatible = "fsl,p2020-memory-controller", },
        {},
 };
+MODULE_DEVICE_TABLE(of, mpc85xx_mc_err_of_match);
 
 static struct of_platform_driver mpc85xx_mc_err_driver = {
        .probe = mpc85xx_mc_err_probe,