diff options
Diffstat (limited to 'drivers')
146 files changed, 1256 insertions, 697 deletions
diff --git a/drivers/ata/pata_macio.c b/drivers/ata/pata_macio.c index 25df50f51c0..b5b48e703cb 100644 --- a/drivers/ata/pata_macio.c +++ b/drivers/ata/pata_macio.c | |||
| @@ -1140,7 +1140,7 @@ static int __devinit pata_macio_attach(struct macio_dev *mdev, | |||
| 1140 | "Failed to allocate private memory\n"); | 1140 | "Failed to allocate private memory\n"); |
| 1141 | return -ENOMEM; | 1141 | return -ENOMEM; |
| 1142 | } | 1142 | } |
| 1143 | priv->node = of_node_get(mdev->ofdev.node); | 1143 | priv->node = of_node_get(mdev->ofdev.dev.of_node); |
| 1144 | priv->mdev = mdev; | 1144 | priv->mdev = mdev; |
| 1145 | priv->dev = &mdev->ofdev.dev; | 1145 | priv->dev = &mdev->ofdev.dev; |
| 1146 | 1146 | ||
diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c index 96b11b604ae..36afe2c1c74 100644 --- a/drivers/ata/pata_mpc52xx.c +++ b/drivers/ata/pata_mpc52xx.c | |||
| @@ -694,7 +694,7 @@ mpc52xx_ata_probe(struct of_device *op, const struct of_device_id *match) | |||
| 694 | struct bcom_task *dmatsk = NULL; | 694 | struct bcom_task *dmatsk = NULL; |
| 695 | 695 | ||
| 696 | /* Get ipb frequency */ | 696 | /* Get ipb frequency */ |
| 697 | ipb_freq = mpc5xxx_get_bus_frequency(op->node); | 697 | ipb_freq = mpc5xxx_get_bus_frequency(op->dev.of_node); |
| 698 | if (!ipb_freq) { | 698 | if (!ipb_freq) { |
| 699 | dev_err(&op->dev, "could not determine IPB bus frequency\n"); | 699 | dev_err(&op->dev, "could not determine IPB bus frequency\n"); |
| 700 | return -ENODEV; | 700 | return -ENODEV; |
| @@ -702,7 +702,7 @@ mpc52xx_ata_probe(struct of_device *op, const struct of_device_id *match) | |||
| 702 | 702 | ||
| 703 | /* Get device base address from device tree, request the region | 703 | /* Get device base address from device tree, request the region |
| 704 | * and ioremap it. */ | 704 | * and ioremap it. */ |
| 705 | rv = of_address_to_resource(op->node, 0, &res_mem); | 705 | rv = of_address_to_resource(op->dev.of_node, 0, &res_mem); |
| 706 | if (rv) { | 706 | if (rv) { |
| 707 | dev_err(&op->dev, "could not determine device base address\n"); | 707 | dev_err(&op->dev, "could not determine device base address\n"); |
| 708 | return rv; | 708 | return rv; |
| @@ -735,14 +735,14 @@ mpc52xx_ata_probe(struct of_device *op, const struct of_device_id *match) | |||
| 735 | * The MPC5200 ATA controller supports MWDMA modes 0, 1 and 2 and | 735 | * The MPC5200 ATA controller supports MWDMA modes 0, 1 and 2 and |
| 736 | * UDMA modes 0, 1 and 2. | 736 | * UDMA modes 0, 1 and 2. |
| 737 | */ | 737 | */ |
| 738 | prop = of_get_property(op->node, "mwdma-mode", &proplen); | 738 | prop = of_get_property(op->dev.of_node, "mwdma-mode", &proplen); |
| 739 | if ((prop) && (proplen >= 4)) | 739 | if ((prop) && (proplen >= 4)) |
| 740 | mwdma_mask = ATA_MWDMA2 & ((1 << (*prop + 1)) - 1); | 740 | mwdma_mask = ATA_MWDMA2 & ((1 << (*prop + 1)) - 1); |
| 741 | prop = of_get_property(op->node, "udma-mode", &proplen); | 741 | prop = of_get_property(op->dev.of_node, "udma-mode", &proplen); |
| 742 | if ((prop) && (proplen >= 4)) | 742 | if ((prop) && (proplen >= 4)) |
| 743 | udma_mask = ATA_UDMA2 & ((1 << (*prop + 1)) - 1); | 743 | udma_mask = ATA_UDMA2 & ((1 << (*prop + 1)) - 1); |
| 744 | 744 | ||
| 745 | ata_irq = irq_of_parse_and_map(op->node, 0); | 745 | ata_irq = irq_of_parse_and_map(op->dev.of_node, 0); |
| 746 | if (ata_irq == NO_IRQ) { | 746 | if (ata_irq == NO_IRQ) { |
| 747 | dev_err(&op->dev, "error mapping irq\n"); | 747 | dev_err(&op->dev, "error mapping irq\n"); |
| 748 | return -EINVAL; | 748 | return -EINVAL; |
| @@ -884,9 +884,6 @@ static struct of_device_id mpc52xx_ata_of_match[] = { | |||
| 884 | 884 | ||
| 885 | 885 | ||
| 886 | static struct of_platform_driver mpc52xx_ata_of_platform_driver = { | 886 | static struct of_platform_driver mpc52xx_ata_of_platform_driver = { |
| 887 | .owner = THIS_MODULE, | ||
| 888 | .name = DRV_NAME, | ||
| 889 | .match_table = mpc52xx_ata_of_match, | ||
| 890 | .probe = mpc52xx_ata_probe, | 887 | .probe = mpc52xx_ata_probe, |
| 891 | .remove = mpc52xx_ata_remove, | 888 | .remove = mpc52xx_ata_remove, |
| 892 | #ifdef CONFIG_PM | 889 | #ifdef CONFIG_PM |
| @@ -896,6 +893,7 @@ static struct of_platform_driver mpc52xx_ata_of_platform_driver = { | |||
| 896 | .driver = { | 893 | .driver = { |
| 897 | .name = DRV_NAME, | 894 | .name = DRV_NAME, |
| 898 | .owner = THIS_MODULE, | 895 | .owner = THIS_MODULE, |
| 896 | .of_match_table = mpc52xx_ata_of_match, | ||
| 899 | }, | 897 | }, |
| 900 | }; | 898 | }; |
| 901 | 899 | ||
diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c index 1f18ad9e4fe..5a1b82c08be 100644 --- a/drivers/ata/pata_of_platform.c +++ b/drivers/ata/pata_of_platform.c | |||
| @@ -18,7 +18,7 @@ static int __devinit pata_of_platform_probe(struct of_device *ofdev, | |||
| 18 | const struct of_device_id *match) | 18 | const struct of_device_id *match) |
| 19 | { | 19 | { |
| 20 | int ret; | 20 | int ret; |
| 21 | struct device_node *dn = ofdev->node; | 21 | struct device_node *dn = ofdev->dev.of_node; |
| 22 | struct resource io_res; | 22 | struct resource io_res; |
| 23 | struct resource ctl_res; | 23 | struct resource ctl_res; |
| 24 | struct resource irq_res; | 24 | struct resource irq_res; |
| @@ -91,8 +91,11 @@ static struct of_device_id pata_of_platform_match[] = { | |||
| 91 | MODULE_DEVICE_TABLE(of, pata_of_platform_match); | 91 | MODULE_DEVICE_TABLE(of, pata_of_platform_match); |
| 92 | 92 | ||
| 93 | static struct of_platform_driver pata_of_platform_driver = { | 93 | static struct of_platform_driver pata_of_platform_driver = { |
| 94 | .name = "pata_of_platform", | 94 | .driver = { |
| 95 | .match_table = pata_of_platform_match, | 95 | .name = "pata_of_platform", |
| 96 | .owner = THIS_MODULE, | ||
| 97 | .of_match_table = pata_of_platform_match, | ||
| 98 | }, | ||
| 96 | .probe = pata_of_platform_probe, | 99 | .probe = pata_of_platform_probe, |
| 97 | .remove = __devexit_p(pata_of_platform_remove), | 100 | .remove = __devexit_p(pata_of_platform_remove), |
| 98 | }; | 101 | }; |
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c index a69192b38b4..61c89b54ea2 100644 --- a/drivers/ata/sata_fsl.c +++ b/drivers/ata/sata_fsl.c | |||
| @@ -1313,7 +1313,7 @@ static int sata_fsl_probe(struct of_device *ofdev, | |||
| 1313 | dev_printk(KERN_INFO, &ofdev->dev, | 1313 | dev_printk(KERN_INFO, &ofdev->dev, |
| 1314 | "Sata FSL Platform/CSB Driver init\n"); | 1314 | "Sata FSL Platform/CSB Driver init\n"); |
| 1315 | 1315 | ||
| 1316 | hcr_base = of_iomap(ofdev->node, 0); | 1316 | hcr_base = of_iomap(ofdev->dev.of_node, 0); |
| 1317 | if (!hcr_base) | 1317 | if (!hcr_base) |
| 1318 | goto error_exit_with_cleanup; | 1318 | goto error_exit_with_cleanup; |
| 1319 | 1319 | ||
| @@ -1332,7 +1332,7 @@ static int sata_fsl_probe(struct of_device *ofdev, | |||
| 1332 | host_priv->ssr_base = ssr_base; | 1332 | host_priv->ssr_base = ssr_base; |
| 1333 | host_priv->csr_base = csr_base; | 1333 | host_priv->csr_base = csr_base; |
| 1334 | 1334 | ||
| 1335 | irq = irq_of_parse_and_map(ofdev->node, 0); | 1335 | irq = irq_of_parse_and_map(ofdev->dev.of_node, 0); |
| 1336 | if (irq < 0) { | 1336 | if (irq < 0) { |
| 1337 | dev_printk(KERN_ERR, &ofdev->dev, "invalid irq from platform\n"); | 1337 | dev_printk(KERN_ERR, &ofdev->dev, "invalid irq from platform\n"); |
| 1338 | goto error_exit_with_cleanup; | 1338 | goto error_exit_with_cleanup; |
| @@ -1427,8 +1427,11 @@ static struct of_device_id fsl_sata_match[] = { | |||
| 1427 | MODULE_DEVICE_TABLE(of, fsl_sata_match); | 1427 | MODULE_DEVICE_TABLE(of, fsl_sata_match); |
| 1428 | 1428 | ||
| 1429 | static struct of_platform_driver fsl_sata_driver = { | 1429 | static struct of_platform_driver fsl_sata_driver = { |
| 1430 | .name = "fsl-sata", | 1430 | .driver = { |
| 1431 | .match_table = fsl_sata_match, | 1431 | .name = "fsl-sata", |
| 1432 | .owner = THIS_MODULE, | ||
| 1433 | .of_match_table = fsl_sata_match, | ||
| 1434 | }, | ||
| 1432 | .probe = sata_fsl_probe, | 1435 | .probe = sata_fsl_probe, |
| 1433 | .remove = sata_fsl_remove, | 1436 | .remove = sata_fsl_remove, |
| 1434 | #ifdef CONFIG_PM | 1437 | #ifdef CONFIG_PM |
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c index f7d6ebaa041..da8f176c051 100644 --- a/drivers/atm/fore200e.c +++ b/drivers/atm/fore200e.c | |||
| @@ -789,7 +789,7 @@ static int __init fore200e_sba_map(struct fore200e *fore200e) | |||
| 789 | fore200e->bus->write(0x02, fore200e->regs.sba.isr); /* XXX hardwired interrupt level */ | 789 | fore200e->bus->write(0x02, fore200e->regs.sba.isr); /* XXX hardwired interrupt level */ |
| 790 | 790 | ||
| 791 | /* get the supported DVMA burst sizes */ | 791 | /* get the supported DVMA burst sizes */ |
| 792 | bursts = of_getintprop_default(op->node->parent, "burst-sizes", 0x00); | 792 | bursts = of_getintprop_default(op->dev.of_node->parent, "burst-sizes", 0x00); |
| 793 | 793 | ||
| 794 | if (sbus_can_dma_64bit()) | 794 | if (sbus_can_dma_64bit()) |
| 795 | sbus_set_sbus64(&op->dev, bursts); | 795 | sbus_set_sbus64(&op->dev, bursts); |
| @@ -820,18 +820,20 @@ static int __init fore200e_sba_prom_read(struct fore200e *fore200e, struct prom_ | |||
| 820 | const u8 *prop; | 820 | const u8 *prop; |
| 821 | int len; | 821 | int len; |
| 822 | 822 | ||
| 823 | prop = of_get_property(op->node, "madaddrlo2", &len); | 823 | prop = of_get_property(op->dev.of_node, "madaddrlo2", &len); |
| 824 | if (!prop) | 824 | if (!prop) |
| 825 | return -ENODEV; | 825 | return -ENODEV; |
| 826 | memcpy(&prom->mac_addr[4], prop, 4); | 826 | memcpy(&prom->mac_addr[4], prop, 4); |
| 827 | 827 | ||
| 828 | prop = of_get_property(op->node, "madaddrhi4", &len); | 828 | prop = of_get_property(op->dev.of_node, "madaddrhi4", &len); |
| 829 | if (!prop) | 829 | if (!prop) |
| 830 | return -ENODEV; | 830 | return -ENODEV; |
| 831 | memcpy(&prom->mac_addr[2], prop, 4); | 831 | memcpy(&prom->mac_addr[2], prop, 4); |
| 832 | 832 | ||
| 833 | prom->serial_number = of_getintprop_default(op->node, "serialnumber", 0); | 833 | prom->serial_number = of_getintprop_default(op->dev.of_node, |
| 834 | prom->hw_revision = of_getintprop_default(op->node, "promversion", 0); | 834 | "serialnumber", 0); |
| 835 | prom->hw_revision = of_getintprop_default(op->dev.of_node, | ||
| 836 | "promversion", 0); | ||
| 835 | 837 | ||
| 836 | return 0; | 838 | return 0; |
| 837 | } | 839 | } |
| @@ -841,10 +843,10 @@ static int fore200e_sba_proc_read(struct fore200e *fore200e, char *page) | |||
| 841 | struct of_device *op = fore200e->bus_dev; | 843 | struct of_device *op = fore200e->bus_dev; |
| 842 | const struct linux_prom_registers *regs; | 844 | const struct linux_prom_registers *regs; |
| 843 | 845 | ||
| 844 | regs = of_get_property(op->node, "reg", NULL); | 846 | regs = of_get_property(op->dev.of_node, "reg", NULL); |
| 845 | 847 | ||
| 846 | return sprintf(page, " SBUS slot/device:\t\t%d/'%s'\n", | 848 | return sprintf(page, " SBUS slot/device:\t\t%d/'%s'\n", |
| 847 | (regs ? regs->which_io : 0), op->node->name); | 849 | (regs ? regs->which_io : 0), op->dev.of_node->name); |
| 848 | } | 850 | } |
| 849 | #endif /* CONFIG_SBUS */ | 851 | #endif /* CONFIG_SBUS */ |
| 850 | 852 | ||
| @@ -2693,8 +2695,11 @@ static const struct of_device_id fore200e_sba_match[] = { | |||
| 2693 | MODULE_DEVICE_TABLE(of, fore200e_sba_match); | 2695 | MODULE_DEVICE_TABLE(of, fore200e_sba_match); |
| 2694 | 2696 | ||
| 2695 | static struct of_platform_driver fore200e_sba_driver = { | 2697 | static struct of_platform_driver fore200e_sba_driver = { |
| 2696 | .name = "fore_200e", | 2698 | .driver = { |
| 2697 | .match_table = fore200e_sba_match, | 2699 | .name = "fore_200e", |
| 2700 | .owner = THIS_MODULE, | ||
| 2701 | .of_match_table = fore200e_sba_match, | ||
| 2702 | }, | ||
| 2698 | .probe = fore200e_sba_probe, | 2703 | .probe = fore200e_sba_probe, |
| 2699 | .remove = __devexit_p(fore200e_sba_remove), | 2704 | .remove = __devexit_p(fore200e_sba_remove), |
| 2700 | }; | 2705 | }; |
diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c index 59ca2b77b57..52f2d11bc7b 100644 --- a/drivers/block/swim3.c +++ b/drivers/block/swim3.c | |||
| @@ -1004,7 +1004,7 @@ static const struct block_device_operations floppy_fops = { | |||
| 1004 | 1004 | ||
| 1005 | static int swim3_add_device(struct macio_dev *mdev, int index) | 1005 | static int swim3_add_device(struct macio_dev *mdev, int index) |
| 1006 | { | 1006 | { |
| 1007 | struct device_node *swim = mdev->ofdev.node; | 1007 | struct device_node *swim = mdev->ofdev.dev.of_node; |
| 1008 | struct floppy_state *fs = &floppy_states[index]; | 1008 | struct floppy_state *fs = &floppy_states[index]; |
| 1009 | int rc = -EBUSY; | 1009 | int rc = -EBUSY; |
| 1010 | 1010 | ||
diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c index e1c95e208a6..a7b83c0a7eb 100644 --- a/drivers/block/xsysace.c +++ b/drivers/block/xsysace.c | |||
| @@ -1198,10 +1198,10 @@ ace_of_probe(struct of_device *op, const struct of_device_id *match) | |||
| 1198 | dev_dbg(&op->dev, "ace_of_probe(%p, %p)\n", op, match); | 1198 | dev_dbg(&op->dev, "ace_of_probe(%p, %p)\n", op, match); |
| 1199 | 1199 | ||
| 1200 | /* device id */ | 1200 | /* device id */ |
| 1201 | id = of_get_property(op->node, "port-number", NULL); | 1201 | id = of_get_property(op->dev.of_node, "port-number", NULL); |
| 1202 | 1202 | ||
| 1203 | /* physaddr */ | 1203 | /* physaddr */ |
| 1204 | rc = of_address_to_resource(op->node, 0, &res); | 1204 | rc = of_address_to_resource(op->dev.of_node, 0, &res); |
| 1205 | if (rc) { | 1205 | if (rc) { |
| 1206 | dev_err(&op->dev, "invalid address\n"); | 1206 | dev_err(&op->dev, "invalid address\n"); |
| 1207 | return rc; | 1207 | return rc; |
| @@ -1209,11 +1209,11 @@ ace_of_probe(struct of_device *op, const struct of_device_id *match) | |||
| 1209 | physaddr = res.start; | 1209 | physaddr = res.start; |
| 1210 | 1210 | ||
| 1211 | /* irq */ | 1211 | /* irq */ |
| 1212 | irq = irq_of_parse_and_map(op->node, 0); | 1212 | irq = irq_of_parse_and_map(op->dev.of_node, 0); |
| 1213 | 1213 | ||
| 1214 | /* bus width */ | 1214 | /* bus width */ |
| 1215 | bus_width = ACE_BUS_WIDTH_16; | 1215 | bus_width = ACE_BUS_WIDTH_16; |
| 1216 | if (of_find_property(op->node, "8-bit", NULL)) | 1216 | if (of_find_property(op->dev.of_node, "8-bit", NULL)) |
| 1217 | bus_width = ACE_BUS_WIDTH_8; | 1217 | bus_width = ACE_BUS_WIDTH_8; |
| 1218 | 1218 | ||
| 1219 | /* Call the bus-independant setup code */ | 1219 | /* Call the bus-independant setup code */ |
| @@ -1237,13 +1237,12 @@ static const struct of_device_id ace_of_match[] __devinitconst = { | |||
| 1237 | MODULE_DEVICE_TABLE(of, ace_of_match); | 1237 | MODULE_DEVICE_TABLE(of, ace_of_match); |
| 1238 | 1238 | ||
| 1239 | static struct of_platform_driver ace_of_driver = { | 1239 | static struct of_platform_driver ace_of_driver = { |
| 1240 | .owner = THIS_MODULE, | ||
| 1241 | .name = "xsysace", | ||
| 1242 | .match_table = ace_of_match, | ||
| 1243 | .probe = ace_of_probe, | 1240 | .probe = ace_of_probe, |
| 1244 | .remove = __devexit_p(ace_of_remove), | 1241 | .remove = __devexit_p(ace_of_remove), |
| 1245 | .driver = { | 1242 | .driver = { |
| 1246 | .name = "xsysace", | 1243 | .name = "xsysace", |
| 1244 | .owner = THIS_MODULE, | ||
| 1245 | .of_match_table = ace_of_match, | ||
| 1247 | }, | 1246 | }, |
| 1248 | }; | 1247 | }; |
| 1249 | 1248 | ||
diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c index cc435be0bc1..451cd7071b1 100644 --- a/drivers/cdrom/viocd.c +++ b/drivers/cdrom/viocd.c | |||
| @@ -567,7 +567,7 @@ static int viocd_probe(struct vio_dev *vdev, const struct vio_device_id *id) | |||
| 567 | struct disk_info *d; | 567 | struct disk_info *d; |
| 568 | struct cdrom_device_info *c; | 568 | struct cdrom_device_info *c; |
| 569 | struct request_queue *q; | 569 | struct request_queue *q; |
| 570 | struct device_node *node = vdev->dev.archdata.of_node; | 570 | struct device_node *node = vdev->dev.of_node; |
| 571 | 571 | ||
| 572 | deviceno = vdev->unit_address; | 572 | deviceno = vdev->unit_address; |
| 573 | if (deviceno >= VIOCD_MAX_CD) | 573 | if (deviceno >= VIOCD_MAX_CD) |
diff --git a/drivers/char/hw_random/n2-drv.c b/drivers/char/hw_random/n2-drv.c index 10f868eefaa..0f9cbf1aaf1 100644 --- a/drivers/char/hw_random/n2-drv.c +++ b/drivers/char/hw_random/n2-drv.c | |||
| @@ -660,7 +660,7 @@ static int __devinit n2rng_probe(struct of_device *op, | |||
| 660 | np->hvapi_major); | 660 | np->hvapi_major); |
| 661 | goto out_hvapi_unregister; | 661 | goto out_hvapi_unregister; |
| 662 | } | 662 | } |
| 663 | np->num_units = of_getintprop_default(op->node, | 663 | np->num_units = of_getintprop_default(op->dev.of_node, |
| 664 | "rng-#units", 0); | 664 | "rng-#units", 0); |
| 665 | if (!np->num_units) { | 665 | if (!np->num_units) { |
| 666 | dev_err(&op->dev, "VF RNG lacks rng-#units property\n"); | 666 | dev_err(&op->dev, "VF RNG lacks rng-#units property\n"); |
| @@ -751,8 +751,11 @@ static const struct of_device_id n2rng_match[] = { | |||
| 751 | MODULE_DEVICE_TABLE(of, n2rng_match); | 751 | MODULE_DEVICE_TABLE(of, n2rng_match); |
| 752 | 752 | ||
| 753 | static struct of_platform_driver n2rng_driver = { | 753 | static struct of_platform_driver n2rng_driver = { |
| 754 | .name = "n2rng", | 754 | .driver = { |
| 755 | .match_table = n2rng_match, | 755 | .name = "n2rng", |
| 756 | .owner = THIS_MODULE, | ||
| 757 | .of_match_table = n2rng_match, | ||
| 758 | }, | ||
| 756 | .probe = n2rng_probe, | 759 | .probe = n2rng_probe, |
| 757 | .remove = __devexit_p(n2rng_remove), | 760 | .remove = __devexit_p(n2rng_remove), |
| 758 | }; | 761 | }; |
diff --git a/drivers/char/hw_random/pasemi-rng.c b/drivers/char/hw_random/pasemi-rng.c index 7fa61dd1d9d..261ba8f22b8 100644 --- a/drivers/char/hw_random/pasemi-rng.c +++ b/drivers/char/hw_random/pasemi-rng.c | |||
| @@ -98,7 +98,7 @@ static int __devinit rng_probe(struct of_device *ofdev, | |||
| 98 | const struct of_device_id *match) | 98 | const struct of_device_id *match) |
| 99 | { | 99 | { |
| 100 | void __iomem *rng_regs; | 100 | void __iomem *rng_regs; |
| 101 | struct device_node *rng_np = ofdev->node; | 101 | struct device_node *rng_np = ofdev->dev.of_node; |
| 102 | struct resource res; | 102 | struct resource res; |
| 103 | int err = 0; | 103 | int err = 0; |
| 104 | 104 | ||
| @@ -140,8 +140,11 @@ static struct of_device_id rng_match[] = { | |||
| 140 | }; | 140 | }; |
| 141 | 141 | ||
| 142 | static struct of_platform_driver rng_driver = { | 142 | static struct of_platform_driver rng_driver = { |
| 143 | .name = "pasemi-rng", | 143 | .driver = { |
| 144 | .match_table = rng_match, | 144 | .name = "pasemi-rng", |
| 145 | .owner = THIS_MODULE, | ||
| 146 | .of_match_table = rng_match, | ||
| 147 | }, | ||
| 145 | .probe = rng_probe, | 148 | .probe = rng_probe, |
| 146 | .remove = rng_remove, | 149 | .remove = rng_remove, |
| 147 | }; | 150 | }; |
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c index 4462b113ba3..47ffe4a90a9 100644 --- a/drivers/char/ipmi/ipmi_si_intf.c +++ b/drivers/char/ipmi/ipmi_si_intf.c | |||
| @@ -2469,7 +2469,7 @@ static int __devinit ipmi_of_probe(struct of_device *dev, | |||
| 2469 | struct smi_info *info; | 2469 | struct smi_info *info; |
| 2470 | struct resource resource; | 2470 | struct resource resource; |
| 2471 | const int *regsize, *regspacing, *regshift; | 2471 | const int *regsize, *regspacing, *regshift; |
| 2472 | struct device_node *np = dev->node; | 2472 | struct device_node *np = dev->dev.of_node; |
| 2473 | int ret; | 2473 | int ret; |
| 2474 | int proplen; | 2474 | int proplen; |
| 2475 | 2475 | ||
| @@ -2525,7 +2525,7 @@ static int __devinit ipmi_of_probe(struct of_device *dev, | |||
| 2525 | info->io.regspacing = regspacing ? *regspacing : DEFAULT_REGSPACING; | 2525 | info->io.regspacing = regspacing ? *regspacing : DEFAULT_REGSPACING; |
| 2526 | info->io.regshift = regshift ? *regshift : 0; | 2526 | info->io.regshift = regshift ? *regshift : 0; |
| 2527 | 2527 | ||
| 2528 | info->irq = irq_of_parse_and_map(dev->node, 0); | 2528 | info->irq = irq_of_parse_and_map(dev->dev.of_node, 0); |
| 2529 | info->dev = &dev->dev; | 2529 | info->dev = &dev->dev; |
| 2530 | 2530 | ||
| 2531 | dev_dbg(&dev->dev, "addr 0x%lx regsize %d spacing %d irq %x\n", | 2531 | dev_dbg(&dev->dev, "addr 0x%lx regsize %d spacing %d irq %x\n", |
| @@ -2555,8 +2555,11 @@ static struct of_device_id ipmi_match[] = | |||
| 2555 | }; | 2555 | }; |
| 2556 | 2556 | ||
| 2557 | static struct of_platform_driver ipmi_of_platform_driver = { | 2557 | static struct of_platform_driver ipmi_of_platform_driver = { |
| 2558 | .name = "ipmi", | 2558 | .driver = { |
| 2559 | .match_table = ipmi_match, | 2559 | .name = "ipmi", |
| 2560 | .owner = THIS_MODULE, | ||
| 2561 | .of_match_table = ipmi_match, | ||
| 2562 | }, | ||
| 2560 | .probe = ipmi_of_probe, | 2563 | .probe = ipmi_of_probe, |
| 2561 | .remove = __devexit_p(ipmi_of_remove), | 2564 | .remove = __devexit_p(ipmi_of_remove), |
| 2562 | }; | 2565 | }; |
diff --git a/drivers/char/viotape.c b/drivers/char/viotape.c index 1144a04cda6..42f7fa442ff 100644 --- a/drivers/char/viotape.c +++ b/drivers/char/viotape.c | |||
| @@ -866,7 +866,7 @@ static int viotape_probe(struct vio_dev *vdev, const struct vio_device_id *id) | |||
| 866 | { | 866 | { |
| 867 | int i = vdev->unit_address; | 867 | int i = vdev->unit_address; |
| 868 | int j; | 868 | int j; |
| 869 | struct device_node *node = vdev->dev.archdata.of_node; | 869 | struct device_node *node = vdev->dev.of_node; |
| 870 | 870 | ||
| 871 | if (i >= VIOTAPE_MAX_TAPE) | 871 | if (i >= VIOTAPE_MAX_TAPE) |
| 872 | return -ENODEV; | 872 | return -ENODEV; |
diff --git a/drivers/char/xilinx_hwicap/xilinx_hwicap.c b/drivers/char/xilinx_hwicap/xilinx_hwicap.c index 7261b8d9087..ed8a9cec2a0 100644 --- a/drivers/char/xilinx_hwicap/xilinx_hwicap.c +++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.c | |||
| @@ -772,18 +772,18 @@ hwicap_of_probe(struct of_device *op, const struct of_device_id *match) | |||
| 772 | 772 | ||
| 773 | dev_dbg(&op->dev, "hwicap_of_probe(%p, %p)\n", op, match); | 773 | dev_dbg(&op->dev, "hwicap_of_probe(%p, %p)\n", op, match); |
| 774 | 774 | ||
| 775 | rc = of_address_to_resource(op->node, 0, &res); | 775 | rc = of_address_to_resource(op->dev.of_node, 0, &res); |
| 776 | if (rc) { | 776 | if (rc) { |
| 777 | dev_err(&op->dev, "invalid address\n"); | 777 | dev_err(&op->dev, "invalid address\n"); |
| 778 | return rc; | 778 | return rc; |
| 779 | } | 779 | } |
| 780 | 780 | ||
| 781 | id = of_get_property(op->node, "port-number", NULL); | 781 | id = of_get_property(op->dev.of_node, "port-number", NULL); |
| 782 | 782 | ||
| 783 | /* It's most likely that we're using V4, if the family is not | 783 | /* It's most likely that we're using V4, if the family is not |
| 784 | specified */ | 784 | specified */ |
| 785 | regs = &v4_config_registers; | 785 | regs = &v4_config_registers; |
| 786 | family = of_get_property(op->node, "xlnx,family", NULL); | 786 | family = of_get_property(op->dev.of_node, "xlnx,family", NULL); |
| 787 | 787 | ||
| 788 | if (family) { | 788 | if (family) { |
| 789 | if (!strcmp(family, "virtex2p")) { | 789 | if (!strcmp(family, "virtex2p")) { |
| @@ -812,13 +812,12 @@ static const struct of_device_id __devinitconst hwicap_of_match[] = { | |||
| 812 | MODULE_DEVICE_TABLE(of, hwicap_of_match); | 812 | MODULE_DEVICE_TABLE(of, hwicap_of_match); |
| 813 | 813 | ||
| 814 | static struct of_platform_driver hwicap_of_driver = { | 814 | static struct of_platform_driver hwicap_of_driver = { |
| 815 | .owner = THIS_MODULE, | ||
| 816 | .name = DRIVER_NAME, | ||
| 817 | .match_table = hwicap_of_match, | ||
| 818 | .probe = hwicap_of_probe, | 815 | .probe = hwicap_of_probe, |
| 819 | .remove = __devexit_p(hwicap_of_remove), | 816 | .remove = __devexit_p(hwicap_of_remove), |
| 820 | .driver = { | 817 | .driver = { |
| 821 | .name = DRIVER_NAME, | 818 | .name = DRIVER_NAME, |
| 819 | .owner = THIS_MODULE, | ||
| 820 | .of_match_table = hwicap_of_match, | ||
| 822 | }, | 821 | }, |
| 823 | }; | 822 | }; |
| 824 | 823 | ||
diff --git a/drivers/crypto/amcc/crypto4xx_core.c b/drivers/crypto/amcc/crypto4xx_core.c index 6c4c8b7ce3a..9d65b371de6 100644 --- a/drivers/crypto/amcc/crypto4xx_core.c +++ b/drivers/crypto/amcc/crypto4xx_core.c | |||
| @@ -1281,8 +1281,11 @@ static const struct of_device_id crypto4xx_match[] = { | |||
| 1281 | }; | 1281 | }; |
| 1282 | 1282 | ||
| 1283 | static struct of_platform_driver crypto4xx_driver = { | 1283 | static struct of_platform_driver crypto4xx_driver = { |
| 1284 | .name = "crypto4xx", | 1284 | .driver = { |
| 1285 | .match_table = crypto4xx_match, | 1285 | .name = "crypto4xx", |
| 1286 | .owner = THIS_MODULE, | ||
| 1287 | .of_match_table = crypto4xx_match, | ||
| 1288 | }, | ||
| 1286 | .probe = crypto4xx_probe, | 1289 | .probe = crypto4xx_probe, |
| 1287 | .remove = crypto4xx_remove, | 1290 | .remove = crypto4xx_remove, |
| 1288 | }; | 1291 | }; |
diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 6a0f59d1fc5..637c105f53d 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c | |||
| @@ -2398,7 +2398,7 @@ static int talitos_probe(struct of_device *ofdev, | |||
| 2398 | const struct of_device_id *match) | 2398 | const struct of_device_id *match) |
| 2399 | { | 2399 | { |
| 2400 | struct device *dev = &ofdev->dev; | 2400 | struct device *dev = &ofdev->dev; |
| 2401 | struct device_node *np = ofdev->node; | 2401 | struct device_node *np = ofdev->dev.of_node; |
| 2402 | struct talitos_private *priv; | 2402 | struct talitos_private *priv; |
| 2403 | const unsigned int *prop; | 2403 | const unsigned int *prop; |
| 2404 | int i, err; | 2404 | int i, err; |
| @@ -2573,8 +2573,11 @@ static const struct of_device_id talitos_match[] = { | |||
| 2573 | MODULE_DEVICE_TABLE(of, talitos_match); | 2573 | MODULE_DEVICE_TABLE(of, talitos_match); |
| 2574 | 2574 | ||
| 2575 | static struct of_platform_driver talitos_driver = { | 2575 | static struct of_platform_driver talitos_driver = { |
| 2576 | .name = "talitos", | 2576 | .driver = { |
| 2577 | .match_table = talitos_match, | 2577 | .name = "talitos", |
| 2578 | .owner = THIS_MODULE, | ||
| 2579 | .of_match_table = talitos_match, | ||
| 2580 | }, | ||
| 2578 | .probe = talitos_probe, | 2581 | .probe = talitos_probe, |
| 2579 | .remove = talitos_remove, | 2582 | .remove = talitos_remove, |
| 2580 | }; | 2583 | }; |
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index 1fdf180cbd6..8088b14ba5f 100644 --- a/drivers/dma/fsldma.c +++ b/drivers/dma/fsldma.c | |||
| @@ -1315,7 +1315,7 @@ static int __devinit fsldma_of_probe(struct of_device *op, | |||
| 1315 | INIT_LIST_HEAD(&fdev->common.channels); | 1315 | INIT_LIST_HEAD(&fdev->common.channels); |
| 1316 | 1316 | ||
| 1317 | /* ioremap the registers for use */ | 1317 | /* ioremap the registers for use */ |
| 1318 | fdev->regs = of_iomap(op->node, 0); | 1318 | fdev->regs = of_iomap(op->dev.of_node, 0); |
| 1319 | if (!fdev->regs) { | 1319 | if (!fdev->regs) { |
| 1320 | dev_err(&op->dev, "unable to ioremap registers\n"); | 1320 | dev_err(&op->dev, "unable to ioremap registers\n"); |
| 1321 | err = -ENOMEM; | 1321 | err = -ENOMEM; |
| @@ -1323,7 +1323,7 @@ static int __devinit fsldma_of_probe(struct of_device *op, | |||
| 1323 | } | 1323 | } |
| 1324 | 1324 | ||
| 1325 | /* map the channel IRQ if it exists, but don't hookup the handler yet */ | 1325 | /* map the channel IRQ if it exists, but don't hookup the handler yet */ |
| 1326 | fdev->irq = irq_of_parse_and_map(op->node, 0); | 1326 | fdev->irq = irq_of_parse_and_map(op->dev.of_node, 0); |
| 1327 | 1327 | ||
| 1328 | dma_cap_set(DMA_MEMCPY, fdev->common.cap_mask); | 1328 | dma_cap_set(DMA_MEMCPY, fdev->common.cap_mask); |
| 1329 | dma_cap_set(DMA_INTERRUPT, fdev->common.cap_mask); | 1329 | dma_cap_set(DMA_INTERRUPT, fdev->common.cap_mask); |
| @@ -1345,7 +1345,7 @@ static int __devinit fsldma_of_probe(struct of_device *op, | |||
| 1345 | * of_platform_bus_remove(). Instead, we manually instantiate every DMA | 1345 | * of_platform_bus_remove(). Instead, we manually instantiate every DMA |
| 1346 | * channel object. | 1346 | * channel object. |
| 1347 | */ | 1347 | */ |
| 1348 | for_each_child_of_node(op->node, child) { | 1348 | for_each_child_of_node(op->dev.of_node, child) { |
| 1349 | if (of_device_is_compatible(child, "fsl,eloplus-dma-channel")) { | 1349 | if (of_device_is_compatible(child, "fsl,eloplus-dma-channel")) { |
| 1350 | fsl_dma_chan_probe(fdev, child, | 1350 | fsl_dma_chan_probe(fdev, child, |
| 1351 | FSL_DMA_IP_85XX | FSL_DMA_BIG_ENDIAN, | 1351 | FSL_DMA_IP_85XX | FSL_DMA_BIG_ENDIAN, |
| @@ -1411,10 +1411,13 @@ static const struct of_device_id fsldma_of_ids[] = { | |||
| 1411 | }; | 1411 | }; |
| 1412 | 1412 | ||
| 1413 | static struct of_platform_driver fsldma_of_driver = { | 1413 | static struct of_platform_driver fsldma_of_driver = { |
| 1414 | .name = "fsl-elo-dma", | 1414 | .driver = { |
| 1415 | .match_table = fsldma_of_ids, | 1415 | .name = "fsl-elo-dma", |
| 1416 | .probe = fsldma_of_probe, | 1416 | .owner = THIS_MODULE, |
| 1417 | .remove = fsldma_of_remove, | 1417 | .of_match_table = fsldma_of_ids, |
| 1418 | }, | ||
| 1419 | .probe = fsldma_of_probe, | ||
| 1420 | .remove = fsldma_of_remove, | ||
| 1418 | }; | 1421 | }; |
| 1419 | 1422 | ||
| 1420 | /*----------------------------------------------------------------------------*/ | 1423 | /*----------------------------------------------------------------------------*/ |
diff --git a/drivers/dma/ppc4xx/adma.c b/drivers/dma/ppc4xx/adma.c index c6079fcca13..fa98abe4686 100644 --- a/drivers/dma/ppc4xx/adma.c +++ b/drivers/dma/ppc4xx/adma.c | |||
| @@ -4944,12 +4944,12 @@ static const struct of_device_id ppc440spe_adma_of_match[] __devinitconst = { | |||
| 4944 | MODULE_DEVICE_TABLE(of, ppc440spe_adma_of_match); | 4944 | MODULE_DEVICE_TABLE(of, ppc440spe_adma_of_match); |
| 4945 | 4945 | ||
| 4946 | static struct of_platform_driver ppc440spe_adma_driver = { | 4946 | static struct of_platform_driver ppc440spe_adma_driver = { |
| 4947 | .match_table = ppc440spe_adma_of_match, | ||
| 4948 | .probe = ppc440spe_adma_probe, | 4947 | .probe = ppc440spe_adma_probe, |
| 4949 | .remove = __devexit_p(ppc440spe_adma_remove), | 4948 | .remove = __devexit_p(ppc440spe_adma_remove), |
| 4950 | .driver = { | 4949 | .driver = { |
| 4951 | .name = "PPC440SP(E)-ADMA", | 4950 | .name = "PPC440SP(E)-ADMA", |
| 4952 | .owner = THIS_MODULE, | 4951 | .owner = THIS_MODULE, |
| 4952 | .of_match_table = ppc440spe_adma_of_match, | ||
| 4953 | }, | 4953 | }, |
| 4954 | }; | 4954 | }; |
| 4955 | 4955 | ||
diff --git a/drivers/dma/shdma.c b/drivers/dma/shdma.c index a1727522343..a2a519fd2a2 100644 --- a/drivers/dma/shdma.c +++ b/drivers/dma/shdma.c | |||
| @@ -722,6 +722,10 @@ static void sh_dmae_chan_ld_cleanup(struct sh_dmae_chan *sh_chan, bool all) | |||
| 722 | { | 722 | { |
| 723 | while (__ld_cleanup(sh_chan, all)) | 723 | while (__ld_cleanup(sh_chan, all)) |
| 724 | ; | 724 | ; |
| 725 | |||
| 726 | if (all) | ||
| 727 | /* Terminating - forgive uncompleted cookies */ | ||
| 728 | sh_chan->completed_cookie = sh_chan->common.cookie; | ||
| 725 | } | 729 | } |
| 726 | 730 | ||
| 727 | static void sh_chan_xfer_ld_queue(struct sh_dmae_chan *sh_chan) | 731 | static void sh_chan_xfer_ld_queue(struct sh_dmae_chan *sh_chan) |
| @@ -1188,6 +1192,7 @@ static struct platform_driver sh_dmae_driver = { | |||
| 1188 | .remove = __exit_p(sh_dmae_remove), | 1192 | .remove = __exit_p(sh_dmae_remove), |
| 1189 | .shutdown = sh_dmae_shutdown, | 1193 | .shutdown = sh_dmae_shutdown, |
| 1190 | .driver = { | 1194 | .driver = { |
| 1195 | .owner = THIS_MODULE, | ||
| 1191 | .name = "sh-dma-engine", | 1196 | .name = "sh-dma-engine", |
| 1192 | }, | 1197 | }, |
| 1193 | }; | 1198 | }; |
diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c index 4471647b480..6c1886b497f 100644 --- a/drivers/edac/mpc85xx_edac.c +++ b/drivers/edac/mpc85xx_edac.c | |||
| @@ -338,15 +338,13 @@ static struct of_device_id mpc85xx_pci_err_of_match[] = { | |||
| 338 | }; | 338 | }; |
| 339 | 339 | ||
| 340 | static struct of_platform_driver mpc85xx_pci_err_driver = { | 340 | static struct of_platform_driver mpc85xx_pci_err_driver = { |
| 341 | .owner = THIS_MODULE, | ||
| 342 | .name = "mpc85xx_pci_err", | ||
| 343 | .match_table = mpc85xx_pci_err_of_match, | ||
| 344 | .probe = mpc85xx_pci_err_probe, | 341 | .probe = mpc85xx_pci_err_probe, |
| 345 | .remove = __devexit_p(mpc85xx_pci_err_remove), | 342 | .remove = __devexit_p(mpc85xx_pci_err_remove), |
| 346 | .driver = { | 343 | .driver = { |
| 347 | .name = "mpc85xx_pci_err", | 344 | .name = "mpc85xx_pci_err", |
| 348 | .owner = THIS_MODULE, | 345 | .owner = THIS_MODULE, |
| 349 | }, | 346 | .of_match_table = mpc85xx_pci_err_of_match, |
| 347 | }, | ||
| 350 | }; | 348 | }; |
| 351 | 349 | ||
| 352 | #endif /* CONFIG_PCI */ | 350 | #endif /* CONFIG_PCI */ |
| @@ -654,15 +652,13 @@ static struct of_device_id mpc85xx_l2_err_of_match[] = { | |||
| 654 | }; | 652 | }; |
| 655 | 653 | ||
| 656 | static struct of_platform_driver mpc85xx_l2_err_driver = { | 654 | static struct of_platform_driver mpc85xx_l2_err_driver = { |
| 657 | .owner = THIS_MODULE, | ||
| 658 | .name = "mpc85xx_l2_err", | ||
| 659 | .match_table = mpc85xx_l2_err_of_match, | ||
| 660 | .probe = mpc85xx_l2_err_probe, | 655 | .probe = mpc85xx_l2_err_probe, |
| 661 | .remove = mpc85xx_l2_err_remove, | 656 | .remove = mpc85xx_l2_err_remove, |
| 662 | .driver = { | 657 | .driver = { |
| 663 | .name = "mpc85xx_l2_err", | 658 | .name = "mpc85xx_l2_err", |
| 664 | .owner = THIS_MODULE, | 659 | .owner = THIS_MODULE, |
| 665 | }, | 660 | .of_match_table = mpc85xx_l2_err_of_match, |
| 661 | }, | ||
| 666 | }; | 662 | }; |
| 667 | 663 | ||
| 668 | /**************************** MC Err device ***************************/ | 664 | /**************************** MC Err device ***************************/ |
| @@ -1131,15 +1127,13 @@ static struct of_device_id mpc85xx_mc_err_of_match[] = { | |||
| 1131 | }; | 1127 | }; |
| 1132 | 1128 | ||
| 1133 | static struct of_platform_driver mpc85xx_mc_err_driver = { | 1129 | static struct of_platform_driver mpc85xx_mc_err_driver = { |
| 1134 | .owner = THIS_MODULE, | ||
| 1135 | .name = "mpc85xx_mc_err", | ||
| 1136 | .match_table = mpc85xx_mc_err_of_match, | ||
| 1137 | .probe = mpc85xx_mc_err_probe, | 1130 | .probe = mpc85xx_mc_err_probe, |
| 1138 | .remove = mpc85xx_mc_err_remove, | 1131 | .remove = mpc85xx_mc_err_remove, |
| 1139 | .driver = { | 1132 | .driver = { |
| 1140 | .name = "mpc85xx_mc_err", | 1133 | .name = "mpc85xx_mc_err", |
| 1141 | .owner = THIS_MODULE, | 1134 | .owner = THIS_MODULE, |
| 1142 | }, | 1135 | .of_match_table = mpc85xx_mc_err_of_match, |
| 1136 | }, | ||
| 1143 | }; | 1137 | }; |
| 1144 | 1138 | ||
| 1145 | #ifdef CONFIG_MPC85xx | 1139 | #ifdef CONFIG_MPC85xx |
diff --git a/drivers/edac/ppc4xx_edac.c b/drivers/edac/ppc4xx_edac.c index 11f2172aa1e..9d6f6783328 100644 --- a/drivers/edac/ppc4xx_edac.c +++ b/drivers/edac/ppc4xx_edac.c | |||
| @@ -202,13 +202,13 @@ static struct of_device_id ppc4xx_edac_match[] = { | |||
| 202 | }; | 202 | }; |
| 203 | 203 | ||
| 204 | static struct of_platform_driver ppc4xx_edac_driver = { | 204 | static struct of_platform_driver ppc4xx_edac_driver = { |
| 205 | .match_table = ppc4xx_edac_match, | ||
| 206 | .probe = ppc4xx_edac_probe, | 205 | .probe = ppc4xx_edac_probe, |
| 207 | .remove = ppc4xx_edac_remove, | 206 | .remove = ppc4xx_edac_remove, |
| 208 | .driver = { | 207 | .driver = { |
| 209 | .owner = THIS_MODULE, | 208 | .owner = THIS_MODULE, |
| 210 | .name = PPC4XX_EDAC_MODULE_NAME | 209 | .name = PPC4XX_EDAC_MODULE_NAME |
| 211 | } | 210 | .of_match_table = ppc4xx_edac_match, |
| 211 | }, | ||
| 212 | }; | 212 | }; |
| 213 | 213 | ||
| 214 | /* | 214 | /* |
diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c index b827c976dc6..f156ab3bb6e 100644 --- a/drivers/gpio/pca953x.c +++ b/drivers/gpio/pca953x.c | |||
| @@ -449,7 +449,7 @@ pca953x_get_alt_pdata(struct i2c_client *client) | |||
| 449 | struct device_node *node; | 449 | struct device_node *node; |
| 450 | const uint16_t *val; | 450 | const uint16_t *val; |
| 451 | 451 | ||
| 452 | node = dev_archdata_get_node(&client->dev.archdata); | 452 | node = client->dev.of_node; |
| 453 | if (node == NULL) | 453 | if (node == NULL) |
| 454 | return NULL; | 454 | return NULL; |
| 455 | 455 | ||
diff --git a/drivers/hwmon/ultra45_env.c b/drivers/hwmon/ultra45_env.c index 68e90abeba9..5da5942cf97 100644 --- a/drivers/hwmon/ultra45_env.c +++ b/drivers/hwmon/ultra45_env.c | |||
| @@ -300,8 +300,11 @@ static const struct of_device_id env_match[] = { | |||
| 300 | MODULE_DEVICE_TABLE(of, env_match); | 300 | MODULE_DEVICE_TABLE(of, env_match); |
| 301 | 301 | ||
| 302 | static struct of_platform_driver env_driver = { | 302 | static struct of_platform_driver env_driver = { |
| 303 | .name = "ultra45_env", | 303 | .driver = { |
| 304 | .match_table = env_match, | 304 | .name = "ultra45_env", |
| 305 | .owner = THIS_MODULE, | ||
| 306 | .of_match_table = env_match, | ||
| 307 | }, | ||
| 305 | .probe = env_probe, | 308 | .probe = env_probe, |
| 306 | .remove = __devexit_p(env_remove), | 309 | .remove = __devexit_p(env_remove), |
| 307 | }; | 310 | }; |
diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c index 16948db3897..b02b4533651 100644 --- a/drivers/i2c/busses/i2c-cpm.c +++ b/drivers/i2c/busses/i2c-cpm.c | |||
| @@ -440,7 +440,7 @@ static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm) | |||
| 440 | 440 | ||
| 441 | init_waitqueue_head(&cpm->i2c_wait); | 441 | init_waitqueue_head(&cpm->i2c_wait); |
| 442 | 442 | ||
| 443 | cpm->irq = of_irq_to_resource(ofdev->node, 0, NULL); | 443 | cpm->irq = of_irq_to_resource(ofdev->dev.of_node, 0, NULL); |
| 444 | if (!cpm->irq) | 444 | if (!cpm->irq) |
| 445 | return -EINVAL; | 445 | return -EINVAL; |
| 446 | 446 | ||
| @@ -451,13 +451,13 @@ static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm) | |||
| 451 | return ret; | 451 | return ret; |
| 452 | 452 | ||
| 453 | /* I2C parameter RAM */ | 453 | /* I2C parameter RAM */ |
| 454 | i2c_base = of_iomap(ofdev->node, 1); | 454 | i2c_base = of_iomap(ofdev->dev.of_node, 1); |
| 455 | if (i2c_base == NULL) { | 455 | if (i2c_base == NULL) { |
| 456 | ret = -EINVAL; | 456 | ret = -EINVAL; |
| 457 | goto out_irq; | 457 | goto out_irq; |
| 458 | } | 458 | } |
| 459 | 459 | ||
| 460 | if (of_device_is_compatible(ofdev->node, "fsl,cpm1-i2c")) { | 460 | if (of_device_is_compatible(ofdev->dev.of_node, "fsl,cpm1-i2c")) { |
| 461 | 461 | ||
| 462 | /* Check for and use a microcode relocation patch. */ | 462 | /* Check for and use a microcode relocation patch. */ |
| 463 | cpm->i2c_ram = i2c_base; | 463 | cpm->i2c_ram = i2c_base; |
| @@ -474,7 +474,7 @@ static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm) | |||
| 474 | 474 | ||
| 475 | cpm->version = 1; | 475 | cpm->version = 1; |
| 476 | 476 | ||
| 477 | } else if (of_device_is_compatible(ofdev->node, "fsl,cpm2-i2c")) { | 477 | } else if (of_device_is_compatible(ofdev->dev.of_node, "fsl,cpm2-i2c")) { |
| 478 | cpm->i2c_addr = cpm_muram_alloc(sizeof(struct i2c_ram), 64); | 478 | cpm->i2c_addr = cpm_muram_alloc(sizeof(struct i2c_ram), 64); |
| 479 | cpm->i2c_ram = cpm_muram_addr(cpm->i2c_addr); | 479 | cpm->i2c_ram = cpm_muram_addr(cpm->i2c_addr); |
| 480 | out_be16(i2c_base, cpm->i2c_addr); | 480 | out_be16(i2c_base, cpm->i2c_addr); |
| @@ -489,24 +489,24 @@ static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm) | |||
| 489 | } | 489 | } |
| 490 | 490 | ||
| 491 | /* I2C control/status registers */ | 491 | /* I2C control/status registers */ |
| 492 | cpm->i2c_reg = of_iomap(ofdev->node, 0); | 492 | cpm->i2c_reg = of_iomap(ofdev->dev.of_node, 0); |
| 493 | if (cpm->i2c_reg == NULL) { | 493 | if (cpm->i2c_reg == NULL) { |
| 494 | ret = -EINVAL; | 494 | ret = -EINVAL; |
| 495 | goto out_ram; | 495 | goto out_ram; |
| 496 | } | 496 | } |
| 497 | 497 | ||
| 498 | data = of_get_property(ofdev->node, "fsl,cpm-command", &len); | 498 | data = of_get_property(ofdev->dev.of_node, "fsl,cpm-command", &len); |
| 499 | if (!data || len != 4) { | 499 | if (!data || len != 4) { |
| 500 | ret = -EINVAL; | 500 | ret = -EINVAL; |
| 501 | goto out_reg; | 501 | goto out_reg; |
| 502 | } | 502 | } |
| 503 | cpm->cp_command = *data; | 503 | cpm->cp_command = *data; |
| 504 | 504 | ||
| 505 | data = of_get_property(ofdev->node, "linux,i2c-class", &len); | 505 | data = of_get_property(ofdev->dev.of_node, "linux,i2c-class", &len); |
| 506 | if (data && len == 4) | 506 | if (data && len == 4) |
| 507 | cpm->adap.class = *data; | 507 | cpm->adap.class = *data; |
| 508 | 508 | ||
| 509 | data = of_get_property(ofdev->node, "clock-frequency", &len); | 509 | data = of_get_property(ofdev->dev.of_node, "clock-frequency", &len); |
| 510 | if (data && len == 4) | 510 | if (data && len == 4) |
| 511 | cpm->freq = *data; | 511 | cpm->freq = *data; |
| 512 | else | 512 | else |
| @@ -661,7 +661,7 @@ static int __devinit cpm_i2c_probe(struct of_device *ofdev, | |||
| 661 | 661 | ||
| 662 | /* register new adapter to i2c module... */ | 662 | /* register new adapter to i2c module... */ |
| 663 | 663 | ||
| 664 | data = of_get_property(ofdev->node, "linux,i2c-index", &len); | 664 | data = of_get_property(ofdev->dev.of_node, "linux,i2c-index", &len); |
| 665 | if (data && len == 4) { | 665 | if (data && len == 4) { |
| 666 | cpm->adap.nr = *data; | 666 | cpm->adap.nr = *data; |
| 667 | result = i2c_add_numbered_adapter(&cpm->adap); | 667 | result = i2c_add_numbered_adapter(&cpm->adap); |
| @@ -679,7 +679,7 @@ static int __devinit cpm_i2c_probe(struct of_device *ofdev, | |||
| 679 | /* | 679 | /* |
| 680 | * register OF I2C devices | 680 | * register OF I2C devices |
| 681 | */ | 681 | */ |
| 682 | of_register_i2c_devices(&cpm->adap, ofdev->node); | 682 | of_register_i2c_devices(&cpm->adap, ofdev->dev.of_node); |
| 683 | 683 | ||
| 684 | return 0; | 684 | return 0; |
| 685 | out_shut: | 685 | out_shut: |
| @@ -718,13 +718,13 @@ static const struct of_device_id cpm_i2c_match[] = { | |||
| 718 | MODULE_DEVICE_TABLE(of, cpm_i2c_match); | 718 | MODULE_DEVICE_TABLE(of, cpm_i2c_match); |
| 719 | 719 | ||
| 720 | static struct of_platform_driver cpm_i2c_driver = { | 720 | static struct of_platform_driver cpm_i2c_driver = { |
| 721 | .match_table = cpm_i2c_match, | ||
| 722 | .probe = cpm_i2c_probe, | 721 | .probe = cpm_i2c_probe, |
| 723 | .remove = __devexit_p(cpm_i2c_remove), | 722 | .remove = __devexit_p(cpm_i2c_remove), |
| 724 | .driver = { | 723 | .driver = { |
| 725 | .name = "fsl-i2c-cpm", | 724 | .name = "fsl-i2c-cpm", |
| 726 | .owner = THIS_MODULE, | 725 | .owner = THIS_MODULE, |
| 727 | } | 726 | .of_match_table = cpm_i2c_match, |
| 727 | }, | ||
| 728 | }; | 728 | }; |
| 729 | 729 | ||
| 730 | static int __init cpm_i2c_init(void) | 730 | static int __init cpm_i2c_init(void) |
diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c index f8ccc0fe95a..bf344135647 100644 --- a/drivers/i2c/busses/i2c-ibm_iic.c +++ b/drivers/i2c/busses/i2c-ibm_iic.c | |||
| @@ -664,7 +664,7 @@ static inline u8 iic_clckdiv(unsigned int opb) | |||
| 664 | static int __devinit iic_request_irq(struct of_device *ofdev, | 664 | static int __devinit iic_request_irq(struct of_device *ofdev, |
| 665 | struct ibm_iic_private *dev) | 665 | struct ibm_iic_private *dev) |
| 666 | { | 666 | { |
| 667 | struct device_node *np = ofdev->node; | 667 | struct device_node *np = ofdev->dev.of_node; |
| 668 | int irq; | 668 | int irq; |
| 669 | 669 | ||
| 670 | if (iic_force_poll) | 670 | if (iic_force_poll) |
| @@ -695,7 +695,7 @@ static int __devinit iic_request_irq(struct of_device *ofdev, | |||
| 695 | static int __devinit iic_probe(struct of_device *ofdev, | 695 | static int __devinit iic_probe(struct of_device *ofdev, |
| 696 | const struct of_device_id *match) | 696 | const struct of_device_id *match) |
| 697 | { | 697 | { |
| 698 | struct device_node *np = ofdev->node; | 698 | struct device_node *np = ofdev->dev.of_node; |
| 699 | struct ibm_iic_private *dev; | 699 | struct ibm_iic_private *dev; |
| 700 | struct i2c_adapter *adap; | 700 | struct i2c_adapter *adap; |
| 701 | const u32 *freq; | 701 | const u32 *freq; |
| @@ -807,8 +807,11 @@ static const struct of_device_id ibm_iic_match[] = { | |||
| 807 | }; | 807 | }; |
| 808 | 808 | ||
| 809 | static struct of_platform_driver ibm_iic_driver = { | 809 | static struct of_platform_driver ibm_iic_driver = { |
| 810 | .name = "ibm-iic", | 810 | .driver = { |
| 811 | .match_table = ibm_iic_match, | 811 | .name = "ibm-iic", |
| 812 | .owner = THIS_MODULE, | ||
| 813 | .of_match_table = ibm_iic_match, | ||
| 814 | }, | ||
| 812 | .probe = iic_probe, | 815 | .probe = iic_probe, |
| 813 | .remove = __devexit_p(iic_remove), | 816 | .remove = __devexit_p(iic_remove), |
| 814 | }; | 817 | }; |
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c index e86cef300c7..df00eb1f11f 100644 --- a/drivers/i2c/busses/i2c-mpc.c +++ b/drivers/i2c/busses/i2c-mpc.c | |||
| @@ -560,14 +560,14 @@ static int __devinit fsl_i2c_probe(struct of_device *op, | |||
| 560 | 560 | ||
| 561 | init_waitqueue_head(&i2c->queue); | 561 | init_waitqueue_head(&i2c->queue); |
| 562 | 562 | ||
| 563 | i2c->base = of_iomap(op->node, 0); | 563 | i2c->base = of_iomap(op->dev.of_node, 0); |
| 564 | if (!i2c->base) { | 564 | if (!i2c->base) { |
| 565 | dev_err(i2c->dev, "failed to map controller\n"); | 565 | dev_err(i2c->dev, "failed to map controller\n"); |
| 566 | result = -ENOMEM; | 566 | result = -ENOMEM; |
| 567 | goto fail_map; | 567 | goto fail_map; |
| 568 | } | 568 | } |
| 569 | 569 | ||
| 570 | i2c->irq = irq_of_parse_and_map(op->node, 0); | 570 | i2c->irq = irq_of_parse_and_map(op->dev.of_node, 0); |
| 571 | if (i2c->irq) { /* no i2c->irq implies polling */ | 571 | if (i2c->irq) { /* no i2c->irq implies polling */ |
| 572 | result = request_irq(i2c->irq, mpc_i2c_isr, | 572 | result = request_irq(i2c->irq, mpc_i2c_isr, |
| 573 | IRQF_SHARED, "i2c-mpc", i2c); | 573 | IRQF_SHARED, "i2c-mpc", i2c); |
| @@ -577,21 +577,22 @@ static int __devinit fsl_i2c_probe(struct of_device *op, | |||
| 577 | } | 577 | } |
| 578 | } | 578 | } |
| 579 | 579 | ||
| 580 | if (of_get_property(op->node, "fsl,preserve-clocking", NULL)) { | 580 | if (of_get_property(op->dev.of_node, "fsl,preserve-clocking", NULL)) { |
| 581 | clock = MPC_I2C_CLOCK_PRESERVE; | 581 | clock = MPC_I2C_CLOCK_PRESERVE; |
| 582 | } else { | 582 | } else { |
| 583 | prop = of_get_property(op->node, "clock-frequency", &plen); | 583 | prop = of_get_property(op->dev.of_node, "clock-frequency", |
| 584 | &plen); | ||
| 584 | if (prop && plen == sizeof(u32)) | 585 | if (prop && plen == sizeof(u32)) |
| 585 | clock = *prop; | 586 | clock = *prop; |
| 586 | } | 587 | } |
| 587 | 588 | ||
| 588 | if (match->data) { | 589 | if (match->data) { |
| 589 | struct mpc_i2c_data *data = match->data; | 590 | struct mpc_i2c_data *data = match->data; |
| 590 | data->setup(op->node, i2c, clock, data->prescaler); | 591 | data->setup(op->dev.of_node, i2c, clock, data->prescaler); |
| 591 | } else { | 592 | } else { |
| 592 | /* Backwards compatibility */ | 593 | /* Backwards compatibility */ |
| 593 | if (of_get_property(op->node, "dfsrr", NULL)) | 594 | if (of_get_property(op->dev.of_node, "dfsrr", NULL)) |
| 594 | mpc_i2c_setup_8xxx(op->node, i2c, clock, 0); | 595 | mpc_i2c_setup_8xxx(op->dev.of_node, i2c, clock, 0); |
| 595 | } | 596 | } |
| 596 | 597 | ||
| 597 | dev_set_drvdata(&op->dev, i2c); | 598 | dev_set_drvdata(&op->dev, i2c); |
| @@ -605,7 +606,7 @@ static int __devinit fsl_i2c_probe(struct of_device *op, | |||
| 605 | dev_err(i2c->dev, "failed to add adapter\n"); | 606 | dev_err(i2c->dev, "failed to add adapter\n"); |
| 606 | goto fail_add; | 607 | goto fail_add; |
| 607 | } | 608 | } |
| 608 | of_register_i2c_devices(&i2c->adap, op->node); | 609 | of_register_i2c_devices(&i2c->adap, op->dev.of_node); |
| 609 | 610 | ||
| 610 | return result; | 611 | return result; |
| 611 | 612 | ||
| @@ -674,12 +675,12 @@ MODULE_DEVICE_TABLE(of, mpc_i2c_of_match); | |||
| 674 | 675 | ||
| 675 | /* Structure for a device driver */ | 676 | /* Structure for a device driver */ |
| 676 | static struct of_platform_driver mpc_i2c_driver = { | 677 | static struct of_platform_driver mpc_i2c_driver = { |
| 677 | .match_table = mpc_i2c_of_match, | ||
| 678 | .probe = fsl_i2c_probe, | 678 | .probe = fsl_i2c_probe, |
| 679 | .remove = __devexit_p(fsl_i2c_remove), | 679 | .remove = __devexit_p(fsl_i2c_remove), |
| 680 | .driver = { | 680 | .driver = { |
| 681 | .owner = THIS_MODULE, | 681 | .owner = THIS_MODULE, |
| 682 | .name = DRV_NAME, | 682 | .name = DRV_NAME, |
| 683 | .of_match_table = mpc_i2c_of_match, | ||
| 683 | }, | 684 | }, |
| 684 | }; | 685 | }; |
| 685 | 686 | ||
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c index db3c9f3a764..e0f833cca3f 100644 --- a/drivers/i2c/i2c-core.c +++ b/drivers/i2c/i2c-core.c | |||
| @@ -418,6 +418,9 @@ i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info) | |||
| 418 | client->dev.parent = &client->adapter->dev; | 418 | client->dev.parent = &client->adapter->dev; |
| 419 | client->dev.bus = &i2c_bus_type; | 419 | client->dev.bus = &i2c_bus_type; |
| 420 | client->dev.type = &i2c_client_type; | 420 | client->dev.type = &i2c_client_type; |
| 421 | #ifdef CONFIG_OF | ||
| 422 | client->dev.of_node = info->of_node; | ||
| 423 | #endif | ||
| 421 | 424 | ||
| 422 | dev_set_name(&client->dev, "%d-%04x", i2c_adapter_id(adap), | 425 | dev_set_name(&client->dev, "%d-%04x", i2c_adapter_id(adap), |
| 423 | client->addr); | 426 | client->addr); |
diff --git a/drivers/ide/pmac.c b/drivers/ide/pmac.c index 159955d16c4..183fa38760d 100644 --- a/drivers/ide/pmac.c +++ b/drivers/ide/pmac.c | |||
| @@ -1153,7 +1153,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match) | |||
| 1153 | 1153 | ||
| 1154 | if (macio_resource_count(mdev) == 0) { | 1154 | if (macio_resource_count(mdev) == 0) { |
| 1155 | printk(KERN_WARNING "ide-pmac: no address for %s\n", | 1155 | printk(KERN_WARNING "ide-pmac: no address for %s\n", |
| 1156 | mdev->ofdev.node->full_name); | 1156 | mdev->ofdev.dev.of_node->full_name); |
| 1157 | rc = -ENXIO; | 1157 | rc = -ENXIO; |
| 1158 | goto out_free_pmif; | 1158 | goto out_free_pmif; |
| 1159 | } | 1159 | } |
| @@ -1161,7 +1161,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match) | |||
| 1161 | /* Request memory resource for IO ports */ | 1161 | /* Request memory resource for IO ports */ |
| 1162 | if (macio_request_resource(mdev, 0, "ide-pmac (ports)")) { | 1162 | if (macio_request_resource(mdev, 0, "ide-pmac (ports)")) { |
| 1163 | printk(KERN_ERR "ide-pmac: can't request MMIO resource for " | 1163 | printk(KERN_ERR "ide-pmac: can't request MMIO resource for " |
| 1164 | "%s!\n", mdev->ofdev.node->full_name); | 1164 | "%s!\n", mdev->ofdev.dev.of_node->full_name); |
| 1165 | rc = -EBUSY; | 1165 | rc = -EBUSY; |
| 1166 | goto out_free_pmif; | 1166 | goto out_free_pmif; |
| 1167 | } | 1167 | } |
| @@ -1173,7 +1173,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match) | |||
| 1173 | */ | 1173 | */ |
| 1174 | if (macio_irq_count(mdev) == 0) { | 1174 | if (macio_irq_count(mdev) == 0) { |
| 1175 | printk(KERN_WARNING "ide-pmac: no intrs for device %s, using " | 1175 | printk(KERN_WARNING "ide-pmac: no intrs for device %s, using " |
| 1176 | "13\n", mdev->ofdev.node->full_name); | 1176 | "13\n", mdev->ofdev.dev.of_node->full_name); |
| 1177 | irq = irq_create_mapping(NULL, 13); | 1177 | irq = irq_create_mapping(NULL, 13); |
| 1178 | } else | 1178 | } else |
| 1179 | irq = macio_irq(mdev, 0); | 1179 | irq = macio_irq(mdev, 0); |
| @@ -1182,7 +1182,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match) | |||
| 1182 | regbase = (unsigned long) base; | 1182 | regbase = (unsigned long) base; |
| 1183 | 1183 | ||
| 1184 | pmif->mdev = mdev; | 1184 | pmif->mdev = mdev; |
| 1185 | pmif->node = mdev->ofdev.node; | 1185 | pmif->node = mdev->ofdev.dev.of_node; |
| 1186 | pmif->regbase = regbase; | 1186 | pmif->regbase = regbase; |
| 1187 | pmif->irq = irq; | 1187 | pmif->irq = irq; |
| 1188 | pmif->kauai_fcr = NULL; | 1188 | pmif->kauai_fcr = NULL; |
| @@ -1191,7 +1191,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match) | |||
| 1191 | if (macio_request_resource(mdev, 1, "ide-pmac (dma)")) | 1191 | if (macio_request_resource(mdev, 1, "ide-pmac (dma)")) |
| 1192 | printk(KERN_WARNING "ide-pmac: can't request DMA " | 1192 | printk(KERN_WARNING "ide-pmac: can't request DMA " |
| 1193 | "resource for %s!\n", | 1193 | "resource for %s!\n", |
| 1194 | mdev->ofdev.node->full_name); | 1194 | mdev->ofdev.dev.of_node->full_name); |
| 1195 | else | 1195 | else |
| 1196 | pmif->dma_regs = ioremap(macio_resource_start(mdev, 1), 0x1000); | 1196 | pmif->dma_regs = ioremap(macio_resource_start(mdev, 1), 0x1000); |
| 1197 | } else | 1197 | } else |
diff --git a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c index 129a6bebd6e..252489e8836 100644 --- a/drivers/infiniband/hw/ehca/ehca_main.c +++ b/drivers/infiniband/hw/ehca/ehca_main.c | |||
| @@ -291,8 +291,9 @@ static int ehca_sense_attributes(struct ehca_shca *shca) | |||
| 291 | }; | 291 | }; |
| 292 | 292 | ||
| 293 | ehca_gen_dbg("Probing adapter %s...", | 293 | ehca_gen_dbg("Probing adapter %s...", |
| 294 | shca->ofdev->node->full_name); | 294 | shca->ofdev->dev.of_node->full_name); |
| 295 | loc_code = of_get_property(shca->ofdev->node, "ibm,loc-code", NULL); | 295 | loc_code = of_get_property(shca->ofdev->dev.of_node, "ibm,loc-code", |
| 296 | NULL); | ||
| 296 | if (loc_code) | 297 | if (loc_code) |
| 297 | ehca_gen_dbg(" ... location lode=%s", loc_code); | 298 | ehca_gen_dbg(" ... location lode=%s", loc_code); |
| 298 | 299 | ||
| @@ -720,16 +721,16 @@ static int __devinit ehca_probe(struct of_device *dev, | |||
| 720 | int ret, i, eq_size; | 721 | int ret, i, eq_size; |
| 721 | unsigned long flags; | 722 | unsigned long flags; |
| 722 | 723 | ||
| 723 | handle = of_get_property(dev->node, "ibm,hca-handle", NULL); | 724 | handle = of_get_property(dev->dev.of_node, "ibm,hca-handle", NULL); |
| 724 | if (!handle) { | 725 | if (!handle) { |
| 725 | ehca_gen_err("Cannot get eHCA handle for adapter: %s.", | 726 | ehca_gen_err("Cannot get eHCA handle for adapter: %s.", |
| 726 | dev->node->full_name); | 727 | dev->dev.of_node->full_name); |
| 727 | return -ENODEV; | 728 | return -ENODEV; |
| 728 | } | 729 | } |
| 729 | 730 | ||
| 730 | if (!(*handle)) { | 731 | if (!(*handle)) { |
| 731 | ehca_gen_err("Wrong eHCA handle for adapter: %s.", | 732 | ehca_gen_err("Wrong eHCA handle for adapter: %s.", |
| 732 | dev->node->full_name); | 733 | dev->dev.of_node->full_name); |
| 733 | return -ENODEV; | 734 | return -ENODEV; |
| 734 | } | 735 | } |
| 735 | 736 | ||
| @@ -936,12 +937,13 @@ static struct of_device_id ehca_device_table[] = | |||
| 936 | MODULE_DEVICE_TABLE(of, ehca_device_table); | 937 | MODULE_DEVICE_TABLE(of, ehca_device_table); |
| 937 | 938 | ||
| 938 | static struct of_platform_driver ehca_driver = { | 939 | static struct of_platform_driver ehca_driver = { |
| 939 | .name = "ehca", | ||
| 940 | .match_table = ehca_device_table, | ||
| 941 | .probe = ehca_probe, | 940 | .probe = ehca_probe, |
| 942 | .remove = ehca_remove, | 941 | .remove = ehca_remove, |
| 943 | .driver = { | 942 | .driver = { |
| 943 | .name = "ehca", | ||
| 944 | .owner = THIS_MODULE, | ||
| 944 | .groups = ehca_drv_attr_groups, | 945 | .groups = ehca_drv_attr_groups, |
| 946 | .of_match_table = ehca_device_table, | ||
| 945 | }, | 947 | }, |
| 946 | }; | 948 | }; |
| 947 | 949 | ||
diff --git a/drivers/input/misc/sparcspkr.c b/drivers/input/misc/sparcspkr.c index 0d45422f809..1dacae4b43f 100644 --- a/drivers/input/misc/sparcspkr.c +++ b/drivers/input/misc/sparcspkr.c | |||
| @@ -259,8 +259,11 @@ static const struct of_device_id bbc_beep_match[] = { | |||
| 259 | }; | 259 | }; |
| 260 | 260 | ||
| 261 | static struct of_platform_driver bbc_beep_driver = { | 261 | static struct of_platform_driver bbc_beep_driver = { |
| 262 | .name = "bbcbeep", | 262 | .driver = { |
| 263 | .match_table = bbc_beep_match, | 263 | .name = "bbcbeep", |
| 264 | .owner = THIS_MODULE, | ||
| 265 | .of_match_table = bbc_beep_match, | ||
| 266 | }, | ||
| 264 | .probe = bbc_beep_probe, | 267 | .probe = bbc_beep_probe, |
| 265 | .remove = __devexit_p(bbc_remove), | 268 | .remove = __devexit_p(bbc_remove), |
| 266 | .shutdown = sparcspkr_shutdown, | 269 | .shutdown = sparcspkr_shutdown, |
| @@ -338,8 +341,11 @@ static const struct of_device_id grover_beep_match[] = { | |||
| 338 | }; | 341 | }; |
| 339 | 342 | ||
| 340 | static struct of_platform_driver grover_beep_driver = { | 343 | static struct of_platform_driver grover_beep_driver = { |
| 341 | .name = "groverbeep", | 344 | .driver = { |
| 342 | .match_table = grover_beep_match, | 345 | .name = "groverbeep", |
| 346 | .owner = THIS_MODULE, | ||
| 347 | .of_match_table = grover_beep_match, | ||
| 348 | }, | ||
| 343 | .probe = grover_beep_probe, | 349 | .probe = grover_beep_probe, |
| 344 | .remove = __devexit_p(grover_remove), | 350 | .remove = __devexit_p(grover_remove), |
| 345 | .shutdown = sparcspkr_shutdown, | 351 | .shutdown = sparcspkr_shutdown, |
diff --git a/drivers/input/serio/i8042-sparcio.h b/drivers/input/serio/i8042-sparcio.h index 5071af2c060..04e32f2d124 100644 --- a/drivers/input/serio/i8042-sparcio.h +++ b/drivers/input/serio/i8042-sparcio.h | |||
| @@ -51,7 +51,7 @@ static inline void i8042_write_command(int val) | |||
| 51 | 51 | ||
| 52 | static int __devinit sparc_i8042_probe(struct of_device *op, const struct of_device_id *match) | 52 | static int __devinit sparc_i8042_probe(struct of_device *op, const struct of_device_id *match) |
| 53 | { | 53 | { |
| 54 | struct device_node *dp = op->node; | 54 | struct device_node *dp = op->dev.of_node; |
| 55 | 55 | ||
| 56 | dp = dp->child; | 56 | dp = dp->child; |
| 57 | while (dp) { | 57 | while (dp) { |
| @@ -96,8 +96,11 @@ static const struct of_device_id sparc_i8042_match[] = { | |||
| 96 | MODULE_DEVICE_TABLE(of, sparc_i8042_match); | 96 | MODULE_DEVICE_TABLE(of, sparc_i8042_match); |
| 97 | 97 | ||
| 98 | static struct of_platform_driver sparc_i8042_driver = { | 98 | static struct of_platform_driver sparc_i8042_driver = { |
| 99 | .name = "i8042", | 99 | .driver = { |
| 100 | .match_table = sparc_i8042_match, | 100 | .name = "i8042", |
| 101 | .owner = THIS_MODULE, | ||
| 102 | .of_match_table = sparc_i8042_match, | ||
| 103 | }, | ||
| 101 | .probe = sparc_i8042_probe, | 104 | .probe = sparc_i8042_probe, |
| 102 | .remove = __devexit_p(sparc_i8042_remove), | 105 | .remove = __devexit_p(sparc_i8042_remove), |
| 103 | }; | 106 | }; |
diff --git a/drivers/input/serio/xilinx_ps2.c b/drivers/input/serio/xilinx_ps2.c index f84f8e32e3f..e2c028d2638 100644 --- a/drivers/input/serio/xilinx_ps2.c +++ b/drivers/input/serio/xilinx_ps2.c | |||
| @@ -244,17 +244,17 @@ static int __devinit xps2_of_probe(struct of_device *ofdev, | |||
| 244 | int error; | 244 | int error; |
| 245 | 245 | ||
| 246 | dev_info(dev, "Device Tree Probing \'%s\'\n", | 246 | dev_info(dev, "Device Tree Probing \'%s\'\n", |
| 247 | ofdev->node->name); | 247 | ofdev->dev.of_node->name); |
| 248 | 248 | ||
| 249 | /* Get iospace for the device */ | 249 | /* Get iospace for the device */ |
| 250 | error = of_address_to_resource(ofdev->node, 0, &r_mem); | 250 | error = of_address_to_resource(ofdev->dev.of_node, 0, &r_mem); |
| 251 | if (error) { | 251 | if (error) { |
| 252 | dev_err(dev, "invalid address\n"); | 252 | dev_err(dev, "invalid address\n"); |
| 253 | return error; | 253 | return error; |
| 254 | } | 254 | } |
| 255 | 255 | ||
| 256 | /* Get IRQ for the device */ | 256 | /* Get IRQ for the device */ |
| 257 | if (of_irq_to_resource(ofdev->node, 0, &r_irq) == NO_IRQ) { | 257 | if (of_irq_to_resource(ofdev->dev.of_node, 0, &r_irq) == NO_IRQ) { |
| 258 | dev_err(dev, "no IRQ found\n"); | 258 | dev_err(dev, "no IRQ found\n"); |
| 259 | return -ENODEV; | 259 | return -ENODEV; |
| 260 | } | 260 | } |
| @@ -342,7 +342,7 @@ static int __devexit xps2_of_remove(struct of_device *of_dev) | |||
| 342 | iounmap(drvdata->base_address); | 342 | iounmap(drvdata->base_address); |
| 343 | 343 | ||
| 344 | /* Get iospace of the device */ | 344 | /* Get iospace of the device */ |
| 345 | if (of_address_to_resource(of_dev->node, 0, &r_mem)) | 345 | if (of_address_to_resource(of_dev->dev.of_node, 0, &r_mem)) |
| 346 | dev_err(dev, "invalid address\n"); | 346 | dev_err(dev, "invalid address\n"); |
| 347 | else | 347 | else |
| 348 | release_mem_region(r_mem.start, resource_size(&r_mem)); | 348 | release_mem_region(r_mem.start, resource_size(&r_mem)); |
| @@ -362,8 +362,11 @@ static const struct of_device_id xps2_of_match[] __devinitconst = { | |||
| 362 | MODULE_DEVICE_TABLE(of, xps2_of_match); | 362 | MODULE_DEVICE_TABLE(of, xps2_of_match); |
| 363 | 363 | ||
| 364 | static struct of_platform_driver xps2_of_driver = { | 364 | static struct of_platform_driver xps2_of_driver = { |
| 365 | .name = DRIVER_NAME, | 365 | .driver = { |
| 366 | .match_table = xps2_of_match, | 366 | .name = DRIVER_NAME, |
| 367 | .owner = THIS_MODULE, | ||
| 368 | .of_match_table = xps2_of_match, | ||
| 369 | }, | ||
| 367 | .probe = xps2_of_probe, | 370 | .probe = xps2_of_probe, |
| 368 | .remove = __devexit_p(xps2_of_remove), | 371 | .remove = __devexit_p(xps2_of_remove), |
| 369 | }; | 372 | }; |
diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c index c6e4b772b75..6d94b0b9979 100644 --- a/drivers/leds/leds-gpio.c +++ b/drivers/leds/leds-gpio.c | |||
| @@ -211,7 +211,7 @@ struct gpio_led_of_platform_data { | |||
| 211 | static int __devinit of_gpio_leds_probe(struct of_device *ofdev, | 211 | static int __devinit of_gpio_leds_probe(struct of_device *ofdev, |
| 212 | const struct of_device_id *match) | 212 | const struct of_device_id *match) |
| 213 | { | 213 | { |
| 214 | struct device_node *np = ofdev->node, *child; | 214 | struct device_node *np = ofdev->dev.of_node, *child; |
| 215 | struct gpio_led_of_platform_data *pdata; | 215 | struct gpio_led_of_platform_data *pdata; |
| 216 | int count = 0, ret; | 216 | int count = 0, ret; |
| 217 | 217 | ||
| @@ -291,8 +291,8 @@ static struct of_platform_driver of_gpio_leds_driver = { | |||
| 291 | .driver = { | 291 | .driver = { |
| 292 | .name = "of_gpio_leds", | 292 | .name = "of_gpio_leds", |
| 293 | .owner = THIS_MODULE, | 293 | .owner = THIS_MODULE, |
| 294 | .of_match_table = of_gpio_leds_match, | ||
| 294 | }, | 295 | }, |
| 295 | .match_table = of_gpio_leds_match, | ||
| 296 | .probe = of_gpio_leds_probe, | 296 | .probe = of_gpio_leds_probe, |
| 297 | .remove = __devexit_p(of_gpio_leds_remove), | 297 | .remove = __devexit_p(of_gpio_leds_remove), |
| 298 | }; | 298 | }; |
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c index 26a303a1d1a..97147804a49 100644 --- a/drivers/macintosh/macio_asic.c +++ b/drivers/macintosh/macio_asic.c | |||
| @@ -39,14 +39,12 @@ static struct macio_chip *macio_on_hold; | |||
| 39 | 39 | ||
| 40 | static int macio_bus_match(struct device *dev, struct device_driver *drv) | 40 | static int macio_bus_match(struct device *dev, struct device_driver *drv) |
| 41 | { | 41 | { |
| 42 | struct macio_dev * macio_dev = to_macio_device(dev); | 42 | const struct of_device_id * matches = drv->of_match_table; |
| 43 | struct macio_driver * macio_drv = to_macio_driver(drv); | ||
| 44 | const struct of_device_id * matches = macio_drv->match_table; | ||
| 45 | 43 | ||
| 46 | if (!matches) | 44 | if (!matches) |
| 47 | return 0; | 45 | return 0; |
| 48 | 46 | ||
| 49 | return of_match_device(matches, &macio_dev->ofdev) != NULL; | 47 | return of_match_device(matches, dev) != NULL; |
| 50 | } | 48 | } |
| 51 | 49 | ||
| 52 | struct macio_dev *macio_dev_get(struct macio_dev *dev) | 50 | struct macio_dev *macio_dev_get(struct macio_dev *dev) |
| @@ -84,7 +82,7 @@ static int macio_device_probe(struct device *dev) | |||
| 84 | 82 | ||
| 85 | macio_dev_get(macio_dev); | 83 | macio_dev_get(macio_dev); |
| 86 | 84 | ||
| 87 | match = of_match_device(drv->match_table, &macio_dev->ofdev); | 85 | match = of_match_device(drv->driver.of_match_table, dev); |
| 88 | if (match) | 86 | if (match) |
| 89 | error = drv->probe(macio_dev, match); | 87 | error = drv->probe(macio_dev, match); |
| 90 | if (error) | 88 | if (error) |
| @@ -248,7 +246,7 @@ static void macio_create_fixup_irq(struct macio_dev *dev, int index, | |||
| 248 | 246 | ||
| 249 | static void macio_add_missing_resources(struct macio_dev *dev) | 247 | static void macio_add_missing_resources(struct macio_dev *dev) |
| 250 | { | 248 | { |
| 251 | struct device_node *np = dev->ofdev.node; | 249 | struct device_node *np = dev->ofdev.dev.of_node; |
| 252 | unsigned int irq_base; | 250 | unsigned int irq_base; |
| 253 | 251 | ||
| 254 | /* Gatwick has some missing interrupts on child nodes */ | 252 | /* Gatwick has some missing interrupts on child nodes */ |
| @@ -289,7 +287,7 @@ static void macio_add_missing_resources(struct macio_dev *dev) | |||
| 289 | 287 | ||
| 290 | static void macio_setup_interrupts(struct macio_dev *dev) | 288 | static void macio_setup_interrupts(struct macio_dev *dev) |
| 291 | { | 289 | { |
| 292 | struct device_node *np = dev->ofdev.node; | 290 | struct device_node *np = dev->ofdev.dev.of_node; |
| 293 | unsigned int irq; | 291 | unsigned int irq; |
| 294 | int i = 0, j = 0; | 292 | int i = 0, j = 0; |
| 295 | 293 | ||
| @@ -317,7 +315,7 @@ static void macio_setup_interrupts(struct macio_dev *dev) | |||
| 317 | static void macio_setup_resources(struct macio_dev *dev, | 315 | static void macio_setup_resources(struct macio_dev *dev, |
| 318 | struct resource *parent_res) | 316 | struct resource *parent_res) |
| 319 | { | 317 | { |
| 320 | struct device_node *np = dev->ofdev.node; | 318 | struct device_node *np = dev->ofdev.dev.of_node; |
| 321 | struct resource r; | 319 | struct resource r; |
| 322 | int index; | 320 | int index; |
| 323 | 321 | ||
| @@ -373,9 +371,9 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip, | |||
| 373 | 371 | ||
| 374 | dev->bus = &chip->lbus; | 372 | dev->bus = &chip->lbus; |
| 375 | dev->media_bay = in_bay; | 373 | dev->media_bay = in_bay; |
| 376 | dev->ofdev.node = np; | 374 | dev->ofdev.dev.of_node = np; |
| 377 | dev->ofdev.dma_mask = 0xffffffffUL; | 375 | dev->ofdev.archdata.dma_mask = 0xffffffffUL; |
| 378 | dev->ofdev.dev.dma_mask = &dev->ofdev.dma_mask; | 376 | dev->ofdev.dev.dma_mask = &dev->ofdev.archdata.dma_mask; |
| 379 | dev->ofdev.dev.parent = parent; | 377 | dev->ofdev.dev.parent = parent; |
| 380 | dev->ofdev.dev.bus = &macio_bus_type; | 378 | dev->ofdev.dev.bus = &macio_bus_type; |
| 381 | dev->ofdev.dev.release = macio_release_dev; | 379 | dev->ofdev.dev.release = macio_release_dev; |
| @@ -494,9 +492,9 @@ static void macio_pci_add_devices(struct macio_chip *chip) | |||
| 494 | } | 492 | } |
| 495 | 493 | ||
| 496 | /* Add media bay devices if any */ | 494 | /* Add media bay devices if any */ |
| 495 | pnode = mbdev->ofdev.dev.of_node; | ||
| 497 | if (mbdev) | 496 | if (mbdev) |
| 498 | for (np = NULL; (np = of_get_next_child(mbdev->ofdev.node, np)) | 497 | for (np = NULL; (np = of_get_next_child(pnode, np)) != NULL;) { |
| 499 | != NULL;) { | ||
| 500 | if (macio_skip_device(np)) | 498 | if (macio_skip_device(np)) |
| 501 | continue; | 499 | continue; |
| 502 | of_node_get(np); | 500 | of_node_get(np); |
| @@ -506,9 +504,9 @@ static void macio_pci_add_devices(struct macio_chip *chip) | |||
| 506 | } | 504 | } |
| 507 | 505 | ||
| 508 | /* Add serial ports if any */ | 506 | /* Add serial ports if any */ |
| 507 | pnode = sdev->ofdev.dev.of_node; | ||
| 509 | if (sdev) { | 508 | if (sdev) { |
| 510 | for (np = NULL; (np = of_get_next_child(sdev->ofdev.node, np)) | 509 | for (np = NULL; (np = of_get_next_child(pnode, np)) != NULL;) { |
| 511 | != NULL;) { | ||
| 512 | if (macio_skip_device(np)) | 510 | if (macio_skip_device(np)) |
| 513 | continue; | 511 | continue; |
| 514 | of_node_get(np); | 512 | of_node_get(np); |
diff --git a/drivers/macintosh/macio_sysfs.c b/drivers/macintosh/macio_sysfs.c index 9e9453b5842..6999ce59fd1 100644 --- a/drivers/macintosh/macio_sysfs.c +++ b/drivers/macintosh/macio_sysfs.c | |||
| @@ -9,7 +9,7 @@ field##_show (struct device *dev, struct device_attribute *attr, \ | |||
| 9 | char *buf) \ | 9 | char *buf) \ |
| 10 | { \ | 10 | { \ |
| 11 | struct macio_dev *mdev = to_macio_device (dev); \ | 11 | struct macio_dev *mdev = to_macio_device (dev); \ |
| 12 | return sprintf (buf, format_string, mdev->ofdev.node->field); \ | 12 | return sprintf (buf, format_string, mdev->ofdev.dev.of_node->field); \ |
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | static ssize_t | 15 | static ssize_t |
| @@ -21,7 +21,7 @@ compatible_show (struct device *dev, struct device_attribute *attr, char *buf) | |||
| 21 | int length = 0; | 21 | int length = 0; |
| 22 | 22 | ||
| 23 | of = &to_macio_device (dev)->ofdev; | 23 | of = &to_macio_device (dev)->ofdev; |
| 24 | compat = of_get_property(of->node, "compatible", &cplen); | 24 | compat = of_get_property(of->dev.of_node, "compatible", &cplen); |
| 25 | if (!compat) { | 25 | if (!compat) { |
| 26 | *buf = '\0'; | 26 | *buf = '\0'; |
| 27 | return 0; | 27 | return 0; |
| @@ -58,7 +58,7 @@ static ssize_t devspec_show(struct device *dev, | |||
| 58 | struct of_device *ofdev; | 58 | struct of_device *ofdev; |
| 59 | 59 | ||
| 60 | ofdev = to_of_device(dev); | 60 | ofdev = to_of_device(dev); |
| 61 | return sprintf(buf, "%s\n", ofdev->node->full_name); | 61 | return sprintf(buf, "%s\n", ofdev->dev.of_node->full_name); |
| 62 | } | 62 | } |
| 63 | 63 | ||
| 64 | macio_config_of_attr (name, "%s\n"); | 64 | macio_config_of_attr (name, "%s\n"); |
diff --git a/drivers/macintosh/mediabay.c b/drivers/macintosh/mediabay.c index 08002b88f34..288acce76b7 100644 --- a/drivers/macintosh/mediabay.c +++ b/drivers/macintosh/mediabay.c | |||
| @@ -564,7 +564,7 @@ static int __devinit media_bay_attach(struct macio_dev *mdev, const struct of_de | |||
| 564 | unsigned long base; | 564 | unsigned long base; |
| 565 | int i; | 565 | int i; |
| 566 | 566 | ||
| 567 | ofnode = mdev->ofdev.node; | 567 | ofnode = mdev->ofdev.dev.of_node; |
| 568 | 568 | ||
| 569 | if (macio_resource_count(mdev) < 1) | 569 | if (macio_resource_count(mdev) < 1) |
| 570 | return -ENODEV; | 570 | return -ENODEV; |
diff --git a/drivers/macintosh/rack-meter.c b/drivers/macintosh/rack-meter.c index 7c54d80c4fb..12946c5f583 100644 --- a/drivers/macintosh/rack-meter.c +++ b/drivers/macintosh/rack-meter.c | |||
| @@ -375,7 +375,7 @@ static int __devinit rackmeter_probe(struct macio_dev* mdev, | |||
| 375 | pr_debug("rackmeter_probe()\n"); | 375 | pr_debug("rackmeter_probe()\n"); |
| 376 | 376 | ||
| 377 | /* Get i2s-a node */ | 377 | /* Get i2s-a node */ |
| 378 | while ((i2s = of_get_next_child(mdev->ofdev.node, i2s)) != NULL) | 378 | while ((i2s = of_get_next_child(mdev->ofdev.dev.of_node, i2s)) != NULL) |
| 379 | if (strcmp(i2s->name, "i2s-a") == 0) | 379 | if (strcmp(i2s->name, "i2s-a") == 0) |
| 380 | break; | 380 | break; |
| 381 | if (i2s == NULL) { | 381 | if (i2s == NULL) { |
| @@ -431,7 +431,7 @@ static int __devinit rackmeter_probe(struct macio_dev* mdev, | |||
| 431 | of_address_to_resource(i2s, 1, &rdma)) { | 431 | of_address_to_resource(i2s, 1, &rdma)) { |
| 432 | printk(KERN_ERR | 432 | printk(KERN_ERR |
| 433 | "rackmeter: found match but lacks resources: %s", | 433 | "rackmeter: found match but lacks resources: %s", |
| 434 | mdev->ofdev.node->full_name); | 434 | mdev->ofdev.dev.of_node->full_name); |
| 435 | rc = -ENXIO; | 435 | rc = -ENXIO; |
| 436 | goto bail_free; | 436 | goto bail_free; |
| 437 | } | 437 | } |
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c index c9da5c4c167..2506c957712 100644 --- a/drivers/macintosh/smu.c +++ b/drivers/macintosh/smu.c | |||
| @@ -671,8 +671,11 @@ static const struct of_device_id smu_platform_match[] = | |||
| 671 | 671 | ||
| 672 | static struct of_platform_driver smu_of_platform_driver = | 672 | static struct of_platform_driver smu_of_platform_driver = |
| 673 | { | 673 | { |
| 674 | .name = "smu", | 674 | .driver = { |
| 675 | .match_table = smu_platform_match, | 675 | .name = "smu", |
| 676 | .owner = THIS_MODULE, | ||
| 677 | .of_match_table = smu_platform_match, | ||
| 678 | }, | ||
| 676 | .probe = smu_platform_probe, | 679 | .probe = smu_platform_probe, |
| 677 | }; | 680 | }; |
| 678 | 681 | ||
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c index b18fa948f3d..e60605bd0ea 100644 --- a/drivers/macintosh/therm_pm72.c +++ b/drivers/macintosh/therm_pm72.c | |||
| @@ -2215,7 +2215,7 @@ static int fcu_of_probe(struct of_device* dev, const struct of_device_id *match) | |||
| 2215 | state = state_detached; | 2215 | state = state_detached; |
| 2216 | 2216 | ||
| 2217 | /* Lookup the fans in the device tree */ | 2217 | /* Lookup the fans in the device tree */ |
| 2218 | fcu_lookup_fans(dev->node); | 2218 | fcu_lookup_fans(dev->dev.of_node); |
| 2219 | 2219 | ||
| 2220 | /* Add the driver */ | 2220 | /* Add the driver */ |
| 2221 | return i2c_add_driver(&therm_pm72_driver); | 2221 | return i2c_add_driver(&therm_pm72_driver); |
| @@ -2238,8 +2238,11 @@ static const struct of_device_id fcu_match[] = | |||
| 2238 | 2238 | ||
| 2239 | static struct of_platform_driver fcu_of_platform_driver = | 2239 | static struct of_platform_driver fcu_of_platform_driver = |
| 2240 | { | 2240 | { |
| 2241 | .name = "temperature", | 2241 | .driver = { |
| 2242 | .match_table = fcu_match, | 2242 | .name = "temperature", |
| 2243 | .owner = THIS_MODULE, | ||
| 2244 | .of_match_table = fcu_match, | ||
| 2245 | }, | ||
| 2243 | .probe = fcu_of_probe, | 2246 | .probe = fcu_of_probe, |
| 2244 | .remove = fcu_of_remove | 2247 | .remove = fcu_of_remove |
| 2245 | }; | 2248 | }; |
diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c index 0839770e4ec..5c9367acf0c 100644 --- a/drivers/macintosh/therm_windtunnel.c +++ b/drivers/macintosh/therm_windtunnel.c | |||
| @@ -463,8 +463,11 @@ static const struct of_device_id therm_of_match[] = {{ | |||
| 463 | }; | 463 | }; |
| 464 | 464 | ||
| 465 | static struct of_platform_driver therm_of_driver = { | 465 | static struct of_platform_driver therm_of_driver = { |
| 466 | .name = "temperature", | 466 | .driver = { |
| 467 | .match_table = therm_of_match, | 467 | .name = "temperature", |
| 468 | .owner = THIS_MODULE, | ||
| 469 | .of_match_table = therm_of_match, | ||
| 470 | }, | ||
| 468 | .probe = therm_of_probe, | 471 | .probe = therm_of_probe, |
| 469 | .remove = therm_of_remove, | 472 | .remove = therm_of_remove, |
| 470 | }; | 473 | }; |
diff --git a/drivers/message/fusion/mptscsih.c b/drivers/message/fusion/mptscsih.c index 7bd4c0fc23c..5c53624e0e8 100644 --- a/drivers/message/fusion/mptscsih.c +++ b/drivers/message/fusion/mptscsih.c | |||
| @@ -2570,9 +2570,7 @@ mptscsih_getclear_scsi_lookup(MPT_ADAPTER *ioc, int i) | |||
| 2570 | } | 2570 | } |
| 2571 | 2571 | ||
| 2572 | /** | 2572 | /** |
| 2573 | * mptscsih_set_scsi_lookup | 2573 | * mptscsih_set_scsi_lookup - write a scmd entry into the ScsiLookup[] array list |
| 2574 | * | ||
| 2575 | * writes a scmd entry into the ScsiLookup[] array list | ||
| 2576 | * | 2574 | * |
| 2577 | * @ioc: Pointer to MPT_ADAPTER structure | 2575 | * @ioc: Pointer to MPT_ADAPTER structure |
| 2578 | * @i: index into the array | 2576 | * @i: index into the array |
| @@ -2735,7 +2733,7 @@ mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *req, | |||
| 2735 | 2733 | ||
| 2736 | 2734 | ||
| 2737 | /** | 2735 | /** |
| 2738 | * mptscsih_get_completion_code - | 2736 | * mptscsih_get_completion_code - get completion code from MPT request |
| 2739 | * @ioc: Pointer to MPT_ADAPTER structure | 2737 | * @ioc: Pointer to MPT_ADAPTER structure |
| 2740 | * @req: Pointer to original MPT request frame | 2738 | * @req: Pointer to original MPT request frame |
| 2741 | * @reply: Pointer to MPT reply frame (NULL if TurboReply) | 2739 | * @reply: Pointer to MPT reply frame (NULL if TurboReply) |
diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index de3e74cde51..3c6a9860dd9 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig | |||
| @@ -49,6 +49,7 @@ config MFD_SH_MOBILE_SDHI | |||
| 49 | bool "Support for SuperH Mobile SDHI" | 49 | bool "Support for SuperH Mobile SDHI" |
| 50 | depends on SUPERH || ARCH_SHMOBILE | 50 | depends on SUPERH || ARCH_SHMOBILE |
| 51 | select MFD_CORE | 51 | select MFD_CORE |
| 52 | select TMIO_MMC_DMA | ||
| 52 | ---help--- | 53 | ---help--- |
| 53 | This driver supports the SDHI hardware block found in many | 54 | This driver supports the SDHI hardware block found in many |
| 54 | SuperH Mobile SoCs. | 55 | SuperH Mobile SoCs. |
| @@ -162,6 +163,11 @@ config MFD_TMIO | |||
| 162 | bool | 163 | bool |
| 163 | default n | 164 | default n |
| 164 | 165 | ||
| 166 | config TMIO_MMC_DMA | ||
| 167 | bool | ||
| 168 | select DMA_ENGINE | ||
| 169 | select DMADEVICES | ||
| 170 | |||
| 165 | config MFD_T7L66XB | 171 | config MFD_T7L66XB |
| 166 | bool "Support Toshiba T7L66XB" | 172 | bool "Support Toshiba T7L66XB" |
| 167 | depends on ARM && HAVE_CLK | 173 | depends on ARM && HAVE_CLK |
diff --git a/drivers/mfd/sh_mobile_sdhi.c b/drivers/mfd/sh_mobile_sdhi.c index 497f91b6138..cd164595f08 100644 --- a/drivers/mfd/sh_mobile_sdhi.c +++ b/drivers/mfd/sh_mobile_sdhi.c | |||
| @@ -26,11 +26,15 @@ | |||
| 26 | #include <linux/mfd/core.h> | 26 | #include <linux/mfd/core.h> |
| 27 | #include <linux/mfd/tmio.h> | 27 | #include <linux/mfd/tmio.h> |
| 28 | #include <linux/mfd/sh_mobile_sdhi.h> | 28 | #include <linux/mfd/sh_mobile_sdhi.h> |
| 29 | #include <linux/sh_dma.h> | ||
| 29 | 30 | ||
| 30 | struct sh_mobile_sdhi { | 31 | struct sh_mobile_sdhi { |
| 31 | struct clk *clk; | 32 | struct clk *clk; |
| 32 | struct tmio_mmc_data mmc_data; | 33 | struct tmio_mmc_data mmc_data; |
| 33 | struct mfd_cell cell_mmc; | 34 | struct mfd_cell cell_mmc; |
| 35 | struct sh_dmae_slave param_tx; | ||
| 36 | struct sh_dmae_slave param_rx; | ||
| 37 | struct tmio_mmc_dma dma_priv; | ||
| 34 | }; | 38 | }; |
| 35 | 39 | ||
| 36 | static struct resource sh_mobile_sdhi_resources[] = { | 40 | static struct resource sh_mobile_sdhi_resources[] = { |
| @@ -64,6 +68,8 @@ static void sh_mobile_sdhi_set_pwr(struct platform_device *tmio, int state) | |||
| 64 | static int __init sh_mobile_sdhi_probe(struct platform_device *pdev) | 68 | static int __init sh_mobile_sdhi_probe(struct platform_device *pdev) |
| 65 | { | 69 | { |
| 66 | struct sh_mobile_sdhi *priv; | 70 | struct sh_mobile_sdhi *priv; |
| 71 | struct tmio_mmc_data *mmc_data; | ||
| 72 | struct sh_mobile_sdhi_info *p = pdev->dev.platform_data; | ||
| 67 | struct resource *mem; | 73 | struct resource *mem; |
| 68 | char clk_name[8]; | 74 | char clk_name[8]; |
| 69 | int ret, irq; | 75 | int ret, irq; |
| @@ -85,6 +91,8 @@ static int __init sh_mobile_sdhi_probe(struct platform_device *pdev) | |||
| 85 | return -ENOMEM; | 91 | return -ENOMEM; |
| 86 | } | 92 | } |
| 87 | 93 | ||
| 94 | mmc_data = &priv->mmc_data; | ||
| 95 | |||
| 88 | snprintf(clk_name, sizeof(clk_name), "sdhi%d", pdev->id); | 96 | snprintf(clk_name, sizeof(clk_name), "sdhi%d", pdev->id); |
| 89 | priv->clk = clk_get(&pdev->dev, clk_name); | 97 | priv->clk = clk_get(&pdev->dev, clk_name); |
| 90 | if (IS_ERR(priv->clk)) { | 98 | if (IS_ERR(priv->clk)) { |
| @@ -96,12 +104,24 @@ static int __init sh_mobile_sdhi_probe(struct platform_device *pdev) | |||
| 96 | 104 | ||
| 97 | clk_enable(priv->clk); | 105 | clk_enable(priv->clk); |
| 98 | 106 | ||
| 99 | priv->mmc_data.hclk = clk_get_rate(priv->clk); | 107 | mmc_data->hclk = clk_get_rate(priv->clk); |
| 100 | priv->mmc_data.set_pwr = sh_mobile_sdhi_set_pwr; | 108 | mmc_data->set_pwr = sh_mobile_sdhi_set_pwr; |
| 101 | priv->mmc_data.capabilities = MMC_CAP_MMC_HIGHSPEED; | 109 | mmc_data->capabilities = MMC_CAP_MMC_HIGHSPEED; |
| 110 | if (p) { | ||
| 111 | mmc_data->flags = p->tmio_flags; | ||
| 112 | mmc_data->ocr_mask = p->tmio_ocr_mask; | ||
| 113 | } | ||
| 114 | |||
| 115 | if (p && p->dma_slave_tx >= 0 && p->dma_slave_rx >= 0) { | ||
| 116 | priv->param_tx.slave_id = p->dma_slave_tx; | ||
| 117 | priv->param_rx.slave_id = p->dma_slave_rx; | ||
| 118 | priv->dma_priv.chan_priv_tx = &priv->param_tx; | ||
| 119 | priv->dma_priv.chan_priv_rx = &priv->param_rx; | ||
| 120 | mmc_data->dma = &priv->dma_priv; | ||
| 121 | } | ||
| 102 | 122 | ||
| 103 | memcpy(&priv->cell_mmc, &sh_mobile_sdhi_cell, sizeof(priv->cell_mmc)); | 123 | memcpy(&priv->cell_mmc, &sh_mobile_sdhi_cell, sizeof(priv->cell_mmc)); |
| 104 | priv->cell_mmc.driver_data = &priv->mmc_data; | 124 | priv->cell_mmc.driver_data = mmc_data; |
| 105 | priv->cell_mmc.platform_data = &priv->cell_mmc; | 125 | priv->cell_mmc.platform_data = &priv->cell_mmc; |
| 106 | priv->cell_mmc.data_size = sizeof(priv->cell_mmc); | 126 | priv->cell_mmc.data_size = sizeof(priv->cell_mmc); |
| 107 | 127 | ||
diff --git a/drivers/mmc/host/of_mmc_spi.c b/drivers/mmc/host/of_mmc_spi.c index bb6cc54b558..1247e5de9fa 100644 --- a/drivers/mmc/host/of_mmc_spi.c +++ b/drivers/mmc/host/of_mmc_spi.c | |||
| @@ -64,7 +64,7 @@ static int of_mmc_spi_get_ro(struct device *dev) | |||
| 64 | struct mmc_spi_platform_data *mmc_spi_get_pdata(struct spi_device *spi) | 64 | struct mmc_spi_platform_data *mmc_spi_get_pdata(struct spi_device *spi) |
| 65 | { | 65 | { |
| 66 | struct device *dev = &spi->dev; | 66 | struct device *dev = &spi->dev; |
| 67 | struct device_node *np = dev_archdata_get_node(&dev->archdata); | 67 | struct device_node *np = dev->of_node; |
| 68 | struct of_mmc_spi *oms; | 68 | struct of_mmc_spi *oms; |
| 69 | const u32 *voltage_ranges; | 69 | const u32 *voltage_ranges; |
| 70 | int num_ranges; | 70 | int num_ranges; |
| @@ -135,7 +135,7 @@ EXPORT_SYMBOL(mmc_spi_get_pdata); | |||
| 135 | void mmc_spi_put_pdata(struct spi_device *spi) | 135 | void mmc_spi_put_pdata(struct spi_device *spi) |
| 136 | { | 136 | { |
| 137 | struct device *dev = &spi->dev; | 137 | struct device *dev = &spi->dev; |
| 138 | struct device_node *np = dev_archdata_get_node(&dev->archdata); | 138 | struct device_node *np = dev->of_node; |
| 139 | struct of_mmc_spi *oms = to_of_mmc_spi(dev); | 139 | struct of_mmc_spi *oms = to_of_mmc_spi(dev); |
| 140 | int i; | 140 | int i; |
| 141 | 141 | ||
diff --git a/drivers/mmc/host/sdhci-of-core.c b/drivers/mmc/host/sdhci-of-core.c index 55e33135edb..7802a543d8f 100644 --- a/drivers/mmc/host/sdhci-of-core.c +++ b/drivers/mmc/host/sdhci-of-core.c | |||
| @@ -118,7 +118,7 @@ static bool __devinit sdhci_of_wp_inverted(struct device_node *np) | |||
| 118 | static int __devinit sdhci_of_probe(struct of_device *ofdev, | 118 | static int __devinit sdhci_of_probe(struct of_device *ofdev, |
| 119 | const struct of_device_id *match) | 119 | const struct of_device_id *match) |
| 120 | { | 120 | { |
| 121 | struct device_node *np = ofdev->node; | 121 | struct device_node *np = ofdev->dev.of_node; |
| 122 | struct sdhci_of_data *sdhci_of_data = match->data; | 122 | struct sdhci_of_data *sdhci_of_data = match->data; |
| 123 | struct sdhci_host *host; | 123 | struct sdhci_host *host; |
| 124 | struct sdhci_of_host *of_host; | 124 | struct sdhci_of_host *of_host; |
| @@ -205,8 +205,11 @@ static const struct of_device_id sdhci_of_match[] = { | |||
| 205 | MODULE_DEVICE_TABLE(of, sdhci_of_match); | 205 | MODULE_DEVICE_TABLE(of, sdhci_of_match); |
| 206 | 206 | ||
| 207 | static struct of_platform_driver sdhci_of_driver = { | 207 | static struct of_platform_driver sdhci_of_driver = { |
| 208 | .driver.name = "sdhci-of", | 208 | .driver = { |
| 209 | .match_table = sdhci_of_match, | 209 | .name = "sdhci-of", |
| 210 | .owner = THIS_MODULE, | ||
| 211 | .of_match_table = sdhci_of_match, | ||
| 212 | }, | ||
| 210 | .probe = sdhci_of_probe, | 213 | .probe = sdhci_of_probe, |
| 211 | .remove = __devexit_p(sdhci_of_remove), | 214 | .remove = __devexit_p(sdhci_of_remove), |
| 212 | .suspend = sdhci_of_suspend, | 215 | .suspend = sdhci_of_suspend, |
diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c index b2b577f6afd..883fcac2100 100644 --- a/drivers/mmc/host/tmio_mmc.c +++ b/drivers/mmc/host/tmio_mmc.c | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | #include <linux/irq.h> | 29 | #include <linux/irq.h> |
| 30 | #include <linux/device.h> | 30 | #include <linux/device.h> |
| 31 | #include <linux/delay.h> | 31 | #include <linux/delay.h> |
| 32 | #include <linux/dmaengine.h> | ||
| 32 | #include <linux/mmc/host.h> | 33 | #include <linux/mmc/host.h> |
| 33 | #include <linux/mfd/core.h> | 34 | #include <linux/mfd/core.h> |
| 34 | #include <linux/mfd/tmio.h> | 35 | #include <linux/mfd/tmio.h> |
| @@ -131,8 +132,8 @@ tmio_mmc_start_command(struct tmio_mmc_host *host, struct mmc_command *cmd) | |||
| 131 | 132 | ||
| 132 | host->cmd = cmd; | 133 | host->cmd = cmd; |
| 133 | 134 | ||
| 134 | /* FIXME - this seems to be ok comented out but the spec suggest this bit should | 135 | /* FIXME - this seems to be ok commented out but the spec suggest this bit |
| 135 | * be set when issuing app commands. | 136 | * should be set when issuing app commands. |
| 136 | * if(cmd->flags & MMC_FLAG_ACMD) | 137 | * if(cmd->flags & MMC_FLAG_ACMD) |
| 137 | * c |= APP_CMD; | 138 | * c |= APP_CMD; |
| 138 | */ | 139 | */ |
| @@ -155,12 +156,12 @@ tmio_mmc_start_command(struct tmio_mmc_host *host, struct mmc_command *cmd) | |||
| 155 | return 0; | 156 | return 0; |
| 156 | } | 157 | } |
| 157 | 158 | ||
| 158 | /* This chip always returns (at least?) as much data as you ask for. | 159 | /* |
| 160 | * This chip always returns (at least?) as much data as you ask for. | ||
| 159 | * I'm unsure what happens if you ask for less than a block. This should be | 161 | * I'm unsure what happens if you ask for less than a block. This should be |
| 160 | * looked into to ensure that a funny length read doesnt hose the controller. | 162 | * looked into to ensure that a funny length read doesnt hose the controller. |
| 161 | * | ||
| 162 | */ | 163 | */ |
| 163 | static inline void tmio_mmc_pio_irq(struct tmio_mmc_host *host) | 164 | static void tmio_mmc_pio_irq(struct tmio_mmc_host *host) |
| 164 | { | 165 | { |
| 165 | struct mmc_data *data = host->data; | 166 | struct mmc_data *data = host->data; |
| 166 | unsigned short *buf; | 167 | unsigned short *buf; |
| @@ -180,7 +181,7 @@ static inline void tmio_mmc_pio_irq(struct tmio_mmc_host *host) | |||
| 180 | count = data->blksz; | 181 | count = data->blksz; |
| 181 | 182 | ||
| 182 | pr_debug("count: %08x offset: %08x flags %08x\n", | 183 | pr_debug("count: %08x offset: %08x flags %08x\n", |
| 183 | count, host->sg_off, data->flags); | 184 | count, host->sg_off, data->flags); |
| 184 | 185 | ||
| 185 | /* Transfer the data */ | 186 | /* Transfer the data */ |
| 186 | if (data->flags & MMC_DATA_READ) | 187 | if (data->flags & MMC_DATA_READ) |
| @@ -198,7 +199,7 @@ static inline void tmio_mmc_pio_irq(struct tmio_mmc_host *host) | |||
| 198 | return; | 199 | return; |
| 199 | } | 200 | } |
| 200 | 201 | ||
| 201 | static inline void tmio_mmc_data_irq(struct tmio_mmc_host *host) | 202 | static void tmio_mmc_do_data_irq(struct tmio_mmc_host *host) |
| 202 | { | 203 | { |
| 203 | struct mmc_data *data = host->data; | 204 | struct mmc_data *data = host->data; |
| 204 | struct mmc_command *stop; | 205 | struct mmc_command *stop; |
| @@ -206,7 +207,7 @@ static inline void tmio_mmc_data_irq(struct tmio_mmc_host *host) | |||
| 206 | host->data = NULL; | 207 | host->data = NULL; |
| 207 | 208 | ||
| 208 | if (!data) { | 209 | if (!data) { |
| 209 | pr_debug("Spurious data end IRQ\n"); | 210 | dev_warn(&host->pdev->dev, "Spurious data end IRQ\n"); |
| 210 | return; | 211 | return; |
| 211 | } | 212 | } |
| 212 | stop = data->stop; | 213 | stop = data->stop; |
| @@ -219,7 +220,8 @@ static inline void tmio_mmc_data_irq(struct tmio_mmc_host *host) | |||
| 219 | 220 | ||
| 220 | pr_debug("Completed data request\n"); | 221 | pr_debug("Completed data request\n"); |
| 221 | 222 | ||
| 222 | /*FIXME - other drivers allow an optional stop command of any given type | 223 | /* |
| 224 | * FIXME: other drivers allow an optional stop command of any given type | ||
| 223 | * which we dont do, as the chip can auto generate them. | 225 | * which we dont do, as the chip can auto generate them. |
| 224 | * Perhaps we can be smarter about when to use auto CMD12 and | 226 | * Perhaps we can be smarter about when to use auto CMD12 and |
| 225 | * only issue the auto request when we know this is the desired | 227 | * only issue the auto request when we know this is the desired |
| @@ -227,10 +229,17 @@ static inline void tmio_mmc_data_irq(struct tmio_mmc_host *host) | |||
| 227 | * upper layers expect. For now, we do what works. | 229 | * upper layers expect. For now, we do what works. |
| 228 | */ | 230 | */ |
| 229 | 231 | ||
| 230 | if (data->flags & MMC_DATA_READ) | 232 | if (data->flags & MMC_DATA_READ) { |
| 231 | disable_mmc_irqs(host, TMIO_MASK_READOP); | 233 | if (!host->chan_rx) |
| 232 | else | 234 | disable_mmc_irqs(host, TMIO_MASK_READOP); |
| 233 | disable_mmc_irqs(host, TMIO_MASK_WRITEOP); | 235 | dev_dbg(&host->pdev->dev, "Complete Rx request %p\n", |
| 236 | host->mrq); | ||
| 237 | } else { | ||
| 238 | if (!host->chan_tx) | ||
| 239 | disable_mmc_irqs(host, TMIO_MASK_WRITEOP); | ||
| 240 | dev_dbg(&host->pdev->dev, "Complete Tx request %p\n", | ||
| 241 | host->mrq); | ||
| 242 | } | ||
| 234 | 243 | ||
| 235 | if (stop) { | 244 | if (stop) { |
| 236 | if (stop->opcode == 12 && !stop->arg) | 245 | if (stop->opcode == 12 && !stop->arg) |
| @@ -242,7 +251,35 @@ static inline void tmio_mmc_data_irq(struct tmio_mmc_host *host) | |||
| 242 | tmio_mmc_finish_request(host); | 251 | tmio_mmc_finish_request(host); |
| 243 | } | 252 | } |
| 244 | 253 | ||
| 245 | static inline void tmio_mmc_cmd_irq(struct tmio_mmc_host *host, | 254 | static void tmio_mmc_data_irq(struct tmio_mmc_host *host) |
| 255 | { | ||
| 256 | struct mmc_data *data = host->data; | ||
| 257 | |||
| 258 | if (!data) | ||
| 259 | return; | ||
| 260 | |||
| 261 | if (host->chan_tx && (data->flags & MMC_DATA_WRITE)) { | ||
| 262 | /* | ||
| 263 | * Has all data been written out yet? Testing on SuperH showed, | ||
| 264 | * that in most cases the first interrupt comes already with the | ||
| 265 | * BUSY status bit clear, but on some operations, like mount or | ||
| 266 | * in the beginning of a write / sync / umount, there is one | ||
| 267 | * DATAEND interrupt with the BUSY bit set, in this cases | ||
| 268 | * waiting for one more interrupt fixes the problem. | ||
| 269 | */ | ||
| 270 | if (!(sd_ctrl_read32(host, CTL_STATUS) & TMIO_STAT_CMD_BUSY)) { | ||
| 271 | disable_mmc_irqs(host, TMIO_STAT_DATAEND); | ||
| 272 | tasklet_schedule(&host->dma_complete); | ||
| 273 | } | ||
| 274 | } else if (host->chan_rx && (data->flags & MMC_DATA_READ)) { | ||
| 275 | disable_mmc_irqs(host, TMIO_STAT_DATAEND); | ||
| 276 | tasklet_schedule(&host->dma_complete); | ||
| 277 | } else { | ||
| 278 | tmio_mmc_do_data_irq(host); | ||
| 279 | } | ||
| 280 | } | ||
| 281 | |||
| 282 | static void tmio_mmc_cmd_irq(struct tmio_mmc_host *host, | ||
| 246 | unsigned int stat) | 283 | unsigned int stat) |
| 247 | { | 284 | { |
| 248 | struct mmc_command *cmd = host->cmd; | 285 | struct mmc_command *cmd = host->cmd; |
| @@ -282,10 +319,16 @@ static inline void tmio_mmc_cmd_irq(struct tmio_mmc_host *host, | |||
| 282 | * If theres no data or we encountered an error, finish now. | 319 | * If theres no data or we encountered an error, finish now. |
| 283 | */ | 320 | */ |
| 284 | if (host->data && !cmd->error) { | 321 | if (host->data && !cmd->error) { |
| 285 | if (host->data->flags & MMC_DATA_READ) | 322 | if (host->data->flags & MMC_DATA_READ) { |
| 286 | enable_mmc_irqs(host, TMIO_MASK_READOP); | 323 | if (!host->chan_rx) |
| 287 | else | 324 | enable_mmc_irqs(host, TMIO_MASK_READOP); |
| 288 | enable_mmc_irqs(host, TMIO_MASK_WRITEOP); | 325 | } else { |
| 326 | struct dma_chan *chan = host->chan_tx; | ||
| 327 | if (!chan) | ||
| 328 | enable_mmc_irqs(host, TMIO_MASK_WRITEOP); | ||
| 329 | else | ||
| 330 | tasklet_schedule(&host->dma_issue); | ||
| 331 | } | ||
| 289 | } else { | 332 | } else { |
| 290 | tmio_mmc_finish_request(host); | 333 | tmio_mmc_finish_request(host); |
| 291 | } | 334 | } |
| @@ -293,7 +336,6 @@ static inline void tmio_mmc_cmd_irq(struct tmio_mmc_host *host, | |||
| 293 | return; | 336 | return; |
| 294 | } | 337 | } |
| 295 | 338 | ||
| 296 | |||
| 297 | static irqreturn_t tmio_mmc_irq(int irq, void *devid) | 339 | static irqreturn_t tmio_mmc_irq(int irq, void *devid) |
| 298 | { | 340 | { |
| 299 | struct tmio_mmc_host *host = devid; | 341 | struct tmio_mmc_host *host = devid; |
| @@ -311,7 +353,7 @@ static irqreturn_t tmio_mmc_irq(int irq, void *devid) | |||
| 311 | if (!ireg) { | 353 | if (!ireg) { |
| 312 | disable_mmc_irqs(host, status & ~irq_mask); | 354 | disable_mmc_irqs(host, status & ~irq_mask); |
| 313 | 355 | ||
| 314 | pr_debug("tmio_mmc: Spurious irq, disabling! " | 356 | pr_warning("tmio_mmc: Spurious irq, disabling! " |
| 315 | "0x%08x 0x%08x 0x%08x\n", status, irq_mask, ireg); | 357 | "0x%08x 0x%08x 0x%08x\n", status, irq_mask, ireg); |
| 316 | pr_debug_status(status); | 358 | pr_debug_status(status); |
| 317 | 359 | ||
| @@ -363,16 +405,265 @@ out: | |||
| 363 | return IRQ_HANDLED; | 405 | return IRQ_HANDLED; |
| 364 | } | 406 | } |
| 365 | 407 | ||
| 408 | #ifdef CONFIG_TMIO_MMC_DMA | ||
| 409 | static void tmio_mmc_enable_dma(struct tmio_mmc_host *host, bool enable) | ||
| 410 | { | ||
| 411 | #if defined(CONFIG_SUPERH) || defined(CONFIG_ARCH_SHMOBILE) | ||
| 412 | /* Switch DMA mode on or off - SuperH specific? */ | ||
| 413 | sd_ctrl_write16(host, 0xd8, enable ? 2 : 0); | ||
| 414 | #endif | ||
| 415 | } | ||
| 416 | |||
| 417 | static void tmio_dma_complete(void *arg) | ||
| 418 | { | ||
| 419 | struct tmio_mmc_host *host = arg; | ||
| 420 | |||
| 421 | dev_dbg(&host->pdev->dev, "Command completed\n"); | ||
| 422 | |||
| 423 | if (!host->data) | ||
| 424 | dev_warn(&host->pdev->dev, "NULL data in DMA completion!\n"); | ||
| 425 | else | ||
| 426 | enable_mmc_irqs(host, TMIO_STAT_DATAEND); | ||
| 427 | } | ||
| 428 | |||
| 429 | static int tmio_mmc_start_dma_rx(struct tmio_mmc_host *host) | ||
| 430 | { | ||
| 431 | struct scatterlist *sg = host->sg_ptr; | ||
| 432 | struct dma_async_tx_descriptor *desc = NULL; | ||
| 433 | struct dma_chan *chan = host->chan_rx; | ||
| 434 | int ret; | ||
| 435 | |||
| 436 | ret = dma_map_sg(&host->pdev->dev, sg, host->sg_len, DMA_FROM_DEVICE); | ||
| 437 | if (ret > 0) { | ||
| 438 | host->dma_sglen = ret; | ||
| 439 | desc = chan->device->device_prep_slave_sg(chan, sg, ret, | ||
| 440 | DMA_FROM_DEVICE, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); | ||
| 441 | } | ||
| 442 | |||
| 443 | if (desc) { | ||
| 444 | host->desc = desc; | ||
| 445 | desc->callback = tmio_dma_complete; | ||
| 446 | desc->callback_param = host; | ||
| 447 | host->cookie = desc->tx_submit(desc); | ||
| 448 | if (host->cookie < 0) { | ||
| 449 | host->desc = NULL; | ||
| 450 | ret = host->cookie; | ||
| 451 | } else { | ||
| 452 | chan->device->device_issue_pending(chan); | ||
| 453 | } | ||
| 454 | } | ||
| 455 | dev_dbg(&host->pdev->dev, "%s(): mapped %d -> %d, cookie %d, rq %p\n", | ||
| 456 | __func__, host->sg_len, ret, host->cookie, host->mrq); | ||
| 457 | |||
| 458 | if (!host->desc) { | ||
| 459 | /* DMA failed, fall back to PIO */ | ||
| 460 | if (ret >= 0) | ||
| 461 | ret = -EIO; | ||
| 462 | host->chan_rx = NULL; | ||
| 463 | dma_release_channel(chan); | ||
| 464 | /* Free the Tx channel too */ | ||
| 465 | chan = host->chan_tx; | ||
| 466 | if (chan) { | ||
| 467 | host->chan_tx = NULL; | ||
| 468 | dma_release_channel(chan); | ||
| 469 | } | ||
| 470 | dev_warn(&host->pdev->dev, | ||
| 471 | "DMA failed: %d, falling back to PIO\n", ret); | ||
| 472 | tmio_mmc_enable_dma(host, false); | ||
| 473 | reset(host); | ||
| 474 | /* Fail this request, let above layers recover */ | ||
| 475 | host->mrq->cmd->error = ret; | ||
| 476 | tmio_mmc_finish_request(host); | ||
| 477 | } | ||
| 478 | |||
| 479 | dev_dbg(&host->pdev->dev, "%s(): desc %p, cookie %d, sg[%d]\n", __func__, | ||
| 480 | desc, host->cookie, host->sg_len); | ||
| 481 | |||
| 482 | return ret > 0 ? 0 : ret; | ||
| 483 | } | ||
| 484 | |||
| 485 | static int tmio_mmc_start_dma_tx(struct tmio_mmc_host *host) | ||
| 486 | { | ||
| 487 | struct scatterlist *sg = host->sg_ptr; | ||
| 488 | struct dma_async_tx_descriptor *desc = NULL; | ||
| 489 | struct dma_chan *chan = host->chan_tx; | ||
| 490 | int ret; | ||
| 491 | |||
| 492 | ret = dma_map_sg(&host->pdev->dev, sg, host->sg_len, DMA_TO_DEVICE); | ||
| 493 | if (ret > 0) { | ||
| 494 | host->dma_sglen = ret; | ||
| 495 | desc = chan->device->device_prep_slave_sg(chan, sg, ret, | ||
| 496 | DMA_TO_DEVICE, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); | ||
| 497 | } | ||
| 498 | |||
| 499 | if (desc) { | ||
| 500 | host->desc = desc; | ||
| 501 | desc->callback = tmio_dma_complete; | ||
| 502 | desc->callback_param = host; | ||
| 503 | host->cookie = desc->tx_submit(desc); | ||
| 504 | if (host->cookie < 0) { | ||
| 505 | host->desc = NULL; | ||
| 506 | ret = host->cookie; | ||
| 507 | } | ||
| 508 | } | ||
| 509 | dev_dbg(&host->pdev->dev, "%s(): mapped %d -> %d, cookie %d, rq %p\n", | ||
| 510 | __func__, host->sg_len, ret, host->cookie, host->mrq); | ||
| 511 | |||
| 512 | if (!host->desc) { | ||
| 513 | /* DMA failed, fall back to PIO */ | ||
| 514 | if (ret >= 0) | ||
| 515 | ret = -EIO; | ||
| 516 | host->chan_tx = NULL; | ||
| 517 | dma_release_channel(chan); | ||
| 518 | /* Free the Rx channel too */ | ||
| 519 | chan = host->chan_rx; | ||
| 520 | if (chan) { | ||
| 521 | host->chan_rx = NULL; | ||
| 522 | dma_release_channel(chan); | ||
| 523 | } | ||
| 524 | dev_warn(&host->pdev->dev, | ||
| 525 | "DMA failed: %d, falling back to PIO\n", ret); | ||
| 526 | tmio_mmc_enable_dma(host, false); | ||
| 527 | reset(host); | ||
| 528 | /* Fail this request, let above layers recover */ | ||
| 529 | host->mrq->cmd->error = ret; | ||
| 530 | tmio_mmc_finish_request(host); | ||
| 531 | } | ||
| 532 | |||
| 533 | dev_dbg(&host->pdev->dev, "%s(): desc %p, cookie %d\n", __func__, | ||
| 534 | desc, host->cookie); | ||
| 535 | |||
| 536 | return ret > 0 ? 0 : ret; | ||
| 537 | } | ||
| 538 | |||
| 539 | static int tmio_mmc_start_dma(struct tmio_mmc_host *host, | ||
| 540 | struct mmc_data *data) | ||
| 541 | { | ||
| 542 | if (data->flags & MMC_DATA_READ) { | ||
| 543 | if (host->chan_rx) | ||
| 544 | return tmio_mmc_start_dma_rx(host); | ||
| 545 | } else { | ||
| 546 | if (host->chan_tx) | ||
| 547 | return tmio_mmc_start_dma_tx(host); | ||
| 548 | } | ||
| 549 | |||
| 550 | return 0; | ||
| 551 | } | ||
| 552 | |||
| 553 | static void tmio_issue_tasklet_fn(unsigned long priv) | ||
| 554 | { | ||
| 555 | struct tmio_mmc_host *host = (struct tmio_mmc_host *)priv; | ||
| 556 | struct dma_chan *chan = host->chan_tx; | ||
| 557 | |||
| 558 | chan->device->device_issue_pending(chan); | ||
| 559 | } | ||
| 560 | |||
| 561 | static void tmio_tasklet_fn(unsigned long arg) | ||
| 562 | { | ||
| 563 | struct tmio_mmc_host *host = (struct tmio_mmc_host *)arg; | ||
| 564 | |||
| 565 | if (host->data->flags & MMC_DATA_READ) | ||
| 566 | dma_unmap_sg(&host->pdev->dev, host->sg_ptr, host->dma_sglen, | ||
| 567 | DMA_FROM_DEVICE); | ||
| 568 | else | ||
| 569 | dma_unmap_sg(&host->pdev->dev, host->sg_ptr, host->dma_sglen, | ||
| 570 | DMA_TO_DEVICE); | ||
| 571 | |||
| 572 | tmio_mmc_do_data_irq(host); | ||
| 573 | } | ||
| 574 | |||
| 575 | /* It might be necessary to make filter MFD specific */ | ||
| 576 | static bool tmio_mmc_filter(struct dma_chan *chan, void *arg) | ||
| 577 | { | ||
| 578 | dev_dbg(chan->device->dev, "%s: slave data %p\n", __func__, arg); | ||
| 579 | chan->private = arg; | ||
| 580 | return true; | ||
| 581 | } | ||
| 582 | |||
| 583 | static void tmio_mmc_request_dma(struct tmio_mmc_host *host, | ||
| 584 | struct tmio_mmc_data *pdata) | ||
| 585 | { | ||
| 586 | host->cookie = -EINVAL; | ||
| 587 | host->desc = NULL; | ||
| 588 | |||
| 589 | /* We can only either use DMA for both Tx and Rx or not use it at all */ | ||
| 590 | if (pdata->dma) { | ||
| 591 | dma_cap_mask_t mask; | ||
| 592 | |||
| 593 | dma_cap_zero(mask); | ||
| 594 | dma_cap_set(DMA_SLAVE, mask); | ||
| 595 | |||
| 596 | host->chan_tx = dma_request_channel(mask, tmio_mmc_filter, | ||
| 597 | pdata->dma->chan_priv_tx); | ||
| 598 | dev_dbg(&host->pdev->dev, "%s: TX: got channel %p\n", __func__, | ||
| 599 | host->chan_tx); | ||
| 600 | |||
| 601 | if (!host->chan_tx) | ||
| 602 | return; | ||
| 603 | |||
| 604 | host->chan_rx = dma_request_channel(mask, tmio_mmc_filter, | ||
| 605 | pdata->dma->chan_priv_rx); | ||
| 606 | dev_dbg(&host->pdev->dev, "%s: RX: got channel %p\n", __func__, | ||
| 607 | host->chan_rx); | ||
| 608 | |||
| 609 | if (!host->chan_rx) { | ||
| 610 | dma_release_channel(host->chan_tx); | ||
| 611 | host->chan_tx = NULL; | ||
| 612 | return; | ||
| 613 | } | ||
| 614 | |||
| 615 | tasklet_init(&host->dma_complete, tmio_tasklet_fn, (unsigned long)host); | ||
| 616 | tasklet_init(&host->dma_issue, tmio_issue_tasklet_fn, (unsigned long)host); | ||
| 617 | |||
| 618 | tmio_mmc_enable_dma(host, true); | ||
| 619 | } | ||
| 620 | } | ||
| 621 | |||
| 622 | static void tmio_mmc_release_dma(struct tmio_mmc_host *host) | ||
| 623 | { | ||
| 624 | if (host->chan_tx) { | ||
| 625 | struct dma_chan *chan = host->chan_tx; | ||
| 626 | host->chan_tx = NULL; | ||
| 627 | dma_release_channel(chan); | ||
| 628 | } | ||
| 629 | if (host->chan_rx) { | ||
| 630 | struct dma_chan *chan = host->chan_rx; | ||
| 631 | host->chan_rx = NULL; | ||
| 632 | dma_release_channel(chan); | ||
| 633 | } | ||
| 634 | |||
| 635 | host->cookie = -EINVAL; | ||
| 636 | host->desc = NULL; | ||
| 637 | } | ||
| 638 | #else | ||
| 639 | static int tmio_mmc_start_dma(struct tmio_mmc_host *host, | ||
| 640 | struct mmc_data *data) | ||
| 641 | { | ||
| 642 | return 0; | ||
| 643 | } | ||
| 644 | |||
| 645 | static void tmio_mmc_request_dma(struct tmio_mmc_host *host, | ||
| 646 | struct tmio_mmc_data *pdata) | ||
| 647 | { | ||
| 648 | host->chan_tx = NULL; | ||
| 649 | host->chan_rx = NULL; | ||
| 650 | } | ||
| 651 | |||
| 652 | static void tmio_mmc_release_dma(struct tmio_mmc_host *host) | ||
| 653 | { | ||
| 654 | } | ||
| 655 | #endif | ||
| 656 | |||
| 366 | static int tmio_mmc_start_data(struct tmio_mmc_host *host, | 657 | static int tmio_mmc_start_data(struct tmio_mmc_host *host, |
| 367 | struct mmc_data *data) | 658 | struct mmc_data *data) |
| 368 | { | 659 | { |
| 369 | pr_debug("setup data transfer: blocksize %08x nr_blocks %d\n", | 660 | pr_debug("setup data transfer: blocksize %08x nr_blocks %d\n", |
| 370 | data->blksz, data->blocks); | 661 | data->blksz, data->blocks); |
| 371 | 662 | ||
| 372 | /* Hardware cannot perform 1 and 2 byte requests in 4 bit mode */ | 663 | /* Hardware cannot perform 1 and 2 byte requests in 4 bit mode */ |
| 373 | if (data->blksz < 4 && host->mmc->ios.bus_width == MMC_BUS_WIDTH_4) { | 664 | if (data->blksz < 4 && host->mmc->ios.bus_width == MMC_BUS_WIDTH_4) { |
| 374 | printk(KERN_ERR "%s: %d byte block unsupported in 4 bit mode\n", | 665 | pr_err("%s: %d byte block unsupported in 4 bit mode\n", |
| 375 | mmc_hostname(host->mmc), data->blksz); | 666 | mmc_hostname(host->mmc), data->blksz); |
| 376 | return -EINVAL; | 667 | return -EINVAL; |
| 377 | } | 668 | } |
| 378 | 669 | ||
| @@ -383,7 +674,7 @@ static int tmio_mmc_start_data(struct tmio_mmc_host *host, | |||
| 383 | sd_ctrl_write16(host, CTL_SD_XFER_LEN, data->blksz); | 674 | sd_ctrl_write16(host, CTL_SD_XFER_LEN, data->blksz); |
| 384 | sd_ctrl_write16(host, CTL_XFER_BLK_COUNT, data->blocks); | 675 | sd_ctrl_write16(host, CTL_XFER_BLK_COUNT, data->blocks); |
| 385 | 676 | ||
| 386 | return 0; | 677 | return tmio_mmc_start_dma(host, data); |
| 387 | } | 678 | } |
| 388 | 679 | ||
| 389 | /* Process requests from the MMC layer */ | 680 | /* Process requests from the MMC layer */ |
| @@ -404,7 +695,6 @@ static void tmio_mmc_request(struct mmc_host *mmc, struct mmc_request *mrq) | |||
| 404 | } | 695 | } |
| 405 | 696 | ||
| 406 | ret = tmio_mmc_start_command(host, mrq->cmd); | 697 | ret = tmio_mmc_start_command(host, mrq->cmd); |
| 407 | |||
| 408 | if (!ret) | 698 | if (!ret) |
| 409 | return; | 699 | return; |
| 410 | 700 | ||
| @@ -458,11 +748,14 @@ static void tmio_mmc_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) | |||
| 458 | static int tmio_mmc_get_ro(struct mmc_host *mmc) | 748 | static int tmio_mmc_get_ro(struct mmc_host *mmc) |
| 459 | { | 749 | { |
| 460 | struct tmio_mmc_host *host = mmc_priv(mmc); | 750 | struct tmio_mmc_host *host = mmc_priv(mmc); |
| 751 | struct mfd_cell *cell = host->pdev->dev.platform_data; | ||
| 752 | struct tmio_mmc_data *pdata = cell->driver_data; | ||
| 461 | 753 | ||
| 462 | return (sd_ctrl_read16(host, CTL_STATUS) & TMIO_STAT_WRPROTECT) ? 0 : 1; | 754 | return ((pdata->flags & TMIO_MMC_WRPROTECT_DISABLE) || |
| 755 | (sd_ctrl_read32(host, CTL_STATUS) & TMIO_STAT_WRPROTECT)) ? 0 : 1; | ||
| 463 | } | 756 | } |
| 464 | 757 | ||
| 465 | static struct mmc_host_ops tmio_mmc_ops = { | 758 | static const struct mmc_host_ops tmio_mmc_ops = { |
| 466 | .request = tmio_mmc_request, | 759 | .request = tmio_mmc_request, |
| 467 | .set_ios = tmio_mmc_set_ios, | 760 | .set_ios = tmio_mmc_set_ios, |
| 468 | .get_ro = tmio_mmc_get_ro, | 761 | .get_ro = tmio_mmc_get_ro, |
| @@ -515,6 +808,7 @@ static int __devinit tmio_mmc_probe(struct platform_device *dev) | |||
| 515 | struct tmio_mmc_host *host; | 808 | struct tmio_mmc_host *host; |
| 516 | struct mmc_host *mmc; | 809 | struct mmc_host *mmc; |
| 517 | int ret = -EINVAL; | 810 | int ret = -EINVAL; |
| 811 | u32 irq_mask = TMIO_MASK_CMD; | ||
| 518 | 812 | ||
| 519 | if (dev->num_resources != 2) | 813 | if (dev->num_resources != 2) |
| 520 | goto out; | 814 | goto out; |
| @@ -553,7 +847,10 @@ static int __devinit tmio_mmc_probe(struct platform_device *dev) | |||
| 553 | mmc->caps |= pdata->capabilities; | 847 | mmc->caps |= pdata->capabilities; |
| 554 | mmc->f_max = pdata->hclk; | 848 | mmc->f_max = pdata->hclk; |
| 555 | mmc->f_min = mmc->f_max / 512; | 849 | mmc->f_min = mmc->f_max / 512; |
| 556 | mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34; | 850 | if (pdata->ocr_mask) |
| 851 | mmc->ocr_avail = pdata->ocr_mask; | ||
| 852 | else | ||
| 853 | mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34; | ||
| 557 | 854 | ||
| 558 | /* Tell the MFD core we are ready to be enabled */ | 855 | /* Tell the MFD core we are ready to be enabled */ |
| 559 | if (cell->enable) { | 856 | if (cell->enable) { |
| @@ -578,13 +875,20 @@ static int __devinit tmio_mmc_probe(struct platform_device *dev) | |||
| 578 | if (ret) | 875 | if (ret) |
| 579 | goto cell_disable; | 876 | goto cell_disable; |
| 580 | 877 | ||
| 878 | /* See if we also get DMA */ | ||
| 879 | tmio_mmc_request_dma(host, pdata); | ||
| 880 | |||
| 581 | mmc_add_host(mmc); | 881 | mmc_add_host(mmc); |
| 582 | 882 | ||
| 583 | printk(KERN_INFO "%s at 0x%08lx irq %d\n", mmc_hostname(host->mmc), | 883 | pr_info("%s at 0x%08lx irq %d\n", mmc_hostname(host->mmc), |
| 584 | (unsigned long)host->ctl, host->irq); | 884 | (unsigned long)host->ctl, host->irq); |
| 585 | 885 | ||
| 586 | /* Unmask the IRQs we want to know about */ | 886 | /* Unmask the IRQs we want to know about */ |
| 587 | enable_mmc_irqs(host, TMIO_MASK_IRQ); | 887 | if (!host->chan_rx) |
| 888 | irq_mask |= TMIO_MASK_READOP; | ||
| 889 | if (!host->chan_tx) | ||
| 890 | irq_mask |= TMIO_MASK_WRITEOP; | ||
| 891 | enable_mmc_irqs(host, irq_mask); | ||
| 588 | 892 | ||
| 589 | return 0; | 893 | return 0; |
| 590 | 894 | ||
| @@ -609,6 +913,7 @@ static int __devexit tmio_mmc_remove(struct platform_device *dev) | |||
| 609 | if (mmc) { | 913 | if (mmc) { |
| 610 | struct tmio_mmc_host *host = mmc_priv(mmc); | 914 | struct tmio_mmc_host *host = mmc_priv(mmc); |
| 611 | mmc_remove_host(mmc); | 915 | mmc_remove_host(mmc); |
| 916 | tmio_mmc_release_dma(host); | ||
| 612 | free_irq(host->irq, host); | 917 | free_irq(host->irq, host); |
| 613 | if (cell->disable) | 918 | if (cell->disable) |
| 614 | cell->disable(dev); | 919 | cell->disable(dev); |
diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h index dafecfbcd91..64f7d5dfc10 100644 --- a/drivers/mmc/host/tmio_mmc.h +++ b/drivers/mmc/host/tmio_mmc.h | |||
| @@ -10,6 +10,8 @@ | |||
| 10 | */ | 10 | */ |
| 11 | 11 | ||
| 12 | #include <linux/highmem.h> | 12 | #include <linux/highmem.h> |
| 13 | #include <linux/interrupt.h> | ||
| 14 | #include <linux/dmaengine.h> | ||
| 13 | 15 | ||
| 14 | #define CTL_SD_CMD 0x00 | 16 | #define CTL_SD_CMD 0x00 |
| 15 | #define CTL_ARG_REG 0x04 | 17 | #define CTL_ARG_REG 0x04 |
| @@ -106,6 +108,17 @@ struct tmio_mmc_host { | |||
| 106 | unsigned int sg_off; | 108 | unsigned int sg_off; |
| 107 | 109 | ||
| 108 | struct platform_device *pdev; | 110 | struct platform_device *pdev; |
| 111 | |||
| 112 | /* DMA support */ | ||
| 113 | struct dma_chan *chan_rx; | ||
| 114 | struct dma_chan *chan_tx; | ||
| 115 | struct tasklet_struct dma_complete; | ||
| 116 | struct tasklet_struct dma_issue; | ||
| 117 | #ifdef CONFIG_TMIO_MMC_DMA | ||
| 118 | struct dma_async_tx_descriptor *desc; | ||
| 119 | unsigned int dma_sglen; | ||
| 120 | dma_cookie_t cookie; | ||
| 121 | #endif | ||
| 109 | }; | 122 | }; |
| 110 | 123 | ||
| 111 | #include <linux/io.h> | 124 | #include <linux/io.h> |
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c index 36dbcee1ac2..ba124baa646 100644 --- a/drivers/mtd/maps/physmap_of.c +++ b/drivers/mtd/maps/physmap_of.c | |||
| @@ -143,7 +143,7 @@ static int of_flash_remove(struct of_device *dev) | |||
| 143 | static struct mtd_info * __devinit obsolete_probe(struct of_device *dev, | 143 | static struct mtd_info * __devinit obsolete_probe(struct of_device *dev, |
| 144 | struct map_info *map) | 144 | struct map_info *map) |
| 145 | { | 145 | { |
| 146 | struct device_node *dp = dev->node; | 146 | struct device_node *dp = dev->dev.of_node; |
| 147 | const char *of_probe; | 147 | const char *of_probe; |
| 148 | struct mtd_info *mtd; | 148 | struct mtd_info *mtd; |
| 149 | static const char *rom_probe_types[] | 149 | static const char *rom_probe_types[] |
| @@ -221,7 +221,7 @@ static int __devinit of_flash_probe(struct of_device *dev, | |||
| 221 | #ifdef CONFIG_MTD_PARTITIONS | 221 | #ifdef CONFIG_MTD_PARTITIONS |
| 222 | const char **part_probe_types; | 222 | const char **part_probe_types; |
| 223 | #endif | 223 | #endif |
| 224 | struct device_node *dp = dev->node; | 224 | struct device_node *dp = dev->dev.of_node; |
| 225 | struct resource res; | 225 | struct resource res; |
| 226 | struct of_flash *info; | 226 | struct of_flash *info; |
| 227 | const char *probe_type = match->data; | 227 | const char *probe_type = match->data; |
| @@ -245,7 +245,7 @@ static int __devinit of_flash_probe(struct of_device *dev, | |||
| 245 | p = of_get_property(dp, "reg", &count); | 245 | p = of_get_property(dp, "reg", &count); |
| 246 | if (count % reg_tuple_size != 0) { | 246 | if (count % reg_tuple_size != 0) { |
| 247 | dev_err(&dev->dev, "Malformed reg property on %s\n", | 247 | dev_err(&dev->dev, "Malformed reg property on %s\n", |
| 248 | dev->node->full_name); | 248 | dev->dev.of_node->full_name); |
| 249 | err = -EINVAL; | 249 | err = -EINVAL; |
| 250 | goto err_flash_remove; | 250 | goto err_flash_remove; |
| 251 | } | 251 | } |
| @@ -418,8 +418,11 @@ static struct of_device_id of_flash_match[] = { | |||
| 418 | MODULE_DEVICE_TABLE(of, of_flash_match); | 418 | MODULE_DEVICE_TABLE(of, of_flash_match); |
| 419 | 419 | ||
| 420 | static struct of_platform_driver of_flash_driver = { | 420 | static struct of_platform_driver of_flash_driver = { |
| 421 | .name = "of-flash", | 421 | .driver = { |
| 422 | .match_table = of_flash_match, | 422 | .name = "of-flash", |
| 423 | .owner = THIS_MODULE, | ||
| 424 | .of_match_table = of_flash_match, | ||
| 425 | }, | ||
| 423 | .probe = of_flash_probe, | 426 | .probe = of_flash_probe, |
| 424 | .remove = of_flash_remove, | 427 | .remove = of_flash_remove, |
| 425 | }; | 428 | }; |
diff --git a/drivers/mtd/maps/sun_uflash.c b/drivers/mtd/maps/sun_uflash.c index fadc4c45b45..0391c2527bd 100644 --- a/drivers/mtd/maps/sun_uflash.c +++ b/drivers/mtd/maps/sun_uflash.c | |||
| @@ -110,7 +110,7 @@ int uflash_devinit(struct of_device *op, struct device_node *dp) | |||
| 110 | 110 | ||
| 111 | static int __devinit uflash_probe(struct of_device *op, const struct of_device_id *match) | 111 | static int __devinit uflash_probe(struct of_device *op, const struct of_device_id *match) |
| 112 | { | 112 | { |
| 113 | struct device_node *dp = op->node; | 113 | struct device_node *dp = op->dev.of_node; |
| 114 | 114 | ||
| 115 | /* Flashprom must have the "user" property in order to | 115 | /* Flashprom must have the "user" property in order to |
| 116 | * be used by this driver. | 116 | * be used by this driver. |
| @@ -149,8 +149,11 @@ static const struct of_device_id uflash_match[] = { | |||
| 149 | MODULE_DEVICE_TABLE(of, uflash_match); | 149 | MODULE_DEVICE_TABLE(of, uflash_match); |
| 150 | 150 | ||
| 151 | static struct of_platform_driver uflash_driver = { | 151 | static struct of_platform_driver uflash_driver = { |
| 152 | .name = DRIVER_NAME, | 152 | .driver = { |
| 153 | .match_table = uflash_match, | 153 | .name = DRIVER_NAME, |
| 154 | .owner = THIS_MODULE, | ||
| 155 | .of_match_table = uflash_match, | ||
| 156 | }, | ||
| 154 | .probe = uflash_probe, | 157 | .probe = uflash_probe, |
| 155 | .remove = __devexit_p(uflash_remove), | 158 | .remove = __devexit_p(uflash_remove), |
| 156 | }; | 159 | }; |
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c index 3f38fb8e666..5084cc51794 100644 --- a/drivers/mtd/nand/fsl_elbc_nand.c +++ b/drivers/mtd/nand/fsl_elbc_nand.c | |||
| @@ -1030,14 +1030,14 @@ static int __devinit fsl_elbc_ctrl_probe(struct of_device *ofdev, | |||
| 1030 | init_waitqueue_head(&ctrl->controller.wq); | 1030 | init_waitqueue_head(&ctrl->controller.wq); |
| 1031 | init_waitqueue_head(&ctrl->irq_wait); | 1031 | init_waitqueue_head(&ctrl->irq_wait); |
| 1032 | 1032 | ||
| 1033 | ctrl->regs = of_iomap(ofdev->node, 0); | 1033 | ctrl->regs = of_iomap(ofdev->dev.of_node, 0); |
| 1034 | if (!ctrl->regs) { | 1034 | if (!ctrl->regs) { |
| 1035 | dev_err(&ofdev->dev, "failed to get memory region\n"); | 1035 | dev_err(&ofdev->dev, "failed to get memory region\n"); |
| 1036 | ret = -ENODEV; | 1036 | ret = -ENODEV; |
| 1037 | goto err; | 1037 | goto err; |
| 1038 | } | 1038 | } |
| 1039 | 1039 | ||
| 1040 | ctrl->irq = of_irq_to_resource(ofdev->node, 0, NULL); | 1040 | ctrl->irq = of_irq_to_resource(ofdev->dev.of_node, 0, NULL); |
| 1041 | if (ctrl->irq == NO_IRQ) { | 1041 | if (ctrl->irq == NO_IRQ) { |
| 1042 | dev_err(&ofdev->dev, "failed to get irq resource\n"); | 1042 | dev_err(&ofdev->dev, "failed to get irq resource\n"); |
| 1043 | ret = -ENODEV; | 1043 | ret = -ENODEV; |
| @@ -1058,7 +1058,7 @@ static int __devinit fsl_elbc_ctrl_probe(struct of_device *ofdev, | |||
| 1058 | goto err; | 1058 | goto err; |
| 1059 | } | 1059 | } |
| 1060 | 1060 | ||
| 1061 | for_each_child_of_node(ofdev->node, child) | 1061 | for_each_child_of_node(ofdev->dev.of_node, child) |
| 1062 | if (of_device_is_compatible(child, "fsl,elbc-fcm-nand")) | 1062 | if (of_device_is_compatible(child, "fsl,elbc-fcm-nand")) |
| 1063 | fsl_elbc_chip_probe(ctrl, child); | 1063 | fsl_elbc_chip_probe(ctrl, child); |
| 1064 | 1064 | ||
| @@ -1078,9 +1078,10 @@ static const struct of_device_id fsl_elbc_match[] = { | |||
| 1078 | 1078 | ||
| 1079 | static struct of_platform_driver fsl_elbc_ctrl_driver = { | 1079 | static struct of_platform_driver fsl_elbc_ctrl_driver = { |
| 1080 | .driver = { | 1080 | .driver = { |
| 1081 | .name = "fsl-elbc", | 1081 | .name = "fsl-elbc", |
| 1082 | .owner = THIS_MODULE, | ||
| 1083 | .of_match_table = fsl_elbc_match, | ||
| 1082 | }, | 1084 | }, |
| 1083 | .match_table = fsl_elbc_match, | ||
| 1084 | .probe = fsl_elbc_ctrl_probe, | 1085 | .probe = fsl_elbc_ctrl_probe, |
| 1085 | .remove = fsl_elbc_ctrl_remove, | 1086 | .remove = fsl_elbc_ctrl_remove, |
| 1086 | }; | 1087 | }; |
diff --git a/drivers/mtd/nand/fsl_upm.c b/drivers/mtd/nand/fsl_upm.c index 2d215ccb564..00aea6f7d1f 100644 --- a/drivers/mtd/nand/fsl_upm.c +++ b/drivers/mtd/nand/fsl_upm.c | |||
| @@ -360,8 +360,11 @@ static const struct of_device_id of_fun_match[] = { | |||
| 360 | MODULE_DEVICE_TABLE(of, of_fun_match); | 360 | MODULE_DEVICE_TABLE(of, of_fun_match); |
| 361 | 361 | ||
| 362 | static struct of_platform_driver of_fun_driver = { | 362 | static struct of_platform_driver of_fun_driver = { |
| 363 | .name = "fsl,upm-nand", | 363 | .driver = { |
| 364 | .match_table = of_fun_match, | 364 | .name = "fsl,upm-nand", |
| 365 | .owner = THIS_MODULE, | ||
| 366 | .of_match_table = of_fun_match, | ||
| 367 | }, | ||
| 365 | .probe = fun_probe, | 368 | .probe = fun_probe, |
| 366 | .remove = __devexit_p(fun_remove), | 369 | .remove = __devexit_p(fun_remove), |
| 367 | }; | 370 | }; |
diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c index b983cae8c29..98fd2bdf8be 100644 --- a/drivers/mtd/nand/ndfc.c +++ b/drivers/mtd/nand/ndfc.c | |||
| @@ -239,14 +239,14 @@ static int __devinit ndfc_probe(struct of_device *ofdev, | |||
| 239 | dev_set_drvdata(&ofdev->dev, ndfc); | 239 | dev_set_drvdata(&ofdev->dev, ndfc); |
| 240 | 240 | ||
| 241 | /* Read the reg property to get the chip select */ | 241 | /* Read the reg property to get the chip select */ |
| 242 | reg = of_get_property(ofdev->node, "reg", &len); | 242 | reg = of_get_property(ofdev->dev.of_node, "reg", &len); |
| 243 | if (reg == NULL || len != 12) { | 243 | if (reg == NULL || len != 12) { |
| 244 | dev_err(&ofdev->dev, "unable read reg property (%d)\n", len); | 244 | dev_err(&ofdev->dev, "unable read reg property (%d)\n", len); |
| 245 | return -ENOENT; | 245 | return -ENOENT; |
| 246 | } | 246 | } |
| 247 | ndfc->chip_select = reg[0]; | 247 | ndfc->chip_select = reg[0]; |
| 248 | 248 | ||
| 249 | ndfc->ndfcbase = of_iomap(ofdev->node, 0); | 249 | ndfc->ndfcbase = of_iomap(ofdev->dev.of_node, 0); |
| 250 | if (!ndfc->ndfcbase) { | 250 | if (!ndfc->ndfcbase) { |
| 251 | dev_err(&ofdev->dev, "failed to get memory\n"); | 251 | dev_err(&ofdev->dev, "failed to get memory\n"); |
| 252 | return -EIO; | 252 | return -EIO; |
| @@ -255,20 +255,20 @@ static int __devinit ndfc_probe(struct of_device *ofdev, | |||
| 255 | ccr = NDFC_CCR_BS(ndfc->chip_select); | 255 | ccr = NDFC_CCR_BS(ndfc->chip_select); |
| 256 | 256 | ||
| 257 | /* It is ok if ccr does not exist - just default to 0 */ | 257 | /* It is ok if ccr does not exist - just default to 0 */ |
| 258 | reg = of_get_property(ofdev->node, "ccr", NULL); | 258 | reg = of_get_property(ofdev->dev.of_node, "ccr", NULL); |
| 259 | if (reg) | 259 | if (reg) |
| 260 | ccr |= *reg; | 260 | ccr |= *reg; |
| 261 | 261 | ||
| 262 | out_be32(ndfc->ndfcbase + NDFC_CCR, ccr); | 262 | out_be32(ndfc->ndfcbase + NDFC_CCR, ccr); |
| 263 | 263 | ||
| 264 | /* Set the bank settings if given */ | 264 | /* Set the bank settings if given */ |
| 265 | reg = of_get_property(ofdev->node, "bank-settings", NULL); | 265 | reg = of_get_property(ofdev->dev.of_node, "bank-settings", NULL); |
| 266 | if (reg) { | 266 | if (reg) { |
| 267 | int offset = NDFC_BCFG0 + (ndfc->chip_select << 2); | 267 | int offset = NDFC_BCFG0 + (ndfc->chip_select << 2); |
| 268 | out_be32(ndfc->ndfcbase + offset, *reg); | 268 | out_be32(ndfc->ndfcbase + offset, *reg); |
| 269 | } | 269 | } |
| 270 | 270 | ||
| 271 | err = ndfc_chip_init(ndfc, ofdev->node); | 271 | err = ndfc_chip_init(ndfc, ofdev->dev.of_node); |
| 272 | if (err) { | 272 | if (err) { |
| 273 | iounmap(ndfc->ndfcbase); | 273 | iounmap(ndfc->ndfcbase); |
| 274 | return err; | 274 | return err; |
| @@ -294,9 +294,10 @@ MODULE_DEVICE_TABLE(of, ndfc_match); | |||
| 294 | 294 | ||
| 295 | static struct of_platform_driver ndfc_driver = { | 295 | static struct of_platform_driver ndfc_driver = { |
| 296 | .driver = { | 296 | .driver = { |
| 297 | .name = "ndfc", | 297 | .name = "ndfc", |
| 298 | .owner = THIS_MODULE, | ||
| 299 | .of_match_table = ndfc_match, | ||
| 298 | }, | 300 | }, |
| 299 | .match_table = ndfc_match, | ||
| 300 | .probe = ndfc_probe, | 301 | .probe = ndfc_probe, |
| 301 | .remove = __devexit_p(ndfc_remove), | 302 | .remove = __devexit_p(ndfc_remove), |
| 302 | }; | 303 | }; |
diff --git a/drivers/mtd/nand/pasemi_nand.c b/drivers/mtd/nand/pasemi_nand.c index 090a05c12cb..f02af24d033 100644 --- a/drivers/mtd/nand/pasemi_nand.c +++ b/drivers/mtd/nand/pasemi_nand.c | |||
| @@ -93,7 +93,7 @@ static int __devinit pasemi_nand_probe(struct of_device *ofdev, | |||
| 93 | const struct of_device_id *match) | 93 | const struct of_device_id *match) |
| 94 | { | 94 | { |
| 95 | struct pci_dev *pdev; | 95 | struct pci_dev *pdev; |
| 96 | struct device_node *np = ofdev->node; | 96 | struct device_node *np = ofdev->dev.of_node; |
| 97 | struct resource res; | 97 | struct resource res; |
| 98 | struct nand_chip *chip; | 98 | struct nand_chip *chip; |
| 99 | int err = 0; | 99 | int err = 0; |
| @@ -221,8 +221,11 @@ MODULE_DEVICE_TABLE(of, pasemi_nand_match); | |||
| 221 | 221 | ||
| 222 | static struct of_platform_driver pasemi_nand_driver = | 222 | static struct of_platform_driver pasemi_nand_driver = |
| 223 | { | 223 | { |
| 224 | .name = (char*)driver_name, | 224 | .driver = { |
| 225 | .match_table = pasemi_nand_match, | 225 | .name = (char*)driver_name, |
| 226 | .owner = THIS_MODULE, | ||
| 227 | .of_match_table = pasemi_nand_match, | ||
| 228 | }, | ||
| 226 | .probe = pasemi_nand_probe, | 229 | .probe = pasemi_nand_probe, |
| 227 | .remove = pasemi_nand_remove, | 230 | .remove = pasemi_nand_remove, |
| 228 | }; | 231 | }; |
diff --git a/drivers/mtd/nand/socrates_nand.c b/drivers/mtd/nand/socrates_nand.c index b37cbde6e7d..884852dc7eb 100644 --- a/drivers/mtd/nand/socrates_nand.c +++ b/drivers/mtd/nand/socrates_nand.c | |||
| @@ -301,8 +301,11 @@ static const struct of_device_id socrates_nand_match[] = | |||
| 301 | MODULE_DEVICE_TABLE(of, socrates_nand_match); | 301 | MODULE_DEVICE_TABLE(of, socrates_nand_match); |
| 302 | 302 | ||
| 303 | static struct of_platform_driver socrates_nand_driver = { | 303 | static struct of_platform_driver socrates_nand_driver = { |
| 304 | .name = "socrates_nand", | 304 | .driver = { |
| 305 | .match_table = socrates_nand_match, | 305 | .name = "socrates_nand", |
| 306 | .owner = THIS_MODULE, | ||
| 307 | .of_match_table = socrates_nand_match, | ||
| 308 | }, | ||
| 306 | .probe = socrates_nand_probe, | 309 | .probe = socrates_nand_probe, |
| 307 | .remove = __devexit_p(socrates_nand_remove), | 310 | .remove = __devexit_p(socrates_nand_remove), |
| 308 | }; | 311 | }; |
diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c index 225fd147774..8af8442c694 100644 --- a/drivers/net/can/mscan/mpc5xxx_can.c +++ b/drivers/net/can/mscan/mpc5xxx_can.c | |||
| @@ -392,15 +392,17 @@ static struct of_device_id __devinitdata mpc5xxx_can_table[] = { | |||
| 392 | }; | 392 | }; |
| 393 | 393 | ||
| 394 | static struct of_platform_driver mpc5xxx_can_driver = { | 394 | static struct of_platform_driver mpc5xxx_can_driver = { |
| 395 | .owner = THIS_MODULE, | 395 | .driver = { |
| 396 | .name = "mpc5xxx_can", | 396 | .name = "mpc5xxx_can", |
| 397 | .owner = THIS_MODULE, | ||
| 398 | .of_match_table = mpc5xxx_can_table, | ||
| 399 | }, | ||
| 397 | .probe = mpc5xxx_can_probe, | 400 | .probe = mpc5xxx_can_probe, |
| 398 | .remove = __devexit_p(mpc5xxx_can_remove), | 401 | .remove = __devexit_p(mpc5xxx_can_remove), |
| 399 | #ifdef CONFIG_PM | 402 | #ifdef CONFIG_PM |
| 400 | .suspend = mpc5xxx_can_suspend, | 403 | .suspend = mpc5xxx_can_suspend, |
| 401 | .resume = mpc5xxx_can_resume, | 404 | .resume = mpc5xxx_can_resume, |
| 402 | #endif | 405 | #endif |
| 403 | .match_table = mpc5xxx_can_table, | ||
| 404 | }; | 406 | }; |
| 405 | 407 | ||
| 406 | static int __init mpc5xxx_can_init(void) | 408 | static int __init mpc5xxx_can_init(void) |
diff --git a/drivers/net/can/sja1000/sja1000_of_platform.c b/drivers/net/can/sja1000/sja1000_of_platform.c index 34e79efbd2f..ac1a83d7c20 100644 --- a/drivers/net/can/sja1000/sja1000_of_platform.c +++ b/drivers/net/can/sja1000/sja1000_of_platform.c | |||
| @@ -71,7 +71,7 @@ static int __devexit sja1000_ofp_remove(struct of_device *ofdev) | |||
| 71 | { | 71 | { |
| 72 | struct net_device *dev = dev_get_drvdata(&ofdev->dev); | 72 | struct net_device *dev = dev_get_drvdata(&ofdev->dev); |
| 73 | struct sja1000_priv *priv = netdev_priv(dev); | 73 | struct sja1000_priv *priv = netdev_priv(dev); |
| 74 | struct device_node *np = ofdev->node; | 74 | struct device_node *np = ofdev->dev.of_node; |
| 75 | struct resource res; | 75 | struct resource res; |
| 76 | 76 | ||
| 77 | dev_set_drvdata(&ofdev->dev, NULL); | 77 | dev_set_drvdata(&ofdev->dev, NULL); |
| @@ -90,7 +90,7 @@ static int __devexit sja1000_ofp_remove(struct of_device *ofdev) | |||
| 90 | static int __devinit sja1000_ofp_probe(struct of_device *ofdev, | 90 | static int __devinit sja1000_ofp_probe(struct of_device *ofdev, |
| 91 | const struct of_device_id *id) | 91 | const struct of_device_id *id) |
| 92 | { | 92 | { |
| 93 | struct device_node *np = ofdev->node; | 93 | struct device_node *np = ofdev->dev.of_node; |
| 94 | struct net_device *dev; | 94 | struct net_device *dev; |
| 95 | struct sja1000_priv *priv; | 95 | struct sja1000_priv *priv; |
| 96 | struct resource res; | 96 | struct resource res; |
| @@ -215,11 +215,13 @@ static struct of_device_id __devinitdata sja1000_ofp_table[] = { | |||
| 215 | MODULE_DEVICE_TABLE(of, sja1000_ofp_table); | 215 | MODULE_DEVICE_TABLE(of, sja1000_ofp_table); |
| 216 | 216 | ||
| 217 | static struct of_platform_driver sja1000_ofp_driver = { | 217 | static struct of_platform_driver sja1000_ofp_driver = { |
| 218 | .owner = THIS_MODULE, | 218 | .driver = { |
| 219 | .name = DRV_NAME, | 219 | .owner = THIS_MODULE, |
| 220 | .name = DRV_NAME, | ||
| 221 | .of_match_table = sja1000_ofp_table, | ||
| 222 | }, | ||
| 220 | .probe = sja1000_ofp_probe, | 223 | .probe = sja1000_ofp_probe, |
| 221 | .remove = __devexit_p(sja1000_ofp_remove), | 224 | .remove = __devexit_p(sja1000_ofp_remove), |
| 222 | .match_table = sja1000_ofp_table, | ||
| 223 | }; | 225 | }; |
| 224 | 226 | ||
| 225 | static int __init sja1000_ofp_init(void) | 227 | static int __init sja1000_ofp_init(void) |
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 02698a1c80b..f547894ff48 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c | |||
| @@ -122,8 +122,11 @@ static struct of_device_id ehea_device_table[] = { | |||
| 122 | MODULE_DEVICE_TABLE(of, ehea_device_table); | 122 | MODULE_DEVICE_TABLE(of, ehea_device_table); |
| 123 | 123 | ||
| 124 | static struct of_platform_driver ehea_driver = { | 124 | static struct of_platform_driver ehea_driver = { |
| 125 | .name = "ehea", | 125 | .driver = { |
| 126 | .match_table = ehea_device_table, | 126 | .name = "ehea", |
| 127 | .owner = THIS_MODULE, | ||
| 128 | .of_match_table = ehea_device_table, | ||
| 129 | }, | ||
| 127 | .probe = ehea_probe_adapter, | 130 | .probe = ehea_probe_adapter, |
| 128 | .remove = ehea_remove, | 131 | .remove = ehea_remove, |
| 129 | }; | 132 | }; |
| @@ -3050,7 +3053,7 @@ static DEVICE_ATTR(log_port_id, S_IRUSR | S_IRGRP | S_IROTH, ehea_show_port_id, | |||
| 3050 | static void __devinit logical_port_release(struct device *dev) | 3053 | static void __devinit logical_port_release(struct device *dev) |
| 3051 | { | 3054 | { |
| 3052 | struct ehea_port *port = container_of(dev, struct ehea_port, ofdev.dev); | 3055 | struct ehea_port *port = container_of(dev, struct ehea_port, ofdev.dev); |
| 3053 | of_node_put(port->ofdev.node); | 3056 | of_node_put(port->ofdev.dev.of_node); |
| 3054 | } | 3057 | } |
| 3055 | 3058 | ||
| 3056 | static struct device *ehea_register_port(struct ehea_port *port, | 3059 | static struct device *ehea_register_port(struct ehea_port *port, |
| @@ -3058,7 +3061,7 @@ static struct device *ehea_register_port(struct ehea_port *port, | |||
| 3058 | { | 3061 | { |
| 3059 | int ret; | 3062 | int ret; |
| 3060 | 3063 | ||
| 3061 | port->ofdev.node = of_node_get(dn); | 3064 | port->ofdev.dev.of_node = of_node_get(dn); |
| 3062 | port->ofdev.dev.parent = &port->adapter->ofdev->dev; | 3065 | port->ofdev.dev.parent = &port->adapter->ofdev->dev; |
| 3063 | port->ofdev.dev.bus = &ibmebus_bus_type; | 3066 | port->ofdev.dev.bus = &ibmebus_bus_type; |
| 3064 | 3067 | ||
| @@ -3225,7 +3228,7 @@ static int ehea_setup_ports(struct ehea_adapter *adapter) | |||
| 3225 | const u32 *dn_log_port_id; | 3228 | const u32 *dn_log_port_id; |
| 3226 | int i = 0; | 3229 | int i = 0; |
| 3227 | 3230 | ||
| 3228 | lhea_dn = adapter->ofdev->node; | 3231 | lhea_dn = adapter->ofdev->dev.of_node; |
| 3229 | while ((eth_dn = of_get_next_child(lhea_dn, eth_dn))) { | 3232 | while ((eth_dn = of_get_next_child(lhea_dn, eth_dn))) { |
| 3230 | 3233 | ||
| 3231 | dn_log_port_id = of_get_property(eth_dn, "ibm,hea-port-no", | 3234 | dn_log_port_id = of_get_property(eth_dn, "ibm,hea-port-no", |
| @@ -3264,7 +3267,7 @@ static struct device_node *ehea_get_eth_dn(struct ehea_adapter *adapter, | |||
| 3264 | struct device_node *eth_dn = NULL; | 3267 | struct device_node *eth_dn = NULL; |
| 3265 | const u32 *dn_log_port_id; | 3268 | const u32 *dn_log_port_id; |
| 3266 | 3269 | ||
| 3267 | lhea_dn = adapter->ofdev->node; | 3270 | lhea_dn = adapter->ofdev->dev.of_node; |
| 3268 | while ((eth_dn = of_get_next_child(lhea_dn, eth_dn))) { | 3271 | while ((eth_dn = of_get_next_child(lhea_dn, eth_dn))) { |
| 3269 | 3272 | ||
| 3270 | dn_log_port_id = of_get_property(eth_dn, "ibm,hea-port-no", | 3273 | dn_log_port_id = of_get_property(eth_dn, "ibm,hea-port-no", |
| @@ -3394,7 +3397,7 @@ static int __devinit ehea_probe_adapter(struct of_device *dev, | |||
| 3394 | const u64 *adapter_handle; | 3397 | const u64 *adapter_handle; |
| 3395 | int ret; | 3398 | int ret; |
| 3396 | 3399 | ||
| 3397 | if (!dev || !dev->node) { | 3400 | if (!dev || !dev->dev.of_node) { |
| 3398 | ehea_error("Invalid ibmebus device probed"); | 3401 | ehea_error("Invalid ibmebus device probed"); |
| 3399 | return -EINVAL; | 3402 | return -EINVAL; |
| 3400 | } | 3403 | } |
| @@ -3410,14 +3413,14 @@ static int __devinit ehea_probe_adapter(struct of_device *dev, | |||
| 3410 | 3413 | ||
| 3411 | adapter->ofdev = dev; | 3414 | adapter->ofdev = dev; |
| 3412 | 3415 | ||
| 3413 | adapter_handle = of_get_property(dev->node, "ibm,hea-handle", | 3416 | adapter_handle = of_get_property(dev->dev.of_node, "ibm,hea-handle", |
| 3414 | NULL); | 3417 | NULL); |
| 3415 | if (adapter_handle) | 3418 | if (adapter_handle) |
| 3416 | adapter->handle = *adapter_handle; | 3419 | adapter->handle = *adapter_handle; |
| 3417 | 3420 | ||
| 3418 | if (!adapter->handle) { | 3421 | if (!adapter->handle) { |
| 3419 | dev_err(&dev->dev, "failed getting handle for adapter" | 3422 | dev_err(&dev->dev, "failed getting handle for adapter" |
| 3420 | " '%s'\n", dev->node->full_name); | 3423 | " '%s'\n", dev->dev.of_node->full_name); |
| 3421 | ret = -ENODEV; | 3424 | ret = -ENODEV; |
| 3422 | goto out_free_ad; | 3425 | goto out_free_ad; |
| 3423 | } | 3426 | } |
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c index 221f440c10f..25e6cc6840b 100644 --- a/drivers/net/fec_mpc52xx.c +++ b/drivers/net/fec_mpc52xx.c | |||
| @@ -871,7 +871,7 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match) | |||
| 871 | priv->ndev = ndev; | 871 | priv->ndev = ndev; |
| 872 | 872 | ||
| 873 | /* Reserve FEC control zone */ | 873 | /* Reserve FEC control zone */ |
| 874 | rv = of_address_to_resource(op->node, 0, &mem); | 874 | rv = of_address_to_resource(op->dev.of_node, 0, &mem); |
| 875 | if (rv) { | 875 | if (rv) { |
| 876 | printk(KERN_ERR DRIVER_NAME ": " | 876 | printk(KERN_ERR DRIVER_NAME ": " |
| 877 | "Error while parsing device node resource\n" ); | 877 | "Error while parsing device node resource\n" ); |
| @@ -919,7 +919,7 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match) | |||
| 919 | 919 | ||
| 920 | /* Get the IRQ we need one by one */ | 920 | /* Get the IRQ we need one by one */ |
| 921 | /* Control */ | 921 | /* Control */ |
| 922 | ndev->irq = irq_of_parse_and_map(op->node, 0); | 922 | ndev->irq = irq_of_parse_and_map(op->dev.of_node, 0); |
| 923 | 923 | ||
| 924 | /* RX */ | 924 | /* RX */ |
| 925 | priv->r_irq = bcom_get_task_irq(priv->rx_dmatsk); | 925 | priv->r_irq = bcom_get_task_irq(priv->rx_dmatsk); |
| @@ -942,20 +942,20 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match) | |||
| 942 | /* Start with safe defaults for link connection */ | 942 | /* Start with safe defaults for link connection */ |
| 943 | priv->speed = 100; | 943 | priv->speed = 100; |
| 944 | priv->duplex = DUPLEX_HALF; | 944 | priv->duplex = DUPLEX_HALF; |
| 945 | priv->mdio_speed = ((mpc5xxx_get_bus_frequency(op->node) >> 20) / 5) << 1; | 945 | priv->mdio_speed = ((mpc5xxx_get_bus_frequency(op->dev.of_node) >> 20) / 5) << 1; |
| 946 | 946 | ||
| 947 | /* The current speed preconfigures the speed of the MII link */ | 947 | /* The current speed preconfigures the speed of the MII link */ |
| 948 | prop = of_get_property(op->node, "current-speed", &prop_size); | 948 | prop = of_get_property(op->dev.of_node, "current-speed", &prop_size); |
| 949 | if (prop && (prop_size >= sizeof(u32) * 2)) { | 949 | if (prop && (prop_size >= sizeof(u32) * 2)) { |
| 950 | priv->speed = prop[0]; | 950 | priv->speed = prop[0]; |
| 951 | priv->duplex = prop[1] ? DUPLEX_FULL : DUPLEX_HALF; | 951 | priv->duplex = prop[1] ? DUPLEX_FULL : DUPLEX_HALF; |
| 952 | } | 952 | } |
| 953 | 953 | ||
| 954 | /* If there is a phy handle, then get the PHY node */ | 954 | /* If there is a phy handle, then get the PHY node */ |
| 955 | priv->phy_node = of_parse_phandle(op->node, "phy-handle", 0); | 955 | priv->phy_node = of_parse_phandle(op->dev.of_node, "phy-handle", 0); |
| 956 | 956 | ||
| 957 | /* the 7-wire property means don't use MII mode */ | 957 | /* the 7-wire property means don't use MII mode */ |
| 958 | if (of_find_property(op->node, "fsl,7-wire-mode", NULL)) { | 958 | if (of_find_property(op->dev.of_node, "fsl,7-wire-mode", NULL)) { |
| 959 | priv->seven_wire_mode = 1; | 959 | priv->seven_wire_mode = 1; |
| 960 | dev_info(&ndev->dev, "using 7-wire PHY mode\n"); | 960 | dev_info(&ndev->dev, "using 7-wire PHY mode\n"); |
| 961 | } | 961 | } |
| @@ -1063,9 +1063,11 @@ static struct of_device_id mpc52xx_fec_match[] = { | |||
| 1063 | MODULE_DEVICE_TABLE(of, mpc52xx_fec_match); | 1063 | MODULE_DEVICE_TABLE(of, mpc52xx_fec_match); |
| 1064 | 1064 | ||
| 1065 | static struct of_platform_driver mpc52xx_fec_driver = { | 1065 | static struct of_platform_driver mpc52xx_fec_driver = { |
| 1066 | .owner = THIS_MODULE, | 1066 | .driver = { |
| 1067 | .name = DRIVER_NAME, | 1067 | .name = DRIVER_NAME, |
| 1068 | .match_table = mpc52xx_fec_match, | 1068 | .owner = THIS_MODULE, |
| 1069 | .of_match_table = mpc52xx_fec_match, | ||
| 1070 | }, | ||
| 1069 | .probe = mpc52xx_fec_probe, | 1071 | .probe = mpc52xx_fec_probe, |
| 1070 | .remove = mpc52xx_fec_remove, | 1072 | .remove = mpc52xx_fec_remove, |
| 1071 | #ifdef CONFIG_PM | 1073 | #ifdef CONFIG_PM |
diff --git a/drivers/net/fec_mpc52xx_phy.c b/drivers/net/fec_mpc52xx_phy.c index 7658a082e39..006f64d9f96 100644 --- a/drivers/net/fec_mpc52xx_phy.c +++ b/drivers/net/fec_mpc52xx_phy.c | |||
| @@ -66,7 +66,7 @@ static int mpc52xx_fec_mdio_probe(struct of_device *of, | |||
| 66 | const struct of_device_id *match) | 66 | const struct of_device_id *match) |
| 67 | { | 67 | { |
| 68 | struct device *dev = &of->dev; | 68 | struct device *dev = &of->dev; |
| 69 | struct device_node *np = of->node; | 69 | struct device_node *np = of->dev.of_node; |
| 70 | struct mii_bus *bus; | 70 | struct mii_bus *bus; |
| 71 | struct mpc52xx_fec_mdio_priv *priv; | 71 | struct mpc52xx_fec_mdio_priv *priv; |
| 72 | struct resource res = {}; | 72 | struct resource res = {}; |
| @@ -107,7 +107,7 @@ static int mpc52xx_fec_mdio_probe(struct of_device *of, | |||
| 107 | 107 | ||
| 108 | /* set MII speed */ | 108 | /* set MII speed */ |
| 109 | out_be32(&priv->regs->mii_speed, | 109 | out_be32(&priv->regs->mii_speed, |
| 110 | ((mpc5xxx_get_bus_frequency(of->node) >> 20) / 5) << 1); | 110 | ((mpc5xxx_get_bus_frequency(of->dev.of_node) >> 20) / 5) << 1); |
| 111 | 111 | ||
| 112 | err = of_mdiobus_register(bus, np); | 112 | err = of_mdiobus_register(bus, np); |
| 113 | if (err) | 113 | if (err) |
| @@ -159,10 +159,13 @@ static struct of_device_id mpc52xx_fec_mdio_match[] = { | |||
| 159 | MODULE_DEVICE_TABLE(of, mpc52xx_fec_mdio_match); | 159 | MODULE_DEVICE_TABLE(of, mpc52xx_fec_mdio_match); |
| 160 | 160 | ||
| 161 | struct of_platform_driver mpc52xx_fec_mdio_driver = { | 161 | struct of_platform_driver mpc52xx_fec_mdio_driver = { |
| 162 | .name = "mpc5200b-fec-phy", | 162 | .driver = { |
| 163 | .name = "mpc5200b-fec-phy", | ||
| 164 | .owner = THIS_MODULE, | ||
| 165 | .of_match_table = mpc52xx_fec_mdio_match, | ||
| 166 | }, | ||
| 163 | .probe = mpc52xx_fec_mdio_probe, | 167 | .probe = mpc52xx_fec_mdio_probe, |
| 164 | .remove = mpc52xx_fec_mdio_remove, | 168 | .remove = mpc52xx_fec_mdio_remove, |
| 165 | .match_table = mpc52xx_fec_mdio_match, | ||
| 166 | }; | 169 | }; |
| 167 | 170 | ||
| 168 | /* let fec driver call it, since this has to be registered before it */ | 171 | /* let fec driver call it, since this has to be registered before it */ |
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c index 0fb0fefcb78..309a0eaddd8 100644 --- a/drivers/net/fs_enet/fs_enet-main.c +++ b/drivers/net/fs_enet/fs_enet-main.c | |||
| @@ -1013,7 +1013,7 @@ static int __devinit fs_enet_probe(struct of_device *ofdev, | |||
| 1013 | return -ENOMEM; | 1013 | return -ENOMEM; |
| 1014 | 1014 | ||
| 1015 | if (!IS_FEC(match)) { | 1015 | if (!IS_FEC(match)) { |
| 1016 | data = of_get_property(ofdev->node, "fsl,cpm-command", &len); | 1016 | data = of_get_property(ofdev->dev.of_node, "fsl,cpm-command", &len); |
| 1017 | if (!data || len != 4) | 1017 | if (!data || len != 4) |
| 1018 | goto out_free_fpi; | 1018 | goto out_free_fpi; |
| 1019 | 1019 | ||
| @@ -1025,8 +1025,8 @@ static int __devinit fs_enet_probe(struct of_device *ofdev, | |||
| 1025 | fpi->rx_copybreak = 240; | 1025 | fpi->rx_copybreak = 240; |
| 1026 | fpi->use_napi = 1; | 1026 | fpi->use_napi = 1; |
| 1027 | fpi->napi_weight = 17; | 1027 | fpi->napi_weight = 17; |
| 1028 | fpi->phy_node = of_parse_phandle(ofdev->node, "phy-handle", 0); | 1028 | fpi->phy_node = of_parse_phandle(ofdev->dev.of_node, "phy-handle", 0); |
| 1029 | if ((!fpi->phy_node) && (!of_get_property(ofdev->node, "fixed-link", | 1029 | if ((!fpi->phy_node) && (!of_get_property(ofdev->dev.of_node, "fixed-link", |
| 1030 | NULL))) | 1030 | NULL))) |
| 1031 | goto out_free_fpi; | 1031 | goto out_free_fpi; |
| 1032 | 1032 | ||
| @@ -1059,7 +1059,7 @@ static int __devinit fs_enet_probe(struct of_device *ofdev, | |||
| 1059 | spin_lock_init(&fep->lock); | 1059 | spin_lock_init(&fep->lock); |
| 1060 | spin_lock_init(&fep->tx_lock); | 1060 | spin_lock_init(&fep->tx_lock); |
| 1061 | 1061 | ||
| 1062 | mac_addr = of_get_mac_address(ofdev->node); | 1062 | mac_addr = of_get_mac_address(ofdev->dev.of_node); |
| 1063 | if (mac_addr) | 1063 | if (mac_addr) |
| 1064 | memcpy(ndev->dev_addr, mac_addr, 6); | 1064 | memcpy(ndev->dev_addr, mac_addr, 6); |
| 1065 | 1065 | ||
| @@ -1156,8 +1156,11 @@ static struct of_device_id fs_enet_match[] = { | |||
| 1156 | MODULE_DEVICE_TABLE(of, fs_enet_match); | 1156 | MODULE_DEVICE_TABLE(of, fs_enet_match); |
| 1157 | 1157 | ||
| 1158 | static struct of_platform_driver fs_enet_driver = { | 1158 | static struct of_platform_driver fs_enet_driver = { |
| 1159 | .name = "fs_enet", | 1159 | .driver = { |
| 1160 | .match_table = fs_enet_match, | 1160 | .owner = THIS_MODULE, |
| 1161 | .name = "fs_enet", | ||
| 1162 | .of_match_table = fs_enet_match, | ||
| 1163 | }, | ||
| 1161 | .probe = fs_enet_probe, | 1164 | .probe = fs_enet_probe, |
| 1162 | .remove = fs_enet_remove, | 1165 | .remove = fs_enet_remove, |
| 1163 | }; | 1166 | }; |
diff --git a/drivers/net/fs_enet/mac-fcc.c b/drivers/net/fs_enet/mac-fcc.c index 714da967fa1..5d45084b287 100644 --- a/drivers/net/fs_enet/mac-fcc.c +++ b/drivers/net/fs_enet/mac-fcc.c | |||
| @@ -88,19 +88,19 @@ static int do_pd_setup(struct fs_enet_private *fep) | |||
| 88 | struct fs_platform_info *fpi = fep->fpi; | 88 | struct fs_platform_info *fpi = fep->fpi; |
| 89 | int ret = -EINVAL; | 89 | int ret = -EINVAL; |
| 90 | 90 | ||
| 91 | fep->interrupt = of_irq_to_resource(ofdev->node, 0, NULL); | 91 | fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL); |
| 92 | if (fep->interrupt == NO_IRQ) | 92 | if (fep->interrupt == NO_IRQ) |
| 93 | goto out; | 93 | goto out; |
| 94 | 94 | ||
| 95 | fep->fcc.fccp = of_iomap(ofdev->node, 0); | 95 | fep->fcc.fccp = of_iomap(ofdev->dev.of_node, 0); |
| 96 | if (!fep->fcc.fccp) | 96 | if (!fep->fcc.fccp) |
| 97 | goto out; | 97 | goto out; |
| 98 | 98 | ||
| 99 | fep->fcc.ep = of_iomap(ofdev->node, 1); | 99 | fep->fcc.ep = of_iomap(ofdev->dev.of_node, 1); |
| 100 | if (!fep->fcc.ep) | 100 | if (!fep->fcc.ep) |
| 101 | goto out_fccp; | 101 | goto out_fccp; |
| 102 | 102 | ||
| 103 | fep->fcc.fcccp = of_iomap(ofdev->node, 2); | 103 | fep->fcc.fcccp = of_iomap(ofdev->dev.of_node, 2); |
| 104 | if (!fep->fcc.fcccp) | 104 | if (!fep->fcc.fcccp) |
| 105 | goto out_ep; | 105 | goto out_ep; |
| 106 | 106 | ||
diff --git a/drivers/net/fs_enet/mac-fec.c b/drivers/net/fs_enet/mac-fec.c index 7eff92ef01d..7ca1642276d 100644 --- a/drivers/net/fs_enet/mac-fec.c +++ b/drivers/net/fs_enet/mac-fec.c | |||
| @@ -98,11 +98,11 @@ static int do_pd_setup(struct fs_enet_private *fep) | |||
| 98 | { | 98 | { |
| 99 | struct of_device *ofdev = to_of_device(fep->dev); | 99 | struct of_device *ofdev = to_of_device(fep->dev); |
| 100 | 100 | ||
| 101 | fep->interrupt = of_irq_to_resource(ofdev->node, 0, NULL); | 101 | fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL); |
| 102 | if (fep->interrupt == NO_IRQ) | 102 | if (fep->interrupt == NO_IRQ) |
| 103 | return -EINVAL; | 103 | return -EINVAL; |
| 104 | 104 | ||
| 105 | fep->fec.fecp = of_iomap(ofdev->node, 0); | 105 | fep->fec.fecp = of_iomap(ofdev->dev.of_node, 0); |
| 106 | if (!fep->fcc.fccp) | 106 | if (!fep->fcc.fccp) |
| 107 | return -EINVAL; | 107 | return -EINVAL; |
| 108 | 108 | ||
diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c index 7f0591e43cd..a3c44544846 100644 --- a/drivers/net/fs_enet/mac-scc.c +++ b/drivers/net/fs_enet/mac-scc.c | |||
| @@ -98,15 +98,15 @@ static int do_pd_setup(struct fs_enet_private *fep) | |||
| 98 | { | 98 | { |
| 99 | struct of_device *ofdev = to_of_device(fep->dev); | 99 | struct of_device *ofdev = to_of_device(fep->dev); |
| 100 | 100 | ||
| 101 | fep->interrupt = of_irq_to_resource(ofdev->node, 0, NULL); | 101 | fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL); |
| 102 | if (fep->interrupt == NO_IRQ) | 102 | if (fep->interrupt == NO_IRQ) |
| 103 | return -EINVAL; | 103 | return -EINVAL; |
| 104 | 104 | ||
| 105 | fep->scc.sccp = of_iomap(ofdev->node, 0); | 105 | fep->scc.sccp = of_iomap(ofdev->dev.of_node, 0); |
| 106 | if (!fep->scc.sccp) | 106 | if (!fep->scc.sccp) |
| 107 | return -EINVAL; | 107 | return -EINVAL; |
| 108 | 108 | ||
| 109 | fep->scc.ep = of_iomap(ofdev->node, 1); | 109 | fep->scc.ep = of_iomap(ofdev->dev.of_node, 1); |
| 110 | if (!fep->scc.ep) { | 110 | if (!fep->scc.ep) { |
| 111 | iounmap(fep->scc.sccp); | 111 | iounmap(fep->scc.sccp); |
| 112 | return -EINVAL; | 112 | return -EINVAL; |
diff --git a/drivers/net/fs_enet/mii-bitbang.c b/drivers/net/fs_enet/mii-bitbang.c index 24ff9f43a62..0f90685d3d1 100644 --- a/drivers/net/fs_enet/mii-bitbang.c +++ b/drivers/net/fs_enet/mii-bitbang.c | |||
| @@ -224,8 +224,11 @@ static struct of_device_id fs_enet_mdio_bb_match[] = { | |||
| 224 | MODULE_DEVICE_TABLE(of, fs_enet_mdio_bb_match); | 224 | MODULE_DEVICE_TABLE(of, fs_enet_mdio_bb_match); |
| 225 | 225 | ||
| 226 | static struct of_platform_driver fs_enet_bb_mdio_driver = { | 226 | static struct of_platform_driver fs_enet_bb_mdio_driver = { |
| 227 | .name = "fsl-bb-mdio", | 227 | .driver = { |
| 228 | .match_table = fs_enet_mdio_bb_match, | 228 | .name = "fsl-bb-mdio", |
| 229 | .owner = THIS_MODULE, | ||
| 230 | .of_match_table = fs_enet_mdio_bb_match, | ||
| 231 | }, | ||
| 229 | .probe = fs_enet_mdio_probe, | 232 | .probe = fs_enet_mdio_probe, |
| 230 | .remove = fs_enet_mdio_remove, | 233 | .remove = fs_enet_mdio_remove, |
| 231 | }; | 234 | }; |
diff --git a/drivers/net/fs_enet/mii-fec.c b/drivers/net/fs_enet/mii-fec.c index 5944b65082c..bddffd169b9 100644 --- a/drivers/net/fs_enet/mii-fec.c +++ b/drivers/net/fs_enet/mii-fec.c | |||
| @@ -124,7 +124,7 @@ static int __devinit fs_enet_mdio_probe(struct of_device *ofdev, | |||
| 124 | new_bus->write = &fs_enet_fec_mii_write; | 124 | new_bus->write = &fs_enet_fec_mii_write; |
| 125 | new_bus->reset = &fs_enet_fec_mii_reset; | 125 | new_bus->reset = &fs_enet_fec_mii_reset; |
| 126 | 126 | ||
| 127 | ret = of_address_to_resource(ofdev->node, 0, &res); | 127 | ret = of_address_to_resource(ofdev->dev.of_node, 0, &res); |
| 128 | if (ret) | 128 | if (ret) |
| 129 | goto out_res; | 129 | goto out_res; |
| 130 | 130 | ||
| @@ -135,7 +135,7 @@ static int __devinit fs_enet_mdio_probe(struct of_device *ofdev, | |||
| 135 | goto out_fec; | 135 | goto out_fec; |
| 136 | 136 | ||
| 137 | if (get_bus_freq) { | 137 | if (get_bus_freq) { |
| 138 | clock = get_bus_freq(ofdev->node); | 138 | clock = get_bus_freq(ofdev->dev.of_node); |
| 139 | if (!clock) { | 139 | if (!clock) { |
| 140 | /* Use maximum divider if clock is unknown */ | 140 | /* Use maximum divider if clock is unknown */ |
| 141 | dev_warn(&ofdev->dev, "could not determine IPS clock\n"); | 141 | dev_warn(&ofdev->dev, "could not determine IPS clock\n"); |
| @@ -172,7 +172,7 @@ static int __devinit fs_enet_mdio_probe(struct of_device *ofdev, | |||
| 172 | new_bus->parent = &ofdev->dev; | 172 | new_bus->parent = &ofdev->dev; |
| 173 | dev_set_drvdata(&ofdev->dev, new_bus); | 173 | dev_set_drvdata(&ofdev->dev, new_bus); |
| 174 | 174 | ||
| 175 | ret = of_mdiobus_register(new_bus, ofdev->node); | 175 | ret = of_mdiobus_register(new_bus, ofdev->dev.of_node); |
| 176 | if (ret) | 176 | if (ret) |
| 177 | goto out_free_irqs; | 177 | goto out_free_irqs; |
| 178 | 178 | ||
| @@ -222,8 +222,11 @@ static struct of_device_id fs_enet_mdio_fec_match[] = { | |||
| 222 | MODULE_DEVICE_TABLE(of, fs_enet_mdio_fec_match); | 222 | MODULE_DEVICE_TABLE(of, fs_enet_mdio_fec_match); |
| 223 | 223 | ||
| 224 | static struct of_platform_driver fs_enet_fec_mdio_driver = { | 224 | static struct of_platform_driver fs_enet_fec_mdio_driver = { |
| 225 | .name = "fsl-fec-mdio", | 225 | .driver = { |
| 226 | .match_table = fs_enet_mdio_fec_match, | 226 | .name = "fsl-fec-mdio", |
| 227 | .owner = THIS_MODULE, | ||
| 228 | .of_match_table = fs_enet_mdio_fec_match, | ||
| 229 | }, | ||
| 227 | .probe = fs_enet_mdio_probe, | 230 | .probe = fs_enet_mdio_probe, |
| 228 | .remove = fs_enet_mdio_remove, | 231 | .remove = fs_enet_mdio_remove, |
| 229 | }; | 232 | }; |
diff --git a/drivers/net/fsl_pq_mdio.c b/drivers/net/fsl_pq_mdio.c index ff028f59b93..b4c41d72c42 100644 --- a/drivers/net/fsl_pq_mdio.c +++ b/drivers/net/fsl_pq_mdio.c | |||
| @@ -267,7 +267,7 @@ static int get_ucc_id_for_range(u64 start, u64 end, u32 *ucc_id) | |||
| 267 | static int fsl_pq_mdio_probe(struct of_device *ofdev, | 267 | static int fsl_pq_mdio_probe(struct of_device *ofdev, |
| 268 | const struct of_device_id *match) | 268 | const struct of_device_id *match) |
| 269 | { | 269 | { |
| 270 | struct device_node *np = ofdev->node; | 270 | struct device_node *np = ofdev->dev.of_node; |
| 271 | struct device_node *tbi; | 271 | struct device_node *tbi; |
| 272 | struct fsl_pq_mdio_priv *priv; | 272 | struct fsl_pq_mdio_priv *priv; |
| 273 | struct fsl_pq_mdio __iomem *regs = NULL; | 273 | struct fsl_pq_mdio __iomem *regs = NULL; |
| @@ -471,10 +471,13 @@ static struct of_device_id fsl_pq_mdio_match[] = { | |||
| 471 | MODULE_DEVICE_TABLE(of, fsl_pq_mdio_match); | 471 | MODULE_DEVICE_TABLE(of, fsl_pq_mdio_match); |
| 472 | 472 | ||
| 473 | static struct of_platform_driver fsl_pq_mdio_driver = { | 473 | static struct of_platform_driver fsl_pq_mdio_driver = { |
| 474 | .name = "fsl-pq_mdio", | 474 | .driver = { |
| 475 | .name = "fsl-pq_mdio", | ||
| 476 | .owner = THIS_MODULE, | ||
| 477 | .of_match_table = fsl_pq_mdio_match, | ||
| 478 | }, | ||
| 475 | .probe = fsl_pq_mdio_probe, | 479 | .probe = fsl_pq_mdio_probe, |
| 476 | .remove = fsl_pq_mdio_remove, | 480 | .remove = fsl_pq_mdio_remove, |
| 477 | .match_table = fsl_pq_mdio_match, | ||
| 478 | }; | 481 | }; |
| 479 | 482 | ||
| 480 | int __init fsl_pq_mdio_init(void) | 483 | int __init fsl_pq_mdio_init(void) |
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index c6791cd4ee0..1830f3199cb 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
| @@ -608,7 +608,7 @@ static int gfar_of_init(struct of_device *ofdev, struct net_device **pdev) | |||
| 608 | int err = 0, i; | 608 | int err = 0, i; |
| 609 | struct net_device *dev = NULL; | 609 | struct net_device *dev = NULL; |
| 610 | struct gfar_private *priv = NULL; | 610 | struct gfar_private *priv = NULL; |
| 611 | struct device_node *np = ofdev->node; | 611 | struct device_node *np = ofdev->dev.of_node; |
| 612 | struct device_node *child = NULL; | 612 | struct device_node *child = NULL; |
| 613 | const u32 *stash; | 613 | const u32 *stash; |
| 614 | const u32 *stash_len; | 614 | const u32 *stash_len; |
| @@ -646,7 +646,7 @@ static int gfar_of_init(struct of_device *ofdev, struct net_device **pdev) | |||
| 646 | return -ENOMEM; | 646 | return -ENOMEM; |
| 647 | 647 | ||
| 648 | priv = netdev_priv(dev); | 648 | priv = netdev_priv(dev); |
| 649 | priv->node = ofdev->node; | 649 | priv->node = ofdev->dev.of_node; |
| 650 | priv->ndev = dev; | 650 | priv->ndev = dev; |
| 651 | 651 | ||
| 652 | dev->num_tx_queues = num_tx_qs; | 652 | dev->num_tx_queues = num_tx_qs; |
| @@ -939,7 +939,7 @@ static int gfar_probe(struct of_device *ofdev, | |||
| 939 | priv = netdev_priv(dev); | 939 | priv = netdev_priv(dev); |
| 940 | priv->ndev = dev; | 940 | priv->ndev = dev; |
| 941 | priv->ofdev = ofdev; | 941 | priv->ofdev = ofdev; |
| 942 | priv->node = ofdev->node; | 942 | priv->node = ofdev->dev.of_node; |
| 943 | SET_NETDEV_DEV(dev, &ofdev->dev); | 943 | SET_NETDEV_DEV(dev, &ofdev->dev); |
| 944 | 944 | ||
| 945 | spin_lock_init(&priv->bflock); | 945 | spin_lock_init(&priv->bflock); |
| @@ -3167,12 +3167,14 @@ MODULE_DEVICE_TABLE(of, gfar_match); | |||
| 3167 | 3167 | ||
| 3168 | /* Structure for a device driver */ | 3168 | /* Structure for a device driver */ |
| 3169 | static struct of_platform_driver gfar_driver = { | 3169 | static struct of_platform_driver gfar_driver = { |
| 3170 | .name = "fsl-gianfar", | 3170 | .driver = { |
| 3171 | .match_table = gfar_match, | 3171 | .name = "fsl-gianfar", |
| 3172 | 3172 | .owner = THIS_MODULE, | |
| 3173 | .pm = GFAR_PM_OPS, | ||
| 3174 | .of_match_table = gfar_match, | ||
| 3175 | }, | ||
| 3173 | .probe = gfar_probe, | 3176 | .probe = gfar_probe, |
| 3174 | .remove = gfar_remove, | 3177 | .remove = gfar_remove, |
| 3175 | .driver.pm = GFAR_PM_OPS, | ||
| 3176 | }; | 3178 | }; |
| 3177 | 3179 | ||
| 3178 | static int __init gfar_init(void) | 3180 | static int __init gfar_init(void) |
diff --git a/drivers/net/greth.c b/drivers/net/greth.c index fd491e40948..f37a4c143dd 100644 --- a/drivers/net/greth.c +++ b/drivers/net/greth.c | |||
| @@ -1499,7 +1499,8 @@ static int __devinit greth_of_probe(struct of_device *ofdev, const struct of_dev | |||
| 1499 | if (i == 6) { | 1499 | if (i == 6) { |
| 1500 | const unsigned char *addr; | 1500 | const unsigned char *addr; |
| 1501 | int len; | 1501 | int len; |
| 1502 | addr = of_get_property(ofdev->node, "local-mac-address", &len); | 1502 | addr = of_get_property(ofdev->dev.of_node, "local-mac-address", |
| 1503 | &len); | ||
| 1503 | if (addr != NULL && len == 6) { | 1504 | if (addr != NULL && len == 6) { |
| 1504 | for (i = 0; i < 6; i++) | 1505 | for (i = 0; i < 6; i++) |
| 1505 | macaddr[i] = (unsigned int) addr[i]; | 1506 | macaddr[i] = (unsigned int) addr[i]; |
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c index 2484e9e6c1e..b150c102ca5 100644 --- a/drivers/net/ibm_newemac/core.c +++ b/drivers/net/ibm_newemac/core.c | |||
| @@ -136,7 +136,8 @@ static inline void emac_report_timeout_error(struct emac_instance *dev, | |||
| 136 | EMAC_FTR_440EP_PHY_CLK_FIX)) | 136 | EMAC_FTR_440EP_PHY_CLK_FIX)) |
| 137 | DBG(dev, "%s" NL, error); | 137 | DBG(dev, "%s" NL, error); |
| 138 | else if (net_ratelimit()) | 138 | else if (net_ratelimit()) |
| 139 | printk(KERN_ERR "%s: %s\n", dev->ofdev->node->full_name, error); | 139 | printk(KERN_ERR "%s: %s\n", dev->ofdev->dev.of_node->full_name, |
| 140 | error); | ||
| 140 | } | 141 | } |
| 141 | 142 | ||
| 142 | /* EMAC PHY clock workaround: | 143 | /* EMAC PHY clock workaround: |
| @@ -2185,7 +2186,7 @@ static void emac_ethtool_get_drvinfo(struct net_device *ndev, | |||
| 2185 | strcpy(info->version, DRV_VERSION); | 2186 | strcpy(info->version, DRV_VERSION); |
| 2186 | info->fw_version[0] = '\0'; | 2187 | info->fw_version[0] = '\0'; |
| 2187 | sprintf(info->bus_info, "PPC 4xx EMAC-%d %s", | 2188 | sprintf(info->bus_info, "PPC 4xx EMAC-%d %s", |
| 2188 | dev->cell_index, dev->ofdev->node->full_name); | 2189 | dev->cell_index, dev->ofdev->dev.of_node->full_name); |
| 2189 | info->regdump_len = emac_ethtool_get_regs_len(ndev); | 2190 | info->regdump_len = emac_ethtool_get_regs_len(ndev); |
| 2190 | } | 2191 | } |
| 2191 | 2192 | ||
| @@ -2379,7 +2380,7 @@ static int __devinit emac_read_uint_prop(struct device_node *np, const char *nam | |||
| 2379 | 2380 | ||
| 2380 | static int __devinit emac_init_phy(struct emac_instance *dev) | 2381 | static int __devinit emac_init_phy(struct emac_instance *dev) |
| 2381 | { | 2382 | { |
| 2382 | struct device_node *np = dev->ofdev->node; | 2383 | struct device_node *np = dev->ofdev->dev.of_node; |
| 2383 | struct net_device *ndev = dev->ndev; | 2384 | struct net_device *ndev = dev->ndev; |
| 2384 | u32 phy_map, adv; | 2385 | u32 phy_map, adv; |
| 2385 | int i; | 2386 | int i; |
| @@ -2514,7 +2515,7 @@ static int __devinit emac_init_phy(struct emac_instance *dev) | |||
| 2514 | 2515 | ||
| 2515 | static int __devinit emac_init_config(struct emac_instance *dev) | 2516 | static int __devinit emac_init_config(struct emac_instance *dev) |
| 2516 | { | 2517 | { |
| 2517 | struct device_node *np = dev->ofdev->node; | 2518 | struct device_node *np = dev->ofdev->dev.of_node; |
| 2518 | const void *p; | 2519 | const void *p; |
| 2519 | unsigned int plen; | 2520 | unsigned int plen; |
| 2520 | const char *pm, *phy_modes[] = { | 2521 | const char *pm, *phy_modes[] = { |
| @@ -2723,7 +2724,7 @@ static int __devinit emac_probe(struct of_device *ofdev, | |||
| 2723 | { | 2724 | { |
| 2724 | struct net_device *ndev; | 2725 | struct net_device *ndev; |
| 2725 | struct emac_instance *dev; | 2726 | struct emac_instance *dev; |
| 2726 | struct device_node *np = ofdev->node; | 2727 | struct device_node *np = ofdev->dev.of_node; |
| 2727 | struct device_node **blist = NULL; | 2728 | struct device_node **blist = NULL; |
| 2728 | int err, i; | 2729 | int err, i; |
| 2729 | 2730 | ||
| @@ -2810,7 +2811,7 @@ static int __devinit emac_probe(struct of_device *ofdev, | |||
| 2810 | err = mal_register_commac(dev->mal, &dev->commac); | 2811 | err = mal_register_commac(dev->mal, &dev->commac); |
| 2811 | if (err) { | 2812 | if (err) { |
| 2812 | printk(KERN_ERR "%s: failed to register with mal %s!\n", | 2813 | printk(KERN_ERR "%s: failed to register with mal %s!\n", |
| 2813 | np->full_name, dev->mal_dev->node->full_name); | 2814 | np->full_name, dev->mal_dev->dev.of_node->full_name); |
| 2814 | goto err_rel_deps; | 2815 | goto err_rel_deps; |
| 2815 | } | 2816 | } |
| 2816 | dev->rx_skb_size = emac_rx_skb_size(ndev->mtu); | 2817 | dev->rx_skb_size = emac_rx_skb_size(ndev->mtu); |
| @@ -2995,9 +2996,11 @@ static struct of_device_id emac_match[] = | |||
| 2995 | MODULE_DEVICE_TABLE(of, emac_match); | 2996 | MODULE_DEVICE_TABLE(of, emac_match); |
| 2996 | 2997 | ||
| 2997 | static struct of_platform_driver emac_driver = { | 2998 | static struct of_platform_driver emac_driver = { |
| 2998 | .name = "emac", | 2999 | .driver = { |
| 2999 | .match_table = emac_match, | 3000 | .name = "emac", |
| 3000 | 3001 | .owner = THIS_MODULE, | |
| 3002 | .of_match_table = emac_match, | ||
| 3003 | }, | ||
| 3001 | .probe = emac_probe, | 3004 | .probe = emac_probe, |
| 3002 | .remove = emac_remove, | 3005 | .remove = emac_remove, |
| 3003 | }; | 3006 | }; |
diff --git a/drivers/net/ibm_newemac/debug.c b/drivers/net/ibm_newemac/debug.c index 775c850a425..3995fafc1e0 100644 --- a/drivers/net/ibm_newemac/debug.c +++ b/drivers/net/ibm_newemac/debug.c | |||
| @@ -33,7 +33,7 @@ static void emac_desc_dump(struct emac_instance *p) | |||
| 33 | int i; | 33 | int i; |
| 34 | printk("** EMAC %s TX BDs **\n" | 34 | printk("** EMAC %s TX BDs **\n" |
| 35 | " tx_cnt = %d tx_slot = %d ack_slot = %d\n", | 35 | " tx_cnt = %d tx_slot = %d ack_slot = %d\n", |
| 36 | p->ofdev->node->full_name, | 36 | p->ofdev->dev.of_node->full_name, |
| 37 | p->tx_cnt, p->tx_slot, p->ack_slot); | 37 | p->tx_cnt, p->tx_slot, p->ack_slot); |
| 38 | for (i = 0; i < NUM_TX_BUFF / 2; ++i) | 38 | for (i = 0; i < NUM_TX_BUFF / 2; ++i) |
| 39 | printk | 39 | printk |
| @@ -49,7 +49,7 @@ static void emac_desc_dump(struct emac_instance *p) | |||
| 49 | printk("** EMAC %s RX BDs **\n" | 49 | printk("** EMAC %s RX BDs **\n" |
| 50 | " rx_slot = %d flags = 0x%lx rx_skb_size = %d rx_sync_size = %d\n" | 50 | " rx_slot = %d flags = 0x%lx rx_skb_size = %d rx_sync_size = %d\n" |
| 51 | " rx_sg_skb = 0x%p\n", | 51 | " rx_sg_skb = 0x%p\n", |
| 52 | p->ofdev->node->full_name, | 52 | p->ofdev->dev.of_node->full_name, |
| 53 | p->rx_slot, p->commac.flags, p->rx_skb_size, | 53 | p->rx_slot, p->commac.flags, p->rx_skb_size, |
| 54 | p->rx_sync_size, p->rx_sg_skb); | 54 | p->rx_sync_size, p->rx_sg_skb); |
| 55 | for (i = 0; i < NUM_RX_BUFF / 2; ++i) | 55 | for (i = 0; i < NUM_RX_BUFF / 2; ++i) |
| @@ -77,7 +77,8 @@ static void emac_mac_dump(struct emac_instance *dev) | |||
| 77 | "MR0 = 0x%08x MR1 = 0x%08x TMR0 = 0x%08x TMR1 = 0x%08x\n" | 77 | "MR0 = 0x%08x MR1 = 0x%08x TMR0 = 0x%08x TMR1 = 0x%08x\n" |
| 78 | "RMR = 0x%08x ISR = 0x%08x ISER = 0x%08x\n" | 78 | "RMR = 0x%08x ISR = 0x%08x ISER = 0x%08x\n" |
| 79 | "IAR = %04x%08x VTPID = 0x%04x VTCI = 0x%04x\n", | 79 | "IAR = %04x%08x VTPID = 0x%04x VTCI = 0x%04x\n", |
| 80 | dev->ofdev->node->full_name, in_be32(&p->mr0), in_be32(&p->mr1), | 80 | dev->ofdev->dev.of_node->full_name, |
| 81 | in_be32(&p->mr0), in_be32(&p->mr1), | ||
| 81 | in_be32(&p->tmr0), in_be32(&p->tmr1), | 82 | in_be32(&p->tmr0), in_be32(&p->tmr1), |
| 82 | in_be32(&p->rmr), in_be32(&p->isr), in_be32(&p->iser), | 83 | in_be32(&p->rmr), in_be32(&p->isr), in_be32(&p->iser), |
| 83 | in_be32(&p->iahr), in_be32(&p->ialr), in_be32(&p->vtpid), | 84 | in_be32(&p->iahr), in_be32(&p->ialr), in_be32(&p->vtpid), |
| @@ -128,7 +129,7 @@ static void emac_mal_dump(struct mal_instance *mal) | |||
| 128 | "CFG = 0x%08x ESR = 0x%08x IER = 0x%08x\n" | 129 | "CFG = 0x%08x ESR = 0x%08x IER = 0x%08x\n" |
| 129 | "TX|CASR = 0x%08x CARR = 0x%08x EOBISR = 0x%08x DEIR = 0x%08x\n" | 130 | "TX|CASR = 0x%08x CARR = 0x%08x EOBISR = 0x%08x DEIR = 0x%08x\n" |
| 130 | "RX|CASR = 0x%08x CARR = 0x%08x EOBISR = 0x%08x DEIR = 0x%08x\n", | 131 | "RX|CASR = 0x%08x CARR = 0x%08x EOBISR = 0x%08x DEIR = 0x%08x\n", |
| 131 | mal->ofdev->node->full_name, | 132 | mal->ofdev->dev.of_node->full_name, |
| 132 | get_mal_dcrn(mal, MAL_CFG), get_mal_dcrn(mal, MAL_ESR), | 133 | get_mal_dcrn(mal, MAL_CFG), get_mal_dcrn(mal, MAL_ESR), |
| 133 | get_mal_dcrn(mal, MAL_IER), | 134 | get_mal_dcrn(mal, MAL_IER), |
| 134 | get_mal_dcrn(mal, MAL_TXCASR), get_mal_dcrn(mal, MAL_TXCARR), | 135 | get_mal_dcrn(mal, MAL_TXCASR), get_mal_dcrn(mal, MAL_TXCARR), |
diff --git a/drivers/net/ibm_newemac/debug.h b/drivers/net/ibm_newemac/debug.h index b631842ec8d..e596c77ccdf 100644 --- a/drivers/net/ibm_newemac/debug.h +++ b/drivers/net/ibm_newemac/debug.h | |||
| @@ -53,8 +53,8 @@ extern void emac_dbg_dump_all(void); | |||
| 53 | 53 | ||
| 54 | #endif | 54 | #endif |
| 55 | 55 | ||
| 56 | #define EMAC_DBG(dev, name, fmt, arg...) \ | 56 | #define EMAC_DBG(d, name, fmt, arg...) \ |
| 57 | printk(KERN_DEBUG #name "%s: " fmt, dev->ofdev->node->full_name, ## arg) | 57 | printk(KERN_DEBUG #name "%s: " fmt, d->ofdev->dev.of_node->full_name, ## arg) |
| 58 | 58 | ||
| 59 | #if DBG_LEVEL > 0 | 59 | #if DBG_LEVEL > 0 |
| 60 | # define DBG(d,f,x...) EMAC_DBG(d, emac, f, ##x) | 60 | # define DBG(d,f,x...) EMAC_DBG(d, emac, f, ##x) |
diff --git a/drivers/net/ibm_newemac/mal.c b/drivers/net/ibm_newemac/mal.c index 5b3d94419fe..fcff9e0bd38 100644 --- a/drivers/net/ibm_newemac/mal.c +++ b/drivers/net/ibm_newemac/mal.c | |||
| @@ -538,11 +538,11 @@ static int __devinit mal_probe(struct of_device *ofdev, | |||
| 538 | } | 538 | } |
| 539 | mal->index = index; | 539 | mal->index = index; |
| 540 | mal->ofdev = ofdev; | 540 | mal->ofdev = ofdev; |
| 541 | mal->version = of_device_is_compatible(ofdev->node, "ibm,mcmal2") ? 2 : 1; | 541 | mal->version = of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal2") ? 2 : 1; |
| 542 | 542 | ||
| 543 | MAL_DBG(mal, "probe" NL); | 543 | MAL_DBG(mal, "probe" NL); |
| 544 | 544 | ||
| 545 | prop = of_get_property(ofdev->node, "num-tx-chans", NULL); | 545 | prop = of_get_property(ofdev->dev.of_node, "num-tx-chans", NULL); |
| 546 | if (prop == NULL) { | 546 | if (prop == NULL) { |
| 547 | printk(KERN_ERR | 547 | printk(KERN_ERR |
| 548 | "mal%d: can't find MAL num-tx-chans property!\n", | 548 | "mal%d: can't find MAL num-tx-chans property!\n", |
| @@ -552,7 +552,7 @@ static int __devinit mal_probe(struct of_device *ofdev, | |||
| 552 | } | 552 | } |
| 553 | mal->num_tx_chans = prop[0]; | 553 | mal->num_tx_chans = prop[0]; |
| 554 | 554 | ||
| 555 | prop = of_get_property(ofdev->node, "num-rx-chans", NULL); | 555 | prop = of_get_property(ofdev->dev.of_node, "num-rx-chans", NULL); |
| 556 | if (prop == NULL) { | 556 | if (prop == NULL) { |
| 557 | printk(KERN_ERR | 557 | printk(KERN_ERR |
| 558 | "mal%d: can't find MAL num-rx-chans property!\n", | 558 | "mal%d: can't find MAL num-rx-chans property!\n", |
| @@ -562,14 +562,14 @@ static int __devinit mal_probe(struct of_device *ofdev, | |||
| 562 | } | 562 | } |
| 563 | mal->num_rx_chans = prop[0]; | 563 | mal->num_rx_chans = prop[0]; |
| 564 | 564 | ||
| 565 | dcr_base = dcr_resource_start(ofdev->node, 0); | 565 | dcr_base = dcr_resource_start(ofdev->dev.of_node, 0); |
| 566 | if (dcr_base == 0) { | 566 | if (dcr_base == 0) { |
| 567 | printk(KERN_ERR | 567 | printk(KERN_ERR |
| 568 | "mal%d: can't find DCR resource!\n", index); | 568 | "mal%d: can't find DCR resource!\n", index); |
| 569 | err = -ENODEV; | 569 | err = -ENODEV; |
| 570 | goto fail; | 570 | goto fail; |
| 571 | } | 571 | } |
| 572 | mal->dcr_host = dcr_map(ofdev->node, dcr_base, 0x100); | 572 | mal->dcr_host = dcr_map(ofdev->dev.of_node, dcr_base, 0x100); |
| 573 | if (!DCR_MAP_OK(mal->dcr_host)) { | 573 | if (!DCR_MAP_OK(mal->dcr_host)) { |
| 574 | printk(KERN_ERR | 574 | printk(KERN_ERR |
| 575 | "mal%d: failed to map DCRs !\n", index); | 575 | "mal%d: failed to map DCRs !\n", index); |
| @@ -577,28 +577,28 @@ static int __devinit mal_probe(struct of_device *ofdev, | |||
| 577 | goto fail; | 577 | goto fail; |
| 578 | } | 578 | } |
| 579 | 579 | ||
| 580 | if (of_device_is_compatible(ofdev->node, "ibm,mcmal-405ez")) { | 580 | if (of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal-405ez")) { |
| 581 | #if defined(CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT) && \ | 581 | #if defined(CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT) && \ |
| 582 | defined(CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR) | 582 | defined(CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR) |
| 583 | mal->features |= (MAL_FTR_CLEAR_ICINTSTAT | | 583 | mal->features |= (MAL_FTR_CLEAR_ICINTSTAT | |
| 584 | MAL_FTR_COMMON_ERR_INT); | 584 | MAL_FTR_COMMON_ERR_INT); |
| 585 | #else | 585 | #else |
| 586 | printk(KERN_ERR "%s: Support for 405EZ not enabled!\n", | 586 | printk(KERN_ERR "%s: Support for 405EZ not enabled!\n", |
| 587 | ofdev->node->full_name); | 587 | ofdev->dev.of_node->full_name); |
| 588 | err = -ENODEV; | 588 | err = -ENODEV; |
| 589 | goto fail; | 589 | goto fail; |
| 590 | #endif | 590 | #endif |
| 591 | } | 591 | } |
| 592 | 592 | ||
| 593 | mal->txeob_irq = irq_of_parse_and_map(ofdev->node, 0); | 593 | mal->txeob_irq = irq_of_parse_and_map(ofdev->dev.of_node, 0); |
| 594 | mal->rxeob_irq = irq_of_parse_and_map(ofdev->node, 1); | 594 | mal->rxeob_irq = irq_of_parse_and_map(ofdev->dev.of_node, 1); |
| 595 | mal->serr_irq = irq_of_parse_and_map(ofdev->node, 2); | 595 | mal->serr_irq = irq_of_parse_and_map(ofdev->dev.of_node, 2); |
| 596 | 596 | ||
| 597 | if (mal_has_feature(mal, MAL_FTR_COMMON_ERR_INT)) { | 597 | if (mal_has_feature(mal, MAL_FTR_COMMON_ERR_INT)) { |
| 598 | mal->txde_irq = mal->rxde_irq = mal->serr_irq; | 598 | mal->txde_irq = mal->rxde_irq = mal->serr_irq; |
| 599 | } else { | 599 | } else { |
| 600 | mal->txde_irq = irq_of_parse_and_map(ofdev->node, 3); | 600 | mal->txde_irq = irq_of_parse_and_map(ofdev->dev.of_node, 3); |
| 601 | mal->rxde_irq = irq_of_parse_and_map(ofdev->node, 4); | 601 | mal->rxde_irq = irq_of_parse_and_map(ofdev->dev.of_node, 4); |
| 602 | } | 602 | } |
| 603 | 603 | ||
| 604 | if (mal->txeob_irq == NO_IRQ || mal->rxeob_irq == NO_IRQ || | 604 | if (mal->txeob_irq == NO_IRQ || mal->rxeob_irq == NO_IRQ || |
| @@ -629,7 +629,7 @@ static int __devinit mal_probe(struct of_device *ofdev, | |||
| 629 | /* Current Axon is not happy with priority being non-0, it can | 629 | /* Current Axon is not happy with priority being non-0, it can |
| 630 | * deadlock, fix it up here | 630 | * deadlock, fix it up here |
| 631 | */ | 631 | */ |
| 632 | if (of_device_is_compatible(ofdev->node, "ibm,mcmal-axon")) | 632 | if (of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal-axon")) |
| 633 | cfg &= ~(MAL2_CFG_RPP_10 | MAL2_CFG_WPP_10); | 633 | cfg &= ~(MAL2_CFG_RPP_10 | MAL2_CFG_WPP_10); |
| 634 | 634 | ||
| 635 | /* Apply configuration */ | 635 | /* Apply configuration */ |
| @@ -701,7 +701,7 @@ static int __devinit mal_probe(struct of_device *ofdev, | |||
| 701 | 701 | ||
| 702 | printk(KERN_INFO | 702 | printk(KERN_INFO |
| 703 | "MAL v%d %s, %d TX channels, %d RX channels\n", | 703 | "MAL v%d %s, %d TX channels, %d RX channels\n", |
| 704 | mal->version, ofdev->node->full_name, | 704 | mal->version, ofdev->dev.of_node->full_name, |
| 705 | mal->num_tx_chans, mal->num_rx_chans); | 705 | mal->num_tx_chans, mal->num_rx_chans); |
| 706 | 706 | ||
| 707 | /* Advertise this instance to the rest of the world */ | 707 | /* Advertise this instance to the rest of the world */ |
| @@ -790,9 +790,11 @@ static struct of_device_id mal_platform_match[] = | |||
| 790 | }; | 790 | }; |
| 791 | 791 | ||
| 792 | static struct of_platform_driver mal_of_driver = { | 792 | static struct of_platform_driver mal_of_driver = { |
| 793 | .name = "mcmal", | 793 | .driver = { |
| 794 | .match_table = mal_platform_match, | 794 | .name = "mcmal", |
| 795 | 795 | .owner = THIS_MODULE, | |
| 796 | .of_match_table = mal_platform_match, | ||
| 797 | }, | ||
| 796 | .probe = mal_probe, | 798 | .probe = mal_probe, |
| 797 | .remove = mal_remove, | 799 | .remove = mal_remove, |
| 798 | }; | 800 | }; |
diff --git a/drivers/net/ibm_newemac/rgmii.c b/drivers/net/ibm_newemac/rgmii.c index 5b90d34c845..108919bcdf1 100644 --- a/drivers/net/ibm_newemac/rgmii.c +++ b/drivers/net/ibm_newemac/rgmii.c | |||
| @@ -103,7 +103,7 @@ int __devinit rgmii_attach(struct of_device *ofdev, int input, int mode) | |||
| 103 | /* Check if we need to attach to a RGMII */ | 103 | /* Check if we need to attach to a RGMII */ |
| 104 | if (input < 0 || !rgmii_valid_mode(mode)) { | 104 | if (input < 0 || !rgmii_valid_mode(mode)) { |
| 105 | printk(KERN_ERR "%s: unsupported settings !\n", | 105 | printk(KERN_ERR "%s: unsupported settings !\n", |
| 106 | ofdev->node->full_name); | 106 | ofdev->dev.of_node->full_name); |
| 107 | return -ENODEV; | 107 | return -ENODEV; |
| 108 | } | 108 | } |
| 109 | 109 | ||
| @@ -113,7 +113,7 @@ int __devinit rgmii_attach(struct of_device *ofdev, int input, int mode) | |||
| 113 | out_be32(&p->fer, in_be32(&p->fer) | rgmii_mode_mask(mode, input)); | 113 | out_be32(&p->fer, in_be32(&p->fer) | rgmii_mode_mask(mode, input)); |
| 114 | 114 | ||
| 115 | printk(KERN_NOTICE "%s: input %d in %s mode\n", | 115 | printk(KERN_NOTICE "%s: input %d in %s mode\n", |
| 116 | ofdev->node->full_name, input, rgmii_mode_name(mode)); | 116 | ofdev->dev.of_node->full_name, input, rgmii_mode_name(mode)); |
| 117 | 117 | ||
| 118 | ++dev->users; | 118 | ++dev->users; |
| 119 | 119 | ||
| @@ -231,7 +231,7 @@ void *rgmii_dump_regs(struct of_device *ofdev, void *buf) | |||
| 231 | static int __devinit rgmii_probe(struct of_device *ofdev, | 231 | static int __devinit rgmii_probe(struct of_device *ofdev, |
| 232 | const struct of_device_id *match) | 232 | const struct of_device_id *match) |
| 233 | { | 233 | { |
| 234 | struct device_node *np = ofdev->node; | 234 | struct device_node *np = ofdev->dev.of_node; |
| 235 | struct rgmii_instance *dev; | 235 | struct rgmii_instance *dev; |
| 236 | struct resource regs; | 236 | struct resource regs; |
| 237 | int rc; | 237 | int rc; |
| @@ -264,11 +264,11 @@ static int __devinit rgmii_probe(struct of_device *ofdev, | |||
| 264 | } | 264 | } |
| 265 | 265 | ||
| 266 | /* Check for RGMII flags */ | 266 | /* Check for RGMII flags */ |
| 267 | if (of_get_property(ofdev->node, "has-mdio", NULL)) | 267 | if (of_get_property(ofdev->dev.of_node, "has-mdio", NULL)) |
| 268 | dev->flags |= EMAC_RGMII_FLAG_HAS_MDIO; | 268 | dev->flags |= EMAC_RGMII_FLAG_HAS_MDIO; |
| 269 | 269 | ||
| 270 | /* CAB lacks the right properties, fix this up */ | 270 | /* CAB lacks the right properties, fix this up */ |
| 271 | if (of_device_is_compatible(ofdev->node, "ibm,rgmii-axon")) | 271 | if (of_device_is_compatible(ofdev->dev.of_node, "ibm,rgmii-axon")) |
| 272 | dev->flags |= EMAC_RGMII_FLAG_HAS_MDIO; | 272 | dev->flags |= EMAC_RGMII_FLAG_HAS_MDIO; |
| 273 | 273 | ||
| 274 | DBG2(dev, " Boot FER = 0x%08x, SSR = 0x%08x\n", | 274 | DBG2(dev, " Boot FER = 0x%08x, SSR = 0x%08x\n", |
| @@ -279,7 +279,7 @@ static int __devinit rgmii_probe(struct of_device *ofdev, | |||
| 279 | 279 | ||
| 280 | printk(KERN_INFO | 280 | printk(KERN_INFO |
| 281 | "RGMII %s initialized with%s MDIO support\n", | 281 | "RGMII %s initialized with%s MDIO support\n", |
| 282 | ofdev->node->full_name, | 282 | ofdev->dev.of_node->full_name, |
| 283 | (dev->flags & EMAC_RGMII_FLAG_HAS_MDIO) ? "" : "out"); | 283 | (dev->flags & EMAC_RGMII_FLAG_HAS_MDIO) ? "" : "out"); |
| 284 | 284 | ||
| 285 | wmb(); | 285 | wmb(); |
| @@ -319,9 +319,11 @@ static struct of_device_id rgmii_match[] = | |||
| 319 | }; | 319 | }; |
| 320 | 320 | ||
| 321 | static struct of_platform_driver rgmii_driver = { | 321 | static struct of_platform_driver rgmii_driver = { |
| 322 | .name = "emac-rgmii", | 322 | .driver = { |
| 323 | .match_table = rgmii_match, | 323 | .name = "emac-rgmii", |
| 324 | 324 | .owner = THIS_MODULE, | |
| 325 | .of_match_table = rgmii_match, | ||
| 326 | }, | ||
| 325 | .probe = rgmii_probe, | 327 | .probe = rgmii_probe, |
| 326 | .remove = rgmii_remove, | 328 | .remove = rgmii_remove, |
| 327 | }; | 329 | }; |
diff --git a/drivers/net/ibm_newemac/tah.c b/drivers/net/ibm_newemac/tah.c index 30173a9fb55..044637144c4 100644 --- a/drivers/net/ibm_newemac/tah.c +++ b/drivers/net/ibm_newemac/tah.c | |||
| @@ -57,7 +57,8 @@ void tah_reset(struct of_device *ofdev) | |||
| 57 | --n; | 57 | --n; |
| 58 | 58 | ||
| 59 | if (unlikely(!n)) | 59 | if (unlikely(!n)) |
| 60 | printk(KERN_ERR "%s: reset timeout\n", ofdev->node->full_name); | 60 | printk(KERN_ERR "%s: reset timeout\n", |
| 61 | ofdev->dev.of_node->full_name); | ||
| 61 | 62 | ||
| 62 | /* 10KB TAH TX FIFO accomodates the max MTU of 9000 */ | 63 | /* 10KB TAH TX FIFO accomodates the max MTU of 9000 */ |
| 63 | out_be32(&p->mr, | 64 | out_be32(&p->mr, |
| @@ -89,7 +90,7 @@ void *tah_dump_regs(struct of_device *ofdev, void *buf) | |||
| 89 | static int __devinit tah_probe(struct of_device *ofdev, | 90 | static int __devinit tah_probe(struct of_device *ofdev, |
| 90 | const struct of_device_id *match) | 91 | const struct of_device_id *match) |
| 91 | { | 92 | { |
| 92 | struct device_node *np = ofdev->node; | 93 | struct device_node *np = ofdev->dev.of_node; |
| 93 | struct tah_instance *dev; | 94 | struct tah_instance *dev; |
| 94 | struct resource regs; | 95 | struct resource regs; |
| 95 | int rc; | 96 | int rc; |
| @@ -127,7 +128,7 @@ static int __devinit tah_probe(struct of_device *ofdev, | |||
| 127 | tah_reset(ofdev); | 128 | tah_reset(ofdev); |
| 128 | 129 | ||
| 129 | printk(KERN_INFO | 130 | printk(KERN_INFO |
| 130 | "TAH %s initialized\n", ofdev->node->full_name); | 131 | "TAH %s initialized\n", ofdev->dev.of_node->full_name); |
| 131 | wmb(); | 132 | wmb(); |
| 132 | 133 | ||
| 133 | return 0; | 134 | return 0; |
| @@ -165,9 +166,11 @@ static struct of_device_id tah_match[] = | |||
| 165 | }; | 166 | }; |
| 166 | 167 | ||
| 167 | static struct of_platform_driver tah_driver = { | 168 | static struct of_platform_driver tah_driver = { |
| 168 | .name = "emac-tah", | 169 | .driver = { |
| 169 | .match_table = tah_match, | 170 | .name = "emac-tah", |
| 170 | 171 | .owner = THIS_MODULE, | |
| 172 | .of_match_table = tah_match, | ||
| 173 | }, | ||
| 171 | .probe = tah_probe, | 174 | .probe = tah_probe, |
| 172 | .remove = tah_remove, | 175 | .remove = tah_remove, |
| 173 | }; | 176 | }; |
diff --git a/drivers/net/ibm_newemac/zmii.c b/drivers/net/ibm_newemac/zmii.c index 1f038f808ab..046dcd069c4 100644 --- a/drivers/net/ibm_newemac/zmii.c +++ b/drivers/net/ibm_newemac/zmii.c | |||
| @@ -121,13 +121,14 @@ int __devinit zmii_attach(struct of_device *ofdev, int input, int *mode) | |||
| 121 | dev->mode = *mode; | 121 | dev->mode = *mode; |
| 122 | 122 | ||
| 123 | printk(KERN_NOTICE "%s: bridge in %s mode\n", | 123 | printk(KERN_NOTICE "%s: bridge in %s mode\n", |
| 124 | ofdev->node->full_name, zmii_mode_name(dev->mode)); | 124 | ofdev->dev.of_node->full_name, |
| 125 | zmii_mode_name(dev->mode)); | ||
| 125 | } else { | 126 | } else { |
| 126 | /* All inputs must use the same mode */ | 127 | /* All inputs must use the same mode */ |
| 127 | if (*mode != PHY_MODE_NA && *mode != dev->mode) { | 128 | if (*mode != PHY_MODE_NA && *mode != dev->mode) { |
| 128 | printk(KERN_ERR | 129 | printk(KERN_ERR |
| 129 | "%s: invalid mode %d specified for input %d\n", | 130 | "%s: invalid mode %d specified for input %d\n", |
| 130 | ofdev->node->full_name, *mode, input); | 131 | ofdev->dev.of_node->full_name, *mode, input); |
| 131 | mutex_unlock(&dev->lock); | 132 | mutex_unlock(&dev->lock); |
| 132 | return -EINVAL; | 133 | return -EINVAL; |
| 133 | } | 134 | } |
| @@ -233,7 +234,7 @@ void *zmii_dump_regs(struct of_device *ofdev, void *buf) | |||
| 233 | static int __devinit zmii_probe(struct of_device *ofdev, | 234 | static int __devinit zmii_probe(struct of_device *ofdev, |
| 234 | const struct of_device_id *match) | 235 | const struct of_device_id *match) |
| 235 | { | 236 | { |
| 236 | struct device_node *np = ofdev->node; | 237 | struct device_node *np = ofdev->dev.of_node; |
| 237 | struct zmii_instance *dev; | 238 | struct zmii_instance *dev; |
| 238 | struct resource regs; | 239 | struct resource regs; |
| 239 | int rc; | 240 | int rc; |
| @@ -273,7 +274,7 @@ static int __devinit zmii_probe(struct of_device *ofdev, | |||
| 273 | out_be32(&dev->base->fer, 0); | 274 | out_be32(&dev->base->fer, 0); |
| 274 | 275 | ||
| 275 | printk(KERN_INFO | 276 | printk(KERN_INFO |
| 276 | "ZMII %s initialized\n", ofdev->node->full_name); | 277 | "ZMII %s initialized\n", ofdev->dev.of_node->full_name); |
| 277 | wmb(); | 278 | wmb(); |
| 278 | dev_set_drvdata(&ofdev->dev, dev); | 279 | dev_set_drvdata(&ofdev->dev, dev); |
| 279 | 280 | ||
| @@ -312,9 +313,11 @@ static struct of_device_id zmii_match[] = | |||
| 312 | }; | 313 | }; |
| 313 | 314 | ||
| 314 | static struct of_platform_driver zmii_driver = { | 315 | static struct of_platform_driver zmii_driver = { |
| 315 | .name = "emac-zmii", | 316 | .driver = { |
| 316 | .match_table = zmii_match, | 317 | .name = "emac-zmii", |
| 317 | 318 | .owner = THIS_MODULE, | |
| 319 | .of_match_table = zmii_match, | ||
| 320 | }, | ||
| 318 | .probe = zmii_probe, | 321 | .probe = zmii_probe, |
| 319 | .remove = zmii_remove, | 322 | .remove = zmii_remove, |
| 320 | }; | 323 | }; |
diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c index b59b24d667f..fa7620e2840 100644 --- a/drivers/net/ll_temac_main.c +++ b/drivers/net/ll_temac_main.c | |||
| @@ -920,14 +920,14 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match) | |||
| 920 | mutex_init(&lp->indirect_mutex); | 920 | mutex_init(&lp->indirect_mutex); |
| 921 | 921 | ||
| 922 | /* map device registers */ | 922 | /* map device registers */ |
| 923 | lp->regs = of_iomap(op->node, 0); | 923 | lp->regs = of_iomap(op->dev.of_node, 0); |
| 924 | if (!lp->regs) { | 924 | if (!lp->regs) { |
| 925 | dev_err(&op->dev, "could not map temac regs.\n"); | 925 | dev_err(&op->dev, "could not map temac regs.\n"); |
| 926 | goto nodev; | 926 | goto nodev; |
| 927 | } | 927 | } |
| 928 | 928 | ||
| 929 | /* Find the DMA node, map the DMA registers, and decode the DMA IRQs */ | 929 | /* Find the DMA node, map the DMA registers, and decode the DMA IRQs */ |
| 930 | np = of_parse_phandle(op->node, "llink-connected", 0); | 930 | np = of_parse_phandle(op->dev.of_node, "llink-connected", 0); |
| 931 | if (!np) { | 931 | if (!np) { |
| 932 | dev_err(&op->dev, "could not find DMA node\n"); | 932 | dev_err(&op->dev, "could not find DMA node\n"); |
| 933 | goto nodev; | 933 | goto nodev; |
| @@ -959,7 +959,7 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match) | |||
| 959 | of_node_put(np); /* Finished with the DMA node; drop the reference */ | 959 | of_node_put(np); /* Finished with the DMA node; drop the reference */ |
| 960 | 960 | ||
| 961 | /* Retrieve the MAC address */ | 961 | /* Retrieve the MAC address */ |
| 962 | addr = of_get_property(op->node, "local-mac-address", &size); | 962 | addr = of_get_property(op->dev.of_node, "local-mac-address", &size); |
| 963 | if ((!addr) || (size != 6)) { | 963 | if ((!addr) || (size != 6)) { |
| 964 | dev_err(&op->dev, "could not find MAC address\n"); | 964 | dev_err(&op->dev, "could not find MAC address\n"); |
| 965 | rc = -ENODEV; | 965 | rc = -ENODEV; |
| @@ -967,11 +967,11 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match) | |||
| 967 | } | 967 | } |
| 968 | temac_set_mac_address(ndev, (void *)addr); | 968 | temac_set_mac_address(ndev, (void *)addr); |
| 969 | 969 | ||
| 970 | rc = temac_mdio_setup(lp, op->node); | 970 | rc = temac_mdio_setup(lp, op->dev.of_node); |
| 971 | if (rc) | 971 | if (rc) |
| 972 | dev_warn(&op->dev, "error registering MDIO bus\n"); | 972 | dev_warn(&op->dev, "error registering MDIO bus\n"); |
| 973 | 973 | ||
| 974 | lp->phy_node = of_parse_phandle(op->node, "phy-handle", 0); | 974 | lp->phy_node = of_parse_phandle(op->dev.of_node, "phy-handle", 0); |
| 975 | if (lp->phy_node) | 975 | if (lp->phy_node) |
| 976 | dev_dbg(lp->dev, "using PHY node %s (%p)\n", np->full_name, np); | 976 | dev_dbg(lp->dev, "using PHY node %s (%p)\n", np->full_name, np); |
| 977 | 977 | ||
| @@ -1024,12 +1024,12 @@ static struct of_device_id temac_of_match[] __devinitdata = { | |||
| 1024 | MODULE_DEVICE_TABLE(of, temac_of_match); | 1024 | MODULE_DEVICE_TABLE(of, temac_of_match); |
| 1025 | 1025 | ||
| 1026 | static struct of_platform_driver temac_of_driver = { | 1026 | static struct of_platform_driver temac_of_driver = { |
| 1027 | .match_table = temac_of_match, | ||
| 1028 | .probe = temac_of_probe, | 1027 | .probe = temac_of_probe, |
| 1029 | .remove = __devexit_p(temac_of_remove), | 1028 | .remove = __devexit_p(temac_of_remove), |
| 1030 | .driver = { | 1029 | .driver = { |
| 1031 | .owner = THIS_MODULE, | 1030 | .owner = THIS_MODULE, |
| 1032 | .name = "xilinx_temac", | 1031 | .name = "xilinx_temac", |
| 1032 | .of_match_table = temac_of_match, | ||
| 1033 | }, | 1033 | }, |
| 1034 | }; | 1034 | }; |
| 1035 | 1035 | ||
diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c index 3898108f98c..1a57c3da1f4 100644 --- a/drivers/net/myri_sbus.c +++ b/drivers/net/myri_sbus.c | |||
| @@ -928,7 +928,7 @@ static const struct net_device_ops myri_ops = { | |||
| 928 | 928 | ||
| 929 | static int __devinit myri_sbus_probe(struct of_device *op, const struct of_device_id *match) | 929 | static int __devinit myri_sbus_probe(struct of_device *op, const struct of_device_id *match) |
| 930 | { | 930 | { |
| 931 | struct device_node *dp = op->node; | 931 | struct device_node *dp = op->dev.of_node; |
| 932 | static unsigned version_printed; | 932 | static unsigned version_printed; |
| 933 | struct net_device *dev; | 933 | struct net_device *dev; |
| 934 | struct myri_eth *mp; | 934 | struct myri_eth *mp; |
| @@ -1161,8 +1161,11 @@ static const struct of_device_id myri_sbus_match[] = { | |||
| 1161 | MODULE_DEVICE_TABLE(of, myri_sbus_match); | 1161 | MODULE_DEVICE_TABLE(of, myri_sbus_match); |
| 1162 | 1162 | ||
| 1163 | static struct of_platform_driver myri_sbus_driver = { | 1163 | static struct of_platform_driver myri_sbus_driver = { |
| 1164 | .name = "myri", | 1164 | .driver = { |
| 1165 | .match_table = myri_sbus_match, | 1165 | .name = "myri", |
| 1166 | .owner = THIS_MODULE, | ||
| 1167 | .of_match_table = myri_sbus_match, | ||
| 1168 | }, | ||
| 1166 | .probe = myri_sbus_probe, | 1169 | .probe = myri_sbus_probe, |
| 1167 | .remove = __devexit_p(myri_sbus_remove), | 1170 | .remove = __devexit_p(myri_sbus_remove), |
| 1168 | }; | 1171 | }; |
diff --git a/drivers/net/niu.c b/drivers/net/niu.c index 30abb4e436f..63e8e3893bd 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c | |||
| @@ -9115,7 +9115,7 @@ static int __devinit niu_n2_irq_init(struct niu *np, u8 *ldg_num_map) | |||
| 9115 | const u32 *int_prop; | 9115 | const u32 *int_prop; |
| 9116 | int i; | 9116 | int i; |
| 9117 | 9117 | ||
| 9118 | int_prop = of_get_property(op->node, "interrupts", NULL); | 9118 | int_prop = of_get_property(op->dev.of_node, "interrupts", NULL); |
| 9119 | if (!int_prop) | 9119 | if (!int_prop) |
| 9120 | return -ENODEV; | 9120 | return -ENODEV; |
| 9121 | 9121 | ||
| @@ -9266,7 +9266,7 @@ static int __devinit niu_get_of_props(struct niu *np) | |||
| 9266 | int prop_len; | 9266 | int prop_len; |
| 9267 | 9267 | ||
| 9268 | if (np->parent->plat_type == PLAT_TYPE_NIU) | 9268 | if (np->parent->plat_type == PLAT_TYPE_NIU) |
| 9269 | dp = np->op->node; | 9269 | dp = np->op->dev.of_node; |
| 9270 | else | 9270 | else |
| 9271 | dp = pci_device_to_OF_node(np->pdev); | 9271 | dp = pci_device_to_OF_node(np->pdev); |
| 9272 | 9272 | ||
| @@ -10083,10 +10083,10 @@ static int __devinit niu_of_probe(struct of_device *op, | |||
| 10083 | 10083 | ||
| 10084 | niu_driver_version(); | 10084 | niu_driver_version(); |
| 10085 | 10085 | ||
| 10086 | reg = of_get_property(op->node, "reg", NULL); | 10086 | reg = of_get_property(op->dev.of_node, "reg", NULL); |
| 10087 | if (!reg) { | 10087 | if (!reg) { |
| 10088 | dev_err(&op->dev, "%s: No 'reg' property, aborting\n", | 10088 | dev_err(&op->dev, "%s: No 'reg' property, aborting\n", |
| 10089 | op->node->full_name); | 10089 | op->dev.of_node->full_name); |
| 10090 | return -ENODEV; | 10090 | return -ENODEV; |
| 10091 | } | 10091 | } |
| 10092 | 10092 | ||
| @@ -10099,7 +10099,7 @@ static int __devinit niu_of_probe(struct of_device *op, | |||
| 10099 | np = netdev_priv(dev); | 10099 | np = netdev_priv(dev); |
| 10100 | 10100 | ||
| 10101 | memset(&parent_id, 0, sizeof(parent_id)); | 10101 | memset(&parent_id, 0, sizeof(parent_id)); |
| 10102 | parent_id.of = of_get_parent(op->node); | 10102 | parent_id.of = of_get_parent(op->dev.of_node); |
| 10103 | 10103 | ||
| 10104 | np->parent = niu_get_parent(np, &parent_id, | 10104 | np->parent = niu_get_parent(np, &parent_id, |
| 10105 | PLAT_TYPE_NIU); | 10105 | PLAT_TYPE_NIU); |
| @@ -10234,8 +10234,11 @@ static const struct of_device_id niu_match[] = { | |||
| 10234 | MODULE_DEVICE_TABLE(of, niu_match); | 10234 | MODULE_DEVICE_TABLE(of, niu_match); |
| 10235 | 10235 | ||
| 10236 | static struct of_platform_driver niu_of_driver = { | 10236 | static struct of_platform_driver niu_of_driver = { |
| 10237 | .name = "niu", | 10237 | .driver = { |
| 10238 | .match_table = niu_match, | 10238 | .name = "niu", |
| 10239 | .owner = THIS_MODULE, | ||
| 10240 | .of_match_table = niu_match, | ||
| 10241 | }, | ||
| 10239 | .probe = niu_of_probe, | 10242 | .probe = niu_of_probe, |
| 10240 | .remove = __devexit_p(niu_of_remove), | 10243 | .remove = __devexit_p(niu_of_remove), |
| 10241 | }; | 10244 | }; |
diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c index 35897134a5d..fc5fef2a817 100644 --- a/drivers/net/phy/mdio-gpio.c +++ b/drivers/net/phy/mdio-gpio.c | |||
| @@ -199,12 +199,12 @@ static int __devinit mdio_ofgpio_probe(struct of_device *ofdev, | |||
| 199 | if (!pdata) | 199 | if (!pdata) |
| 200 | return -ENOMEM; | 200 | return -ENOMEM; |
| 201 | 201 | ||
| 202 | ret = of_get_gpio(ofdev->node, 0); | 202 | ret = of_get_gpio(ofdev->dev.of_node, 0); |
| 203 | if (ret < 0) | 203 | if (ret < 0) |
| 204 | goto out_free; | 204 | goto out_free; |
| 205 | pdata->mdc = ret; | 205 | pdata->mdc = ret; |
| 206 | 206 | ||
| 207 | ret = of_get_gpio(ofdev->node, 1); | 207 | ret = of_get_gpio(ofdev->dev.of_node, 1); |
| 208 | if (ret < 0) | 208 | if (ret < 0) |
| 209 | goto out_free; | 209 | goto out_free; |
| 210 | pdata->mdio = ret; | 210 | pdata->mdio = ret; |
| @@ -213,7 +213,7 @@ static int __devinit mdio_ofgpio_probe(struct of_device *ofdev, | |||
| 213 | if (!new_bus) | 213 | if (!new_bus) |
| 214 | goto out_free; | 214 | goto out_free; |
| 215 | 215 | ||
| 216 | ret = of_mdiobus_register(new_bus, ofdev->node); | 216 | ret = of_mdiobus_register(new_bus, ofdev->dev.of_node); |
| 217 | if (ret) | 217 | if (ret) |
| 218 | mdio_gpio_bus_deinit(&ofdev->dev); | 218 | mdio_gpio_bus_deinit(&ofdev->dev); |
| 219 | 219 | ||
| @@ -241,8 +241,11 @@ static struct of_device_id mdio_ofgpio_match[] = { | |||
| 241 | MODULE_DEVICE_TABLE(of, mdio_ofgpio_match); | 241 | MODULE_DEVICE_TABLE(of, mdio_ofgpio_match); |
| 242 | 242 | ||
| 243 | static struct of_platform_driver mdio_ofgpio_driver = { | 243 | static struct of_platform_driver mdio_ofgpio_driver = { |
| 244 | .name = "mdio-gpio", | 244 | .driver = { |
| 245 | .match_table = mdio_ofgpio_match, | 245 | .name = "mdio-gpio", |
| 246 | .owner = THIS_MODULE, | ||
| 247 | .of_match_table = mdio_ofgpio_match, | ||
| 248 | }, | ||
| 246 | .probe = mdio_ofgpio_probe, | 249 | .probe = mdio_ofgpio_probe, |
| 247 | .remove = __devexit_p(mdio_ofgpio_remove), | 250 | .remove = __devexit_p(mdio_ofgpio_remove), |
| 248 | }; | 251 | }; |
diff --git a/drivers/net/sunbmac.c b/drivers/net/sunbmac.c index 4591fe9bf0b..367e96f317d 100644 --- a/drivers/net/sunbmac.c +++ b/drivers/net/sunbmac.c | |||
| @@ -1131,8 +1131,8 @@ static int __devinit bigmac_ether_init(struct of_device *op, | |||
| 1131 | goto fail_and_cleanup; | 1131 | goto fail_and_cleanup; |
| 1132 | 1132 | ||
| 1133 | /* Get supported SBUS burst sizes. */ | 1133 | /* Get supported SBUS burst sizes. */ |
| 1134 | bsizes = of_getintprop_default(qec_op->node, "burst-sizes", 0xff); | 1134 | bsizes = of_getintprop_default(qec_op->dev.of_node, "burst-sizes", 0xff); |
| 1135 | bsizes_more = of_getintprop_default(qec_op->node, "burst-sizes", 0xff); | 1135 | bsizes_more = of_getintprop_default(qec_op->dev.of_node, "burst-sizes", 0xff); |
| 1136 | 1136 | ||
| 1137 | bsizes &= 0xff; | 1137 | bsizes &= 0xff; |
| 1138 | if (bsizes_more != 0xff) | 1138 | if (bsizes_more != 0xff) |
| @@ -1184,7 +1184,7 @@ static int __devinit bigmac_ether_init(struct of_device *op, | |||
| 1184 | } | 1184 | } |
| 1185 | 1185 | ||
| 1186 | /* Get the board revision of this BigMAC. */ | 1186 | /* Get the board revision of this BigMAC. */ |
| 1187 | bp->board_rev = of_getintprop_default(bp->bigmac_op->node, | 1187 | bp->board_rev = of_getintprop_default(bp->bigmac_op->dev.of_node, |
| 1188 | "board-version", 1); | 1188 | "board-version", 1); |
| 1189 | 1189 | ||
| 1190 | /* Init auto-negotiation timer state. */ | 1190 | /* Init auto-negotiation timer state. */ |
| @@ -1290,8 +1290,11 @@ static const struct of_device_id bigmac_sbus_match[] = { | |||
| 1290 | MODULE_DEVICE_TABLE(of, bigmac_sbus_match); | 1290 | MODULE_DEVICE_TABLE(of, bigmac_sbus_match); |
| 1291 | 1291 | ||
| 1292 | static struct of_platform_driver bigmac_sbus_driver = { | 1292 | static struct of_platform_driver bigmac_sbus_driver = { |
| 1293 | .name = "sunbmac", | 1293 | .driver = { |
| 1294 | .match_table = bigmac_sbus_match, | 1294 | .name = "sunbmac", |
| 1295 | .owner = THIS_MODULE, | ||
| 1296 | .of_match_table = bigmac_sbus_match, | ||
| 1297 | }, | ||
| 1295 | .probe = bigmac_sbus_probe, | 1298 | .probe = bigmac_sbus_probe, |
| 1296 | .remove = __devexit_p(bigmac_sbus_remove), | 1299 | .remove = __devexit_p(bigmac_sbus_remove), |
| 1297 | }; | 1300 | }; |
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index 915c5909c7a..3d9650b8d38 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c | |||
| @@ -2481,7 +2481,7 @@ static void hme_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info | |||
| 2481 | else { | 2481 | else { |
| 2482 | const struct linux_prom_registers *regs; | 2482 | const struct linux_prom_registers *regs; |
| 2483 | struct of_device *op = hp->happy_dev; | 2483 | struct of_device *op = hp->happy_dev; |
| 2484 | regs = of_get_property(op->node, "regs", NULL); | 2484 | regs = of_get_property(op->dev.of_node, "regs", NULL); |
| 2485 | if (regs) | 2485 | if (regs) |
| 2486 | sprintf(info->bus_info, "SBUS:%d", | 2486 | sprintf(info->bus_info, "SBUS:%d", |
| 2487 | regs->which_io); | 2487 | regs->which_io); |
| @@ -2641,14 +2641,14 @@ static const struct net_device_ops hme_netdev_ops = { | |||
| 2641 | #ifdef CONFIG_SBUS | 2641 | #ifdef CONFIG_SBUS |
| 2642 | static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe) | 2642 | static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe) |
| 2643 | { | 2643 | { |
| 2644 | struct device_node *dp = op->node, *sbus_dp; | 2644 | struct device_node *dp = op->dev.of_node, *sbus_dp; |
| 2645 | struct quattro *qp = NULL; | 2645 | struct quattro *qp = NULL; |
| 2646 | struct happy_meal *hp; | 2646 | struct happy_meal *hp; |
| 2647 | struct net_device *dev; | 2647 | struct net_device *dev; |
| 2648 | int i, qfe_slot = -1; | 2648 | int i, qfe_slot = -1; |
| 2649 | int err = -ENODEV; | 2649 | int err = -ENODEV; |
| 2650 | 2650 | ||
| 2651 | sbus_dp = to_of_device(op->dev.parent)->node; | 2651 | sbus_dp = to_of_device(op->dev.parent)->dev.of_node; |
| 2652 | 2652 | ||
| 2653 | /* We can match PCI devices too, do not accept those here. */ | 2653 | /* We can match PCI devices too, do not accept those here. */ |
| 2654 | if (strcmp(sbus_dp->name, "sbus")) | 2654 | if (strcmp(sbus_dp->name, "sbus")) |
| @@ -3237,7 +3237,7 @@ static void happy_meal_pci_exit(void) | |||
| 3237 | #ifdef CONFIG_SBUS | 3237 | #ifdef CONFIG_SBUS |
| 3238 | static int __devinit hme_sbus_probe(struct of_device *op, const struct of_device_id *match) | 3238 | static int __devinit hme_sbus_probe(struct of_device *op, const struct of_device_id *match) |
| 3239 | { | 3239 | { |
| 3240 | struct device_node *dp = op->node; | 3240 | struct device_node *dp = op->dev.of_node; |
| 3241 | const char *model = of_get_property(dp, "model", NULL); | 3241 | const char *model = of_get_property(dp, "model", NULL); |
| 3242 | int is_qfe = (match->data != NULL); | 3242 | int is_qfe = (match->data != NULL); |
| 3243 | 3243 | ||
| @@ -3291,8 +3291,11 @@ static const struct of_device_id hme_sbus_match[] = { | |||
| 3291 | MODULE_DEVICE_TABLE(of, hme_sbus_match); | 3291 | MODULE_DEVICE_TABLE(of, hme_sbus_match); |
| 3292 | 3292 | ||
| 3293 | static struct of_platform_driver hme_sbus_driver = { | 3293 | static struct of_platform_driver hme_sbus_driver = { |
| 3294 | .name = "hme", | 3294 | .driver = { |
| 3295 | .match_table = hme_sbus_match, | 3295 | .name = "hme", |
| 3296 | .owner = THIS_MODULE, | ||
| 3297 | .of_match_table = hme_sbus_match, | ||
| 3298 | }, | ||
| 3296 | .probe = hme_sbus_probe, | 3299 | .probe = hme_sbus_probe, |
| 3297 | .remove = __devexit_p(hme_sbus_remove), | 3300 | .remove = __devexit_p(hme_sbus_remove), |
| 3298 | }; | 3301 | }; |
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c index 386af7bbe67..7d9c33dd9d1 100644 --- a/drivers/net/sunlance.c +++ b/drivers/net/sunlance.c | |||
| @@ -1323,7 +1323,7 @@ static int __devinit sparc_lance_probe_one(struct of_device *op, | |||
| 1323 | struct of_device *ledma, | 1323 | struct of_device *ledma, |
| 1324 | struct of_device *lebuffer) | 1324 | struct of_device *lebuffer) |
| 1325 | { | 1325 | { |
| 1326 | struct device_node *dp = op->node; | 1326 | struct device_node *dp = op->dev.of_node; |
| 1327 | static unsigned version_printed; | 1327 | static unsigned version_printed; |
| 1328 | struct lance_private *lp; | 1328 | struct lance_private *lp; |
| 1329 | struct net_device *dev; | 1329 | struct net_device *dev; |
| @@ -1410,7 +1410,7 @@ static int __devinit sparc_lance_probe_one(struct of_device *op, | |||
| 1410 | 1410 | ||
| 1411 | lp->burst_sizes = 0; | 1411 | lp->burst_sizes = 0; |
| 1412 | if (lp->ledma) { | 1412 | if (lp->ledma) { |
| 1413 | struct device_node *ledma_dp = ledma->node; | 1413 | struct device_node *ledma_dp = ledma->dev.of_node; |
| 1414 | struct device_node *sbus_dp; | 1414 | struct device_node *sbus_dp; |
| 1415 | unsigned int sbmask; | 1415 | unsigned int sbmask; |
| 1416 | const char *prop; | 1416 | const char *prop; |
| @@ -1506,7 +1506,7 @@ fail: | |||
| 1506 | static int __devinit sunlance_sbus_probe(struct of_device *op, const struct of_device_id *match) | 1506 | static int __devinit sunlance_sbus_probe(struct of_device *op, const struct of_device_id *match) |
| 1507 | { | 1507 | { |
| 1508 | struct of_device *parent = to_of_device(op->dev.parent); | 1508 | struct of_device *parent = to_of_device(op->dev.parent); |
| 1509 | struct device_node *parent_dp = parent->node; | 1509 | struct device_node *parent_dp = parent->dev.of_node; |
| 1510 | int err; | 1510 | int err; |
| 1511 | 1511 | ||
| 1512 | if (!strcmp(parent_dp->name, "ledma")) { | 1512 | if (!strcmp(parent_dp->name, "ledma")) { |
| @@ -1545,8 +1545,11 @@ static const struct of_device_id sunlance_sbus_match[] = { | |||
| 1545 | MODULE_DEVICE_TABLE(of, sunlance_sbus_match); | 1545 | MODULE_DEVICE_TABLE(of, sunlance_sbus_match); |
| 1546 | 1546 | ||
| 1547 | static struct of_platform_driver sunlance_sbus_driver = { | 1547 | static struct of_platform_driver sunlance_sbus_driver = { |
| 1548 | .name = "sunlance", | 1548 | .driver = { |
| 1549 | .match_table = sunlance_sbus_match, | 1549 | .name = "sunlance", |
| 1550 | .owner = THIS_MODULE, | ||
| 1551 | .of_match_table = sunlance_sbus_match, | ||
| 1552 | }, | ||
| 1550 | .probe = sunlance_sbus_probe, | 1553 | .probe = sunlance_sbus_probe, |
| 1551 | .remove = __devexit_p(sunlance_sbus_remove), | 1554 | .remove = __devexit_p(sunlance_sbus_remove), |
| 1552 | }; | 1555 | }; |
diff --git a/drivers/net/sunqe.c b/drivers/net/sunqe.c index a7542d25c84..72b579c8d81 100644 --- a/drivers/net/sunqe.c +++ b/drivers/net/sunqe.c | |||
| @@ -695,7 +695,7 @@ static void qe_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) | |||
| 695 | strcpy(info->version, "3.0"); | 695 | strcpy(info->version, "3.0"); |
| 696 | 696 | ||
| 697 | op = qep->op; | 697 | op = qep->op; |
| 698 | regs = of_get_property(op->node, "reg", NULL); | 698 | regs = of_get_property(op->dev.of_node, "reg", NULL); |
| 699 | if (regs) | 699 | if (regs) |
| 700 | sprintf(info->bus_info, "SBUS:%d", regs->which_io); | 700 | sprintf(info->bus_info, "SBUS:%d", regs->which_io); |
| 701 | 701 | ||
| @@ -799,7 +799,7 @@ static struct sunqec * __devinit get_qec(struct of_device *child) | |||
| 799 | if (qec_global_reset(qecp->gregs)) | 799 | if (qec_global_reset(qecp->gregs)) |
| 800 | goto fail; | 800 | goto fail; |
| 801 | 801 | ||
| 802 | qecp->qec_bursts = qec_get_burst(op->node); | 802 | qecp->qec_bursts = qec_get_burst(op->dev.of_node); |
| 803 | 803 | ||
| 804 | qec_init_once(qecp, op); | 804 | qec_init_once(qecp, op); |
| 805 | 805 | ||
| @@ -857,7 +857,7 @@ static int __devinit qec_ether_init(struct of_device *op) | |||
| 857 | 857 | ||
| 858 | res = -ENODEV; | 858 | res = -ENODEV; |
| 859 | 859 | ||
| 860 | i = of_getintprop_default(op->node, "channel#", -1); | 860 | i = of_getintprop_default(op->dev.of_node, "channel#", -1); |
| 861 | if (i == -1) | 861 | if (i == -1) |
| 862 | goto fail; | 862 | goto fail; |
| 863 | qe->channel = i; | 863 | qe->channel = i; |
| @@ -977,8 +977,11 @@ static const struct of_device_id qec_sbus_match[] = { | |||
| 977 | MODULE_DEVICE_TABLE(of, qec_sbus_match); | 977 | MODULE_DEVICE_TABLE(of, qec_sbus_match); |
| 978 | 978 | ||
| 979 | static struct of_platform_driver qec_sbus_driver = { | 979 | static struct of_platform_driver qec_sbus_driver = { |
| 980 | .name = "qec", | 980 | .driver = { |
| 981 | .match_table = qec_sbus_match, | 981 | .name = "qec", |
| 982 | .owner = THIS_MODULE, | ||
| 983 | .of_match_table = qec_sbus_match, | ||
| 984 | }, | ||
| 982 | .probe = qec_sbus_probe, | 985 | .probe = qec_sbus_probe, |
| 983 | .remove = __devexit_p(qec_sbus_remove), | 986 | .remove = __devexit_p(qec_sbus_remove), |
| 984 | }; | 987 | }; |
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 932602db54b..4a34833b85d 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c | |||
| @@ -3719,7 +3719,7 @@ static const struct net_device_ops ucc_geth_netdev_ops = { | |||
| 3719 | static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *match) | 3719 | static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *match) |
| 3720 | { | 3720 | { |
| 3721 | struct device *device = &ofdev->dev; | 3721 | struct device *device = &ofdev->dev; |
| 3722 | struct device_node *np = ofdev->node; | 3722 | struct device_node *np = ofdev->dev.of_node; |
| 3723 | struct net_device *dev = NULL; | 3723 | struct net_device *dev = NULL; |
| 3724 | struct ucc_geth_private *ugeth = NULL; | 3724 | struct ucc_geth_private *ugeth = NULL; |
| 3725 | struct ucc_geth_info *ug_info; | 3725 | struct ucc_geth_info *ug_info; |
| @@ -3963,8 +3963,11 @@ static struct of_device_id ucc_geth_match[] = { | |||
| 3963 | MODULE_DEVICE_TABLE(of, ucc_geth_match); | 3963 | MODULE_DEVICE_TABLE(of, ucc_geth_match); |
| 3964 | 3964 | ||
| 3965 | static struct of_platform_driver ucc_geth_driver = { | 3965 | static struct of_platform_driver ucc_geth_driver = { |
| 3966 | .name = DRV_NAME, | 3966 | .driver = { |
| 3967 | .match_table = ucc_geth_match, | 3967 | .name = DRV_NAME, |
| 3968 | .owner = THIS_MODULE, | ||
| 3969 | .of_match_table = ucc_geth_match, | ||
| 3970 | }, | ||
| 3968 | .probe = ucc_geth_probe, | 3971 | .probe = ucc_geth_probe, |
| 3969 | .remove = ucc_geth_remove, | 3972 | .remove = ucc_geth_remove, |
| 3970 | .suspend = ucc_geth_suspend, | 3973 | .suspend = ucc_geth_suspend, |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 893b552981a..abfa0493236 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
| @@ -752,7 +752,6 @@ static int ath_key_config(struct ath_common *common, | |||
| 752 | struct ath_hw *ah = common->ah; | 752 | struct ath_hw *ah = common->ah; |
| 753 | struct ath9k_keyval hk; | 753 | struct ath9k_keyval hk; |
| 754 | const u8 *mac = NULL; | 754 | const u8 *mac = NULL; |
| 755 | u8 gmac[ETH_ALEN]; | ||
| 756 | int ret = 0; | 755 | int ret = 0; |
| 757 | int idx; | 756 | int idx; |
| 758 | 757 | ||
| @@ -776,30 +775,9 @@ static int ath_key_config(struct ath_common *common, | |||
| 776 | memcpy(hk.kv_val, key->key, key->keylen); | 775 | memcpy(hk.kv_val, key->key, key->keylen); |
| 777 | 776 | ||
| 778 | if (!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) { | 777 | if (!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) { |
| 779 | 778 | /* For now, use the default keys for broadcast keys. This may | |
| 780 | if (key->ap_addr) { | 779 | * need to change with virtual interfaces. */ |
| 781 | /* | 780 | idx = key->keyidx; |
| 782 | * Group keys on hardware that supports multicast frame | ||
| 783 | * key search use a mac that is the sender's address with | ||
| 784 | * the high bit set instead of the app-specified address. | ||
| 785 | */ | ||
| 786 | memcpy(gmac, key->ap_addr, ETH_ALEN); | ||
| 787 | gmac[0] |= 0x80; | ||
| 788 | mac = gmac; | ||
| 789 | |||
| 790 | if (key->alg == ALG_TKIP) | ||
| 791 | idx = ath_reserve_key_cache_slot_tkip(common); | ||
| 792 | else | ||
| 793 | idx = ath_reserve_key_cache_slot(common); | ||
| 794 | if (idx < 0) | ||
| 795 | mac = NULL; /* no free key cache entries */ | ||
| 796 | } | ||
| 797 | |||
| 798 | if (!mac) { | ||
| 799 | /* For now, use the default keys for broadcast keys. This may | ||
| 800 | * need to change with virtual interfaces. */ | ||
| 801 | idx = key->keyidx; | ||
| 802 | } | ||
| 803 | } else if (key->keyidx) { | 781 | } else if (key->keyidx) { |
| 804 | if (WARN_ON(!sta)) | 782 | if (WARN_ON(!sta)) |
| 805 | return -EOPNOTSUPP; | 783 | return -EOPNOTSUPP; |
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c index a7db68d37ee..d04c5b26205 100644 --- a/drivers/net/xilinx_emaclite.c +++ b/drivers/net/xilinx_emaclite.c | |||
| @@ -1088,7 +1088,7 @@ static void xemaclite_remove_ndev(struct net_device *ndev) | |||
| 1088 | */ | 1088 | */ |
| 1089 | static bool get_bool(struct of_device *ofdev, const char *s) | 1089 | static bool get_bool(struct of_device *ofdev, const char *s) |
| 1090 | { | 1090 | { |
| 1091 | u32 *p = (u32 *)of_get_property(ofdev->node, s, NULL); | 1091 | u32 *p = (u32 *)of_get_property(ofdev->dev.of_node, s, NULL); |
| 1092 | 1092 | ||
| 1093 | if (p) { | 1093 | if (p) { |
| 1094 | return (bool)*p; | 1094 | return (bool)*p; |
| @@ -1130,14 +1130,14 @@ static int __devinit xemaclite_of_probe(struct of_device *ofdev, | |||
| 1130 | dev_info(dev, "Device Tree Probing\n"); | 1130 | dev_info(dev, "Device Tree Probing\n"); |
| 1131 | 1131 | ||
| 1132 | /* Get iospace for the device */ | 1132 | /* Get iospace for the device */ |
| 1133 | rc = of_address_to_resource(ofdev->node, 0, &r_mem); | 1133 | rc = of_address_to_resource(ofdev->dev.of_node, 0, &r_mem); |
| 1134 | if (rc) { | 1134 | if (rc) { |
| 1135 | dev_err(dev, "invalid address\n"); | 1135 | dev_err(dev, "invalid address\n"); |
| 1136 | return rc; | 1136 | return rc; |
| 1137 | } | 1137 | } |
| 1138 | 1138 | ||
| 1139 | /* Get IRQ for the device */ | 1139 | /* Get IRQ for the device */ |
| 1140 | rc = of_irq_to_resource(ofdev->node, 0, &r_irq); | 1140 | rc = of_irq_to_resource(ofdev->dev.of_node, 0, &r_irq); |
| 1141 | if (rc == NO_IRQ) { | 1141 | if (rc == NO_IRQ) { |
| 1142 | dev_err(dev, "no IRQ found\n"); | 1142 | dev_err(dev, "no IRQ found\n"); |
| 1143 | return rc; | 1143 | return rc; |
| @@ -1182,7 +1182,7 @@ static int __devinit xemaclite_of_probe(struct of_device *ofdev, | |||
| 1182 | lp->next_rx_buf_to_use = 0x0; | 1182 | lp->next_rx_buf_to_use = 0x0; |
| 1183 | lp->tx_ping_pong = get_bool(ofdev, "xlnx,tx-ping-pong"); | 1183 | lp->tx_ping_pong = get_bool(ofdev, "xlnx,tx-ping-pong"); |
| 1184 | lp->rx_ping_pong = get_bool(ofdev, "xlnx,rx-ping-pong"); | 1184 | lp->rx_ping_pong = get_bool(ofdev, "xlnx,rx-ping-pong"); |
| 1185 | mac_address = of_get_mac_address(ofdev->node); | 1185 | mac_address = of_get_mac_address(ofdev->dev.of_node); |
| 1186 | 1186 | ||
| 1187 | if (mac_address) | 1187 | if (mac_address) |
| 1188 | /* Set the MAC address. */ | 1188 | /* Set the MAC address. */ |
| @@ -1197,7 +1197,7 @@ static int __devinit xemaclite_of_probe(struct of_device *ofdev, | |||
| 1197 | /* Set the MAC address in the EmacLite device */ | 1197 | /* Set the MAC address in the EmacLite device */ |
| 1198 | xemaclite_update_address(lp, ndev->dev_addr); | 1198 | xemaclite_update_address(lp, ndev->dev_addr); |
| 1199 | 1199 | ||
| 1200 | lp->phy_node = of_parse_phandle(ofdev->node, "phy-handle", 0); | 1200 | lp->phy_node = of_parse_phandle(ofdev->dev.of_node, "phy-handle", 0); |
| 1201 | rc = xemaclite_mdio_setup(lp, &ofdev->dev); | 1201 | rc = xemaclite_mdio_setup(lp, &ofdev->dev); |
| 1202 | if (rc) | 1202 | if (rc) |
| 1203 | dev_warn(&ofdev->dev, "error registering MDIO bus\n"); | 1203 | dev_warn(&ofdev->dev, "error registering MDIO bus\n"); |
| @@ -1291,8 +1291,11 @@ static struct of_device_id xemaclite_of_match[] __devinitdata = { | |||
| 1291 | MODULE_DEVICE_TABLE(of, xemaclite_of_match); | 1291 | MODULE_DEVICE_TABLE(of, xemaclite_of_match); |
| 1292 | 1292 | ||
| 1293 | static struct of_platform_driver xemaclite_of_driver = { | 1293 | static struct of_platform_driver xemaclite_of_driver = { |
| 1294 | .name = DRIVER_NAME, | 1294 | .driver = { |
| 1295 | .match_table = xemaclite_of_match, | 1295 | .name = DRIVER_NAME, |
| 1296 | .owner = THIS_MODULE, | ||
| 1297 | .of_match_table = xemaclite_of_match, | ||
| 1298 | }, | ||
| 1296 | .probe = xemaclite_of_probe, | 1299 | .probe = xemaclite_of_probe, |
| 1297 | .remove = __devexit_p(xemaclite_of_remove), | 1300 | .remove = __devexit_p(xemaclite_of_remove), |
| 1298 | }; | 1301 | }; |
diff --git a/drivers/of/device.c b/drivers/of/device.c index 224ae6bc67b..7d18f8e0b01 100644 --- a/drivers/of/device.c +++ b/drivers/of/device.c | |||
| @@ -10,8 +10,7 @@ | |||
| 10 | #include <asm/errno.h> | 10 | #include <asm/errno.h> |
| 11 | 11 | ||
| 12 | /** | 12 | /** |
| 13 | * of_match_device - Tell if an of_device structure has a matching | 13 | * of_match_device - Tell if a struct device matches an of_device_id list |
| 14 | * of_match structure | ||
| 15 | * @ids: array of of device match structures to search in | 14 | * @ids: array of of device match structures to search in |
| 16 | * @dev: the of device structure to match against | 15 | * @dev: the of device structure to match against |
| 17 | * | 16 | * |
| @@ -19,11 +18,11 @@ | |||
| 19 | * system is in its list of supported devices. | 18 | * system is in its list of supported devices. |
| 20 | */ | 19 | */ |
| 21 | const struct of_device_id *of_match_device(const struct of_device_id *matches, | 20 | const struct of_device_id *of_match_device(const struct of_device_id *matches, |
| 22 | const struct of_device *dev) | 21 | const struct device *dev) |
| 23 | { | 22 | { |
| 24 | if (!dev->node) | 23 | if (!dev->of_node) |
| 25 | return NULL; | 24 | return NULL; |
| 26 | return of_match_node(matches, dev->node); | 25 | return of_match_node(matches, dev->of_node); |
| 27 | } | 26 | } |
| 28 | EXPORT_SYMBOL(of_match_device); | 27 | EXPORT_SYMBOL(of_match_device); |
| 29 | 28 | ||
| @@ -54,7 +53,7 @@ static ssize_t devspec_show(struct device *dev, | |||
| 54 | struct of_device *ofdev; | 53 | struct of_device *ofdev; |
| 55 | 54 | ||
| 56 | ofdev = to_of_device(dev); | 55 | ofdev = to_of_device(dev); |
| 57 | return sprintf(buf, "%s\n", ofdev->node->full_name); | 56 | return sprintf(buf, "%s\n", ofdev->dev.of_node->full_name); |
| 58 | } | 57 | } |
| 59 | 58 | ||
| 60 | static ssize_t name_show(struct device *dev, | 59 | static ssize_t name_show(struct device *dev, |
| @@ -63,7 +62,7 @@ static ssize_t name_show(struct device *dev, | |||
| 63 | struct of_device *ofdev; | 62 | struct of_device *ofdev; |
| 64 | 63 | ||
| 65 | ofdev = to_of_device(dev); | 64 | ofdev = to_of_device(dev); |
| 66 | return sprintf(buf, "%s\n", ofdev->node->name); | 65 | return sprintf(buf, "%s\n", ofdev->dev.of_node->name); |
| 67 | } | 66 | } |
| 68 | 67 | ||
| 69 | static ssize_t modalias_show(struct device *dev, | 68 | static ssize_t modalias_show(struct device *dev, |
| @@ -97,14 +96,14 @@ void of_release_dev(struct device *dev) | |||
| 97 | struct of_device *ofdev; | 96 | struct of_device *ofdev; |
| 98 | 97 | ||
| 99 | ofdev = to_of_device(dev); | 98 | ofdev = to_of_device(dev); |
| 100 | of_node_put(ofdev->node); | 99 | of_node_put(ofdev->dev.of_node); |
| 101 | kfree(ofdev); | 100 | kfree(ofdev); |
| 102 | } | 101 | } |
| 103 | EXPORT_SYMBOL(of_release_dev); | 102 | EXPORT_SYMBOL(of_release_dev); |
| 104 | 103 | ||
| 105 | int of_device_register(struct of_device *ofdev) | 104 | int of_device_register(struct of_device *ofdev) |
| 106 | { | 105 | { |
| 107 | BUG_ON(ofdev->node == NULL); | 106 | BUG_ON(ofdev->dev.of_node == NULL); |
| 108 | 107 | ||
| 109 | device_initialize(&ofdev->dev); | 108 | device_initialize(&ofdev->dev); |
| 110 | 109 | ||
| @@ -112,7 +111,7 @@ int of_device_register(struct of_device *ofdev) | |||
| 112 | * the parent. If there is no parent defined, set the node | 111 | * the parent. If there is no parent defined, set the node |
| 113 | * explicitly */ | 112 | * explicitly */ |
| 114 | if (!ofdev->dev.parent) | 113 | if (!ofdev->dev.parent) |
| 115 | set_dev_node(&ofdev->dev, of_node_to_nid(ofdev->node)); | 114 | set_dev_node(&ofdev->dev, of_node_to_nid(ofdev->dev.of_node)); |
| 116 | 115 | ||
| 117 | return device_add(&ofdev->dev); | 116 | return device_add(&ofdev->dev); |
| 118 | } | 117 | } |
| @@ -132,11 +131,11 @@ ssize_t of_device_get_modalias(struct of_device *ofdev, | |||
| 132 | ssize_t tsize, csize, repend; | 131 | ssize_t tsize, csize, repend; |
| 133 | 132 | ||
| 134 | /* Name & Type */ | 133 | /* Name & Type */ |
| 135 | csize = snprintf(str, len, "of:N%sT%s", | 134 | csize = snprintf(str, len, "of:N%sT%s", ofdev->dev.of_node->name, |
| 136 | ofdev->node->name, ofdev->node->type); | 135 | ofdev->dev.of_node->type); |
| 137 | 136 | ||
| 138 | /* Get compatible property if any */ | 137 | /* Get compatible property if any */ |
| 139 | compat = of_get_property(ofdev->node, "compatible", &cplen); | 138 | compat = of_get_property(ofdev->dev.of_node, "compatible", &cplen); |
| 140 | if (!compat) | 139 | if (!compat) |
| 141 | return csize; | 140 | return csize; |
| 142 | 141 | ||
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index dee4fb56b09..b6987bba855 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c | |||
| @@ -556,6 +556,21 @@ void __init unflatten_device_tree(void) | |||
| 556 | 556 | ||
| 557 | pr_debug(" -> unflatten_device_tree()\n"); | 557 | pr_debug(" -> unflatten_device_tree()\n"); |
| 558 | 558 | ||
| 559 | if (!initial_boot_params) { | ||
| 560 | pr_debug("No device tree pointer\n"); | ||
| 561 | return; | ||
| 562 | } | ||
| 563 | |||
| 564 | pr_debug("Unflattening device tree:\n"); | ||
| 565 | pr_debug("magic: %08x\n", be32_to_cpu(initial_boot_params->magic)); | ||
| 566 | pr_debug("size: %08x\n", be32_to_cpu(initial_boot_params->totalsize)); | ||
| 567 | pr_debug("version: %08x\n", be32_to_cpu(initial_boot_params->version)); | ||
| 568 | |||
| 569 | if (be32_to_cpu(initial_boot_params->magic) != OF_DT_HEADER) { | ||
| 570 | pr_err("Invalid device tree blob header\n"); | ||
| 571 | return; | ||
| 572 | } | ||
| 573 | |||
| 559 | /* First pass, scan for size */ | 574 | /* First pass, scan for size */ |
| 560 | start = ((unsigned long)initial_boot_params) + | 575 | start = ((unsigned long)initial_boot_params) + |
| 561 | be32_to_cpu(initial_boot_params->off_dt_struct); | 576 | be32_to_cpu(initial_boot_params->off_dt_struct); |
diff --git a/drivers/of/of_i2c.c b/drivers/of/of_i2c.c index a3a708e590d..ab6522c8e4f 100644 --- a/drivers/of/of_i2c.c +++ b/drivers/of/of_i2c.c | |||
| @@ -42,7 +42,7 @@ void of_register_i2c_devices(struct i2c_adapter *adap, | |||
| 42 | 42 | ||
| 43 | info.addr = be32_to_cpup(addr); | 43 | info.addr = be32_to_cpup(addr); |
| 44 | 44 | ||
| 45 | dev_archdata_set_node(&dev_ad, node); | 45 | info.of_node = node; |
| 46 | info.archdata = &dev_ad; | 46 | info.archdata = &dev_ad; |
| 47 | 47 | ||
| 48 | request_module("%s", info.type); | 48 | request_module("%s", info.type); |
| @@ -68,7 +68,7 @@ EXPORT_SYMBOL(of_register_i2c_devices); | |||
| 68 | 68 | ||
| 69 | static int of_dev_node_match(struct device *dev, void *data) | 69 | static int of_dev_node_match(struct device *dev, void *data) |
| 70 | { | 70 | { |
| 71 | return dev_archdata_get_node(&dev->archdata) == data; | 71 | return dev->of_node == data; |
| 72 | } | 72 | } |
| 73 | 73 | ||
| 74 | /* must call put_device() when done with returned i2c_client device */ | 74 | /* must call put_device() when done with returned i2c_client device */ |
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c index b4748337223..42a6715f8e8 100644 --- a/drivers/of/of_mdio.c +++ b/drivers/of/of_mdio.c | |||
| @@ -79,7 +79,7 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) | |||
| 79 | /* Associate the OF node with the device structure so it | 79 | /* Associate the OF node with the device structure so it |
| 80 | * can be looked up later */ | 80 | * can be looked up later */ |
| 81 | of_node_get(child); | 81 | of_node_get(child); |
| 82 | dev_archdata_set_node(&phy->dev.archdata, child); | 82 | phy->dev.of_node = child; |
| 83 | 83 | ||
| 84 | /* All data is now stored in the phy struct; register it */ | 84 | /* All data is now stored in the phy struct; register it */ |
| 85 | rc = phy_device_register(phy); | 85 | rc = phy_device_register(phy); |
| @@ -100,7 +100,7 @@ EXPORT_SYMBOL(of_mdiobus_register); | |||
| 100 | /* Helper function for of_phy_find_device */ | 100 | /* Helper function for of_phy_find_device */ |
| 101 | static int of_phy_match(struct device *dev, void *phy_np) | 101 | static int of_phy_match(struct device *dev, void *phy_np) |
| 102 | { | 102 | { |
| 103 | return dev_archdata_get_node(&dev->archdata) == phy_np; | 103 | return dev->of_node == phy_np; |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | /** | 106 | /** |
| @@ -166,7 +166,7 @@ struct phy_device *of_phy_connect_fixed_link(struct net_device *dev, | |||
| 166 | if (!dev->dev.parent) | 166 | if (!dev->dev.parent) |
| 167 | return NULL; | 167 | return NULL; |
| 168 | 168 | ||
| 169 | net_np = dev_archdata_get_node(&dev->dev.parent->archdata); | 169 | net_np = dev->dev.parent->of_node; |
| 170 | if (!net_np) | 170 | if (!net_np) |
| 171 | return NULL; | 171 | return NULL; |
| 172 | 172 | ||
diff --git a/drivers/of/of_spi.c b/drivers/of/of_spi.c index f65f48b9844..5fed7e3c7da 100644 --- a/drivers/of/of_spi.c +++ b/drivers/of/of_spi.c | |||
| @@ -79,7 +79,7 @@ void of_register_spi_devices(struct spi_master *master, struct device_node *np) | |||
| 79 | 79 | ||
| 80 | /* Store a pointer to the node in the device structure */ | 80 | /* Store a pointer to the node in the device structure */ |
| 81 | of_node_get(nc); | 81 | of_node_get(nc); |
| 82 | spi->dev.archdata.of_node = nc; | 82 | spi->dev.of_node = nc; |
| 83 | 83 | ||
| 84 | /* Register the new device */ | 84 | /* Register the new device */ |
| 85 | request_module(spi->modalias); | 85 | request_module(spi->modalias); |
diff --git a/drivers/of/platform.c b/drivers/of/platform.c index d58ade170c4..7dacc1ebe91 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c | |||
| @@ -21,14 +21,12 @@ extern struct device_attribute of_platform_device_attrs[]; | |||
| 21 | 21 | ||
| 22 | static int of_platform_bus_match(struct device *dev, struct device_driver *drv) | 22 | static int of_platform_bus_match(struct device *dev, struct device_driver *drv) |
| 23 | { | 23 | { |
| 24 | struct of_device *of_dev = to_of_device(dev); | 24 | const struct of_device_id *matches = drv->of_match_table; |
| 25 | struct of_platform_driver *of_drv = to_of_platform_driver(drv); | ||
| 26 | const struct of_device_id *matches = of_drv->match_table; | ||
| 27 | 25 | ||
| 28 | if (!matches) | 26 | if (!matches) |
| 29 | return 0; | 27 | return 0; |
| 30 | 28 | ||
| 31 | return of_match_device(matches, of_dev) != NULL; | 29 | return of_match_device(matches, dev) != NULL; |
| 32 | } | 30 | } |
| 33 | 31 | ||
| 34 | static int of_platform_device_probe(struct device *dev) | 32 | static int of_platform_device_probe(struct device *dev) |
| @@ -46,7 +44,7 @@ static int of_platform_device_probe(struct device *dev) | |||
| 46 | 44 | ||
| 47 | of_dev_get(of_dev); | 45 | of_dev_get(of_dev); |
| 48 | 46 | ||
| 49 | match = of_match_device(drv->match_table, of_dev); | 47 | match = of_match_device(drv->driver.of_match_table, dev); |
| 50 | if (match) | 48 | if (match) |
| 51 | error = drv->probe(of_dev, match); | 49 | error = drv->probe(of_dev, match); |
| 52 | if (error) | 50 | if (error) |
| @@ -386,11 +384,6 @@ int of_bus_type_init(struct bus_type *bus, const char *name) | |||
| 386 | 384 | ||
| 387 | int of_register_driver(struct of_platform_driver *drv, struct bus_type *bus) | 385 | int of_register_driver(struct of_platform_driver *drv, struct bus_type *bus) |
| 388 | { | 386 | { |
| 389 | /* initialize common driver fields */ | ||
| 390 | if (!drv->driver.name) | ||
| 391 | drv->driver.name = drv->name; | ||
| 392 | if (!drv->driver.owner) | ||
| 393 | drv->driver.owner = drv->owner; | ||
| 394 | drv->driver.bus = bus; | 387 | drv->driver.bus = bus; |
| 395 | 388 | ||
| 396 | /* register with core */ | 389 | /* register with core */ |
diff --git a/drivers/parport/parport_sunbpp.c b/drivers/parport/parport_sunbpp.c index 065f229580d..9a5b4b89416 100644 --- a/drivers/parport/parport_sunbpp.c +++ b/drivers/parport/parport_sunbpp.c | |||
| @@ -382,8 +382,11 @@ static const struct of_device_id bpp_match[] = { | |||
| 382 | MODULE_DEVICE_TABLE(of, bpp_match); | 382 | MODULE_DEVICE_TABLE(of, bpp_match); |
| 383 | 383 | ||
| 384 | static struct of_platform_driver bpp_sbus_driver = { | 384 | static struct of_platform_driver bpp_sbus_driver = { |
| 385 | .name = "bpp", | 385 | .driver = { |
| 386 | .match_table = bpp_match, | 386 | .name = "bpp", |
| 387 | .owner = THIS_MODULE, | ||
| 388 | .of_match_table = bpp_match, | ||
| 389 | }, | ||
| 387 | .probe = bpp_probe, | 390 | .probe = bpp_probe, |
| 388 | .remove = __devexit_p(bpp_remove), | 391 | .remove = __devexit_p(bpp_remove), |
| 389 | }; | 392 | }; |
diff --git a/drivers/pcmcia/electra_cf.c b/drivers/pcmcia/electra_cf.c index 2e59fe947d2..f94d8281cfb 100644 --- a/drivers/pcmcia/electra_cf.c +++ b/drivers/pcmcia/electra_cf.c | |||
| @@ -185,7 +185,7 @@ static int __devinit electra_cf_probe(struct of_device *ofdev, | |||
| 185 | const struct of_device_id *match) | 185 | const struct of_device_id *match) |
| 186 | { | 186 | { |
| 187 | struct device *device = &ofdev->dev; | 187 | struct device *device = &ofdev->dev; |
| 188 | struct device_node *np = ofdev->node; | 188 | struct device_node *np = ofdev->dev.of_node; |
| 189 | struct electra_cf_socket *cf; | 189 | struct electra_cf_socket *cf; |
| 190 | struct resource mem, io; | 190 | struct resource mem, io; |
| 191 | int status; | 191 | int status; |
| @@ -357,8 +357,11 @@ static const struct of_device_id electra_cf_match[] = { | |||
| 357 | MODULE_DEVICE_TABLE(of, electra_cf_match); | 357 | MODULE_DEVICE_TABLE(of, electra_cf_match); |
| 358 | 358 | ||
| 359 | static struct of_platform_driver electra_cf_driver = { | 359 | static struct of_platform_driver electra_cf_driver = { |
| 360 | .name = (char *)driver_name, | 360 | .driver = { |
| 361 | .match_table = electra_cf_match, | 361 | .name = (char *)driver_name, |
| 362 | .owner = THIS_MODULE, | ||
| 363 | .of_match_table = electra_cf_match, | ||
| 364 | }, | ||
| 362 | .probe = electra_cf_probe, | 365 | .probe = electra_cf_probe, |
| 363 | .remove = electra_cf_remove, | 366 | .remove = electra_cf_remove, |
| 364 | }; | 367 | }; |
diff --git a/drivers/pcmcia/m8xx_pcmcia.c b/drivers/pcmcia/m8xx_pcmcia.c index 41cc954a5ff..1a648b90b63 100644 --- a/drivers/pcmcia/m8xx_pcmcia.c +++ b/drivers/pcmcia/m8xx_pcmcia.c | |||
| @@ -1298,8 +1298,11 @@ static const struct of_device_id m8xx_pcmcia_match[] = { | |||
| 1298 | MODULE_DEVICE_TABLE(of, m8xx_pcmcia_match); | 1298 | MODULE_DEVICE_TABLE(of, m8xx_pcmcia_match); |
| 1299 | 1299 | ||
| 1300 | static struct of_platform_driver m8xx_pcmcia_driver = { | 1300 | static struct of_platform_driver m8xx_pcmcia_driver = { |
| 1301 | .name = driver_name, | 1301 | .driver = { |
| 1302 | .match_table = m8xx_pcmcia_match, | 1302 | .name = driver_name, |
| 1303 | .owner = THIS_MODULE, | ||
| 1304 | .match_table = m8xx_pcmcia_match, | ||
| 1305 | }, | ||
| 1303 | .probe = m8xx_probe, | 1306 | .probe = m8xx_probe, |
| 1304 | .remove = m8xx_remove, | 1307 | .remove = m8xx_remove, |
| 1305 | }; | 1308 | }; |
diff --git a/drivers/sbus/char/bbc_envctrl.c b/drivers/sbus/char/bbc_envctrl.c index b4951eb0358..103fdf6b0b8 100644 --- a/drivers/sbus/char/bbc_envctrl.c +++ b/drivers/sbus/char/bbc_envctrl.c | |||
| @@ -565,9 +565,9 @@ int bbc_envctrl_init(struct bbc_i2c_bus *bp) | |||
| 565 | int devidx = 0; | 565 | int devidx = 0; |
| 566 | 566 | ||
| 567 | while ((op = bbc_i2c_getdev(bp, devidx++)) != NULL) { | 567 | while ((op = bbc_i2c_getdev(bp, devidx++)) != NULL) { |
| 568 | if (!strcmp(op->node->name, "temperature")) | 568 | if (!strcmp(op->dev.of_node->name, "temperature")) |
| 569 | attach_one_temp(bp, op, temp_index++); | 569 | attach_one_temp(bp, op, temp_index++); |
| 570 | if (!strcmp(op->node->name, "fan-control")) | 570 | if (!strcmp(op->dev.of_node->name, "fan-control")) |
| 571 | attach_one_fan(bp, op, fan_index++); | 571 | attach_one_fan(bp, op, fan_index++); |
| 572 | } | 572 | } |
| 573 | if (temp_index != 0 && fan_index != 0) { | 573 | if (temp_index != 0 && fan_index != 0) { |
diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c index 7e30e5f6e03..8bfdd63a1fc 100644 --- a/drivers/sbus/char/bbc_i2c.c +++ b/drivers/sbus/char/bbc_i2c.c | |||
| @@ -97,7 +97,7 @@ struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct of_device * | |||
| 97 | client->bp = bp; | 97 | client->bp = bp; |
| 98 | client->op = op; | 98 | client->op = op; |
| 99 | 99 | ||
| 100 | reg = of_get_property(op->node, "reg", NULL); | 100 | reg = of_get_property(op->dev.of_node, "reg", NULL); |
| 101 | if (!reg) { | 101 | if (!reg) { |
| 102 | kfree(client); | 102 | kfree(client); |
| 103 | return NULL; | 103 | return NULL; |
| @@ -327,7 +327,7 @@ static struct bbc_i2c_bus * __init attach_one_i2c(struct of_device *op, int inde | |||
| 327 | spin_lock_init(&bp->lock); | 327 | spin_lock_init(&bp->lock); |
| 328 | 328 | ||
| 329 | entry = 0; | 329 | entry = 0; |
| 330 | for (dp = op->node->child; | 330 | for (dp = op->dev.of_node->child; |
| 331 | dp && entry < 8; | 331 | dp && entry < 8; |
| 332 | dp = dp->sibling, entry++) { | 332 | dp = dp->sibling, entry++) { |
| 333 | struct of_device *child_op; | 333 | struct of_device *child_op; |
| @@ -414,8 +414,11 @@ static const struct of_device_id bbc_i2c_match[] = { | |||
| 414 | MODULE_DEVICE_TABLE(of, bbc_i2c_match); | 414 | MODULE_DEVICE_TABLE(of, bbc_i2c_match); |
| 415 | 415 | ||
| 416 | static struct of_platform_driver bbc_i2c_driver = { | 416 | static struct of_platform_driver bbc_i2c_driver = { |
| 417 | .name = "bbc_i2c", | 417 | .driver = { |
| 418 | .match_table = bbc_i2c_match, | 418 | .name = "bbc_i2c", |
| 419 | .owner = THIS_MODULE, | ||
| 420 | .of_match_table = bbc_i2c_match, | ||
| 421 | }, | ||
| 419 | .probe = bbc_i2c_probe, | 422 | .probe = bbc_i2c_probe, |
| 420 | .remove = __devexit_p(bbc_i2c_remove), | 423 | .remove = __devexit_p(bbc_i2c_remove), |
| 421 | }; | 424 | }; |
diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c index 3e59189f413..7baf1b64403 100644 --- a/drivers/sbus/char/display7seg.c +++ b/drivers/sbus/char/display7seg.c | |||
| @@ -216,7 +216,7 @@ static int __devinit d7s_probe(struct of_device *op, | |||
| 216 | writeb(regs, p->regs); | 216 | writeb(regs, p->regs); |
| 217 | 217 | ||
| 218 | printk(KERN_INFO PFX "7-Segment Display%s at [%s:0x%llx] %s\n", | 218 | printk(KERN_INFO PFX "7-Segment Display%s at [%s:0x%llx] %s\n", |
| 219 | op->node->full_name, | 219 | op->dev.of_node->full_name, |
| 220 | (regs & D7S_FLIP) ? " (FLIPPED)" : "", | 220 | (regs & D7S_FLIP) ? " (FLIPPED)" : "", |
| 221 | op->resource[0].start, | 221 | op->resource[0].start, |
| 222 | sol_compat ? "in sol_compat mode" : ""); | 222 | sol_compat ? "in sol_compat mode" : ""); |
| @@ -266,8 +266,11 @@ static const struct of_device_id d7s_match[] = { | |||
| 266 | MODULE_DEVICE_TABLE(of, d7s_match); | 266 | MODULE_DEVICE_TABLE(of, d7s_match); |
| 267 | 267 | ||
| 268 | static struct of_platform_driver d7s_driver = { | 268 | static struct of_platform_driver d7s_driver = { |
| 269 | .name = DRIVER_NAME, | 269 | .driver = { |
| 270 | .match_table = d7s_match, | 270 | .name = DRIVER_NAME, |
| 271 | .owner = THIS_MODULE, | ||
| 272 | .of_match_table = d7s_match, | ||
| 273 | }, | ||
| 271 | .probe = d7s_probe, | 274 | .probe = d7s_probe, |
| 272 | .remove = __devexit_p(d7s_remove), | 275 | .remove = __devexit_p(d7s_remove), |
| 273 | }; | 276 | }; |
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c index c6e2eff1940..c8166ecf527 100644 --- a/drivers/sbus/char/envctrl.c +++ b/drivers/sbus/char/envctrl.c | |||
| @@ -1043,7 +1043,7 @@ static int __devinit envctrl_probe(struct of_device *op, | |||
| 1043 | return -ENOMEM; | 1043 | return -ENOMEM; |
| 1044 | 1044 | ||
| 1045 | index = 0; | 1045 | index = 0; |
| 1046 | dp = op->node->child; | 1046 | dp = op->dev.of_node->child; |
| 1047 | while (dp) { | 1047 | while (dp) { |
| 1048 | if (!strcmp(dp->name, "gpio")) { | 1048 | if (!strcmp(dp->name, "gpio")) { |
| 1049 | i2c_childlist[index].i2ctype = I2C_GPIO; | 1049 | i2c_childlist[index].i2ctype = I2C_GPIO; |
| @@ -1131,8 +1131,11 @@ static const struct of_device_id envctrl_match[] = { | |||
| 1131 | MODULE_DEVICE_TABLE(of, envctrl_match); | 1131 | MODULE_DEVICE_TABLE(of, envctrl_match); |
| 1132 | 1132 | ||
| 1133 | static struct of_platform_driver envctrl_driver = { | 1133 | static struct of_platform_driver envctrl_driver = { |
| 1134 | .name = DRIVER_NAME, | 1134 | .driver = { |
| 1135 | .match_table = envctrl_match, | 1135 | .name = DRIVER_NAME, |
| 1136 | .owner = THIS_MODULE, | ||
| 1137 | .of_match_table = envctrl_match, | ||
| 1138 | }, | ||
| 1136 | .probe = envctrl_probe, | 1139 | .probe = envctrl_probe, |
| 1137 | .remove = __devexit_p(envctrl_remove), | 1140 | .remove = __devexit_p(envctrl_remove), |
| 1138 | }; | 1141 | }; |
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c index d3b62eb0fba..368d66294d8 100644 --- a/drivers/sbus/char/flash.c +++ b/drivers/sbus/char/flash.c | |||
| @@ -162,7 +162,7 @@ static struct miscdevice flash_dev = { FLASH_MINOR, "flash", &flash_fops }; | |||
| 162 | static int __devinit flash_probe(struct of_device *op, | 162 | static int __devinit flash_probe(struct of_device *op, |
| 163 | const struct of_device_id *match) | 163 | const struct of_device_id *match) |
| 164 | { | 164 | { |
| 165 | struct device_node *dp = op->node; | 165 | struct device_node *dp = op->dev.of_node; |
| 166 | struct device_node *parent; | 166 | struct device_node *parent; |
| 167 | 167 | ||
| 168 | parent = dp->parent; | 168 | parent = dp->parent; |
| @@ -184,7 +184,7 @@ static int __devinit flash_probe(struct of_device *op, | |||
| 184 | flash.busy = 0; | 184 | flash.busy = 0; |
| 185 | 185 | ||
| 186 | printk(KERN_INFO "%s: OBP Flash, RD %lx[%lx] WR %lx[%lx]\n", | 186 | printk(KERN_INFO "%s: OBP Flash, RD %lx[%lx] WR %lx[%lx]\n", |
| 187 | op->node->full_name, | 187 | op->dev.of_node->full_name, |
| 188 | flash.read_base, flash.read_size, | 188 | flash.read_base, flash.read_size, |
| 189 | flash.write_base, flash.write_size); | 189 | flash.write_base, flash.write_size); |
| 190 | 190 | ||
| @@ -207,8 +207,11 @@ static const struct of_device_id flash_match[] = { | |||
| 207 | MODULE_DEVICE_TABLE(of, flash_match); | 207 | MODULE_DEVICE_TABLE(of, flash_match); |
| 208 | 208 | ||
| 209 | static struct of_platform_driver flash_driver = { | 209 | static struct of_platform_driver flash_driver = { |
| 210 | .name = "flash", | 210 | .driver = { |
| 211 | .match_table = flash_match, | 211 | .name = "flash", |
| 212 | .owner = THIS_MODULE, | ||
| 213 | .of_match_table = flash_match, | ||
| 214 | }, | ||
| 212 | .probe = flash_probe, | 215 | .probe = flash_probe, |
| 213 | .remove = __devexit_p(flash_remove), | 216 | .remove = __devexit_p(flash_remove), |
| 214 | }; | 217 | }; |
diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c index 2c56fd56ec6..5f253665a1d 100644 --- a/drivers/sbus/char/uctrl.c +++ b/drivers/sbus/char/uctrl.c | |||
| @@ -382,7 +382,7 @@ static int __devinit uctrl_probe(struct of_device *op, | |||
| 382 | 382 | ||
| 383 | sbus_writel(UCTRL_INTR_RXNE_REQ|UCTRL_INTR_RXNE_MSK, &p->regs->uctrl_intr); | 383 | sbus_writel(UCTRL_INTR_RXNE_REQ|UCTRL_INTR_RXNE_MSK, &p->regs->uctrl_intr); |
| 384 | printk(KERN_INFO "%s: uctrl regs[0x%p] (irq %d)\n", | 384 | printk(KERN_INFO "%s: uctrl regs[0x%p] (irq %d)\n", |
| 385 | op->node->full_name, p->regs, p->irq); | 385 | op->dev.of_node->full_name, p->regs, p->irq); |
| 386 | uctrl_get_event_status(p); | 386 | uctrl_get_event_status(p); |
| 387 | uctrl_get_external_status(p); | 387 | uctrl_get_external_status(p); |
| 388 | 388 | ||
| @@ -425,8 +425,11 @@ static const struct of_device_id uctrl_match[] = { | |||
| 425 | MODULE_DEVICE_TABLE(of, uctrl_match); | 425 | MODULE_DEVICE_TABLE(of, uctrl_match); |
| 426 | 426 | ||
| 427 | static struct of_platform_driver uctrl_driver = { | 427 | static struct of_platform_driver uctrl_driver = { |
| 428 | .name = "uctrl", | 428 | .driver = { |
| 429 | .match_table = uctrl_match, | 429 | .name = "uctrl", |
| 430 | .owner = THIS_MODULE, | ||
| 431 | .of_match_table = uctrl_match, | ||
| 432 | }, | ||
| 430 | .probe = uctrl_probe, | 433 | .probe = uctrl_probe, |
| 431 | .remove = __devexit_p(uctrl_remove), | 434 | .remove = __devexit_p(uctrl_remove), |
| 432 | }; | 435 | }; |
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index 3eb2b7b3d8b..fef49521cbc 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c | |||
| @@ -1157,7 +1157,7 @@ static void ibmvfc_gather_partition_info(struct ibmvfc_host *vhost) | |||
| 1157 | static void ibmvfc_set_login_info(struct ibmvfc_host *vhost) | 1157 | static void ibmvfc_set_login_info(struct ibmvfc_host *vhost) |
| 1158 | { | 1158 | { |
| 1159 | struct ibmvfc_npiv_login *login_info = &vhost->login_info; | 1159 | struct ibmvfc_npiv_login *login_info = &vhost->login_info; |
| 1160 | struct device_node *of_node = vhost->dev->archdata.of_node; | 1160 | struct device_node *of_node = vhost->dev->of_node; |
| 1161 | const char *location; | 1161 | const char *location; |
| 1162 | 1162 | ||
| 1163 | memset(login_info, 0, sizeof(*login_info)); | 1163 | memset(login_info, 0, sizeof(*login_info)); |
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c index 88bad0e81bd..aad35cc41e4 100644 --- a/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c | |||
| @@ -932,7 +932,7 @@ static void send_mad_capabilities(struct ibmvscsi_host_data *hostdata) | |||
| 932 | struct viosrp_capabilities *req; | 932 | struct viosrp_capabilities *req; |
| 933 | struct srp_event_struct *evt_struct; | 933 | struct srp_event_struct *evt_struct; |
| 934 | unsigned long flags; | 934 | unsigned long flags; |
| 935 | struct device_node *of_node = hostdata->dev->archdata.of_node; | 935 | struct device_node *of_node = hostdata->dev->of_node; |
| 936 | const char *location; | 936 | const char *location; |
| 937 | 937 | ||
| 938 | evt_struct = get_event_struct(&hostdata->pool); | 938 | evt_struct = get_event_struct(&hostdata->pool); |
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c index aa406497eeb..ca5c15c779c 100644 --- a/drivers/scsi/qlogicpti.c +++ b/drivers/scsi/qlogicpti.c | |||
| @@ -755,7 +755,7 @@ static void __devinit qpti_get_scsi_id(struct qlogicpti *qpti) | |||
| 755 | struct of_device *op = qpti->op; | 755 | struct of_device *op = qpti->op; |
| 756 | struct device_node *dp; | 756 | struct device_node *dp; |
| 757 | 757 | ||
| 758 | dp = op->node; | 758 | dp = op->dev.of_node; |
| 759 | 759 | ||
| 760 | qpti->scsi_id = of_getintprop_default(dp, "initiator-id", -1); | 760 | qpti->scsi_id = of_getintprop_default(dp, "initiator-id", -1); |
| 761 | if (qpti->scsi_id == -1) | 761 | if (qpti->scsi_id == -1) |
| @@ -776,8 +776,8 @@ static void qpti_get_bursts(struct qlogicpti *qpti) | |||
| 776 | struct of_device *op = qpti->op; | 776 | struct of_device *op = qpti->op; |
| 777 | u8 bursts, bmask; | 777 | u8 bursts, bmask; |
| 778 | 778 | ||
| 779 | bursts = of_getintprop_default(op->node, "burst-sizes", 0xff); | 779 | bursts = of_getintprop_default(op->dev.of_node, "burst-sizes", 0xff); |
| 780 | bmask = of_getintprop_default(op->node->parent, "burst-sizes", 0xff); | 780 | bmask = of_getintprop_default(op->dev.of_node->parent, "burst-sizes", 0xff); |
| 781 | if (bmask != 0xff) | 781 | if (bmask != 0xff) |
| 782 | bursts &= bmask; | 782 | bursts &= bmask; |
| 783 | if (bursts == 0xff || | 783 | if (bursts == 0xff || |
| @@ -1293,7 +1293,7 @@ static struct scsi_host_template qpti_template = { | |||
| 1293 | static int __devinit qpti_sbus_probe(struct of_device *op, const struct of_device_id *match) | 1293 | static int __devinit qpti_sbus_probe(struct of_device *op, const struct of_device_id *match) |
| 1294 | { | 1294 | { |
| 1295 | struct scsi_host_template *tpnt = match->data; | 1295 | struct scsi_host_template *tpnt = match->data; |
| 1296 | struct device_node *dp = op->node; | 1296 | struct device_node *dp = op->dev.of_node; |
| 1297 | struct Scsi_Host *host; | 1297 | struct Scsi_Host *host; |
| 1298 | struct qlogicpti *qpti; | 1298 | struct qlogicpti *qpti; |
| 1299 | static int nqptis; | 1299 | static int nqptis; |
| @@ -1315,7 +1315,7 @@ static int __devinit qpti_sbus_probe(struct of_device *op, const struct of_devic | |||
| 1315 | qpti->qhost = host; | 1315 | qpti->qhost = host; |
| 1316 | qpti->op = op; | 1316 | qpti->op = op; |
| 1317 | qpti->qpti_id = nqptis; | 1317 | qpti->qpti_id = nqptis; |
| 1318 | strcpy(qpti->prom_name, op->node->name); | 1318 | strcpy(qpti->prom_name, op->dev.of_node->name); |
| 1319 | qpti->is_pti = strcmp(qpti->prom_name, "QLGC,isp"); | 1319 | qpti->is_pti = strcmp(qpti->prom_name, "QLGC,isp"); |
| 1320 | 1320 | ||
| 1321 | if (qpti_map_regs(qpti) < 0) | 1321 | if (qpti_map_regs(qpti) < 0) |
| @@ -1456,8 +1456,11 @@ static const struct of_device_id qpti_match[] = { | |||
| 1456 | MODULE_DEVICE_TABLE(of, qpti_match); | 1456 | MODULE_DEVICE_TABLE(of, qpti_match); |
| 1457 | 1457 | ||
| 1458 | static struct of_platform_driver qpti_sbus_driver = { | 1458 | static struct of_platform_driver qpti_sbus_driver = { |
| 1459 | .name = "qpti", | 1459 | .driver = { |
| 1460 | .match_table = qpti_match, | 1460 | .name = "qpti", |
| 1461 | .owner = THIS_MODULE, | ||
| 1462 | .of_match_table = qpti_match, | ||
| 1463 | }, | ||
| 1461 | .probe = qpti_sbus_probe, | 1464 | .probe = qpti_sbus_probe, |
| 1462 | .remove = __devexit_p(qpti_sbus_remove), | 1465 | .remove = __devexit_p(qpti_sbus_remove), |
| 1463 | }; | 1466 | }; |
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c index c992ecf4e37..9798c2c06b9 100644 --- a/drivers/scsi/scsi_scan.c +++ b/drivers/scsi/scsi_scan.c | |||
| @@ -1220,7 +1220,7 @@ static void scsi_sequential_lun_scan(struct scsi_target *starget, | |||
| 1220 | } | 1220 | } |
| 1221 | 1221 | ||
| 1222 | /** | 1222 | /** |
| 1223 | * scsilun_to_int: convert a scsi_lun to an int | 1223 | * scsilun_to_int - convert a scsi_lun to an int |
| 1224 | * @scsilun: struct scsi_lun to be converted. | 1224 | * @scsilun: struct scsi_lun to be converted. |
| 1225 | * | 1225 | * |
| 1226 | * Description: | 1226 | * Description: |
| @@ -1252,7 +1252,7 @@ int scsilun_to_int(struct scsi_lun *scsilun) | |||
| 1252 | EXPORT_SYMBOL(scsilun_to_int); | 1252 | EXPORT_SYMBOL(scsilun_to_int); |
| 1253 | 1253 | ||
| 1254 | /** | 1254 | /** |
| 1255 | * int_to_scsilun: reverts an int into a scsi_lun | 1255 | * int_to_scsilun - reverts an int into a scsi_lun |
| 1256 | * @lun: integer to be reverted | 1256 | * @lun: integer to be reverted |
| 1257 | * @scsilun: struct scsi_lun to be set. | 1257 | * @scsilun: struct scsi_lun to be set. |
| 1258 | * | 1258 | * |
| @@ -1876,12 +1876,9 @@ void scsi_forget_host(struct Scsi_Host *shost) | |||
| 1876 | spin_unlock_irqrestore(shost->host_lock, flags); | 1876 | spin_unlock_irqrestore(shost->host_lock, flags); |
| 1877 | } | 1877 | } |
| 1878 | 1878 | ||
| 1879 | /* | 1879 | /** |
| 1880 | * Function: scsi_get_host_dev() | 1880 | * scsi_get_host_dev - Create a scsi_device that points to the host adapter itself |
| 1881 | * | 1881 | * @shost: Host that needs a scsi_device |
| 1882 | * Purpose: Create a scsi_device that points to the host adapter itself. | ||
| 1883 | * | ||
| 1884 | * Arguments: SHpnt - Host that needs a scsi_device | ||
| 1885 | * | 1882 | * |
| 1886 | * Lock status: None assumed. | 1883 | * Lock status: None assumed. |
| 1887 | * | 1884 | * |
| @@ -1894,7 +1891,7 @@ void scsi_forget_host(struct Scsi_Host *shost) | |||
| 1894 | * | 1891 | * |
| 1895 | * Note - this device is not accessible from any high-level | 1892 | * Note - this device is not accessible from any high-level |
| 1896 | * drivers (including generics), which is probably not | 1893 | * drivers (including generics), which is probably not |
| 1897 | * optimal. We can add hooks later to attach | 1894 | * optimal. We can add hooks later to attach. |
| 1898 | */ | 1895 | */ |
| 1899 | struct scsi_device *scsi_get_host_dev(struct Scsi_Host *shost) | 1896 | struct scsi_device *scsi_get_host_dev(struct Scsi_Host *shost) |
| 1900 | { | 1897 | { |
| @@ -1920,18 +1917,13 @@ struct scsi_device *scsi_get_host_dev(struct Scsi_Host *shost) | |||
| 1920 | } | 1917 | } |
| 1921 | EXPORT_SYMBOL(scsi_get_host_dev); | 1918 | EXPORT_SYMBOL(scsi_get_host_dev); |
| 1922 | 1919 | ||
| 1923 | /* | 1920 | /** |
| 1924 | * Function: scsi_free_host_dev() | 1921 | * scsi_free_host_dev - Free a scsi_device that points to the host adapter itself |
| 1925 | * | 1922 | * @sdev: Host device to be freed |
| 1926 | * Purpose: Free a scsi_device that points to the host adapter itself. | ||
| 1927 | * | ||
| 1928 | * Arguments: SHpnt - Host that needs a scsi_device | ||
| 1929 | * | 1923 | * |
| 1930 | * Lock status: None assumed. | 1924 | * Lock status: None assumed. |
| 1931 | * | 1925 | * |
| 1932 | * Returns: Nothing | 1926 | * Returns: Nothing |
| 1933 | * | ||
| 1934 | * Notes: | ||
| 1935 | */ | 1927 | */ |
| 1936 | void scsi_free_host_dev(struct scsi_device *sdev) | 1928 | void scsi_free_host_dev(struct scsi_device *sdev) |
| 1937 | { | 1929 | { |
diff --git a/drivers/scsi/sun_esp.c b/drivers/scsi/sun_esp.c index fc23d273fb1..386dd9d602b 100644 --- a/drivers/scsi/sun_esp.c +++ b/drivers/scsi/sun_esp.c | |||
| @@ -125,7 +125,7 @@ static void __devinit esp_get_scsi_id(struct esp *esp, struct of_device *espdma) | |||
| 125 | struct of_device *op = esp->dev; | 125 | struct of_device *op = esp->dev; |
| 126 | struct device_node *dp; | 126 | struct device_node *dp; |
| 127 | 127 | ||
| 128 | dp = op->node; | 128 | dp = op->dev.of_node; |
| 129 | esp->scsi_id = of_getintprop_default(dp, "initiator-id", 0xff); | 129 | esp->scsi_id = of_getintprop_default(dp, "initiator-id", 0xff); |
| 130 | if (esp->scsi_id != 0xff) | 130 | if (esp->scsi_id != 0xff) |
| 131 | goto done; | 131 | goto done; |
| @@ -134,7 +134,7 @@ static void __devinit esp_get_scsi_id(struct esp *esp, struct of_device *espdma) | |||
| 134 | if (esp->scsi_id != 0xff) | 134 | if (esp->scsi_id != 0xff) |
| 135 | goto done; | 135 | goto done; |
| 136 | 136 | ||
| 137 | esp->scsi_id = of_getintprop_default(espdma->node, | 137 | esp->scsi_id = of_getintprop_default(espdma->dev.of_node, |
| 138 | "scsi-initiator-id", 7); | 138 | "scsi-initiator-id", 7); |
| 139 | 139 | ||
| 140 | done: | 140 | done: |
| @@ -147,7 +147,7 @@ static void __devinit esp_get_differential(struct esp *esp) | |||
| 147 | struct of_device *op = esp->dev; | 147 | struct of_device *op = esp->dev; |
| 148 | struct device_node *dp; | 148 | struct device_node *dp; |
| 149 | 149 | ||
| 150 | dp = op->node; | 150 | dp = op->dev.of_node; |
| 151 | if (of_find_property(dp, "differential", NULL)) | 151 | if (of_find_property(dp, "differential", NULL)) |
| 152 | esp->flags |= ESP_FLAG_DIFFERENTIAL; | 152 | esp->flags |= ESP_FLAG_DIFFERENTIAL; |
| 153 | else | 153 | else |
| @@ -160,7 +160,7 @@ static void __devinit esp_get_clock_params(struct esp *esp) | |||
| 160 | struct device_node *bus_dp, *dp; | 160 | struct device_node *bus_dp, *dp; |
| 161 | int fmhz; | 161 | int fmhz; |
| 162 | 162 | ||
| 163 | dp = op->node; | 163 | dp = op->dev.of_node; |
| 164 | bus_dp = dp->parent; | 164 | bus_dp = dp->parent; |
| 165 | 165 | ||
| 166 | fmhz = of_getintprop_default(dp, "clock-frequency", 0); | 166 | fmhz = of_getintprop_default(dp, "clock-frequency", 0); |
| @@ -172,12 +172,12 @@ static void __devinit esp_get_clock_params(struct esp *esp) | |||
| 172 | 172 | ||
| 173 | static void __devinit esp_get_bursts(struct esp *esp, struct of_device *dma_of) | 173 | static void __devinit esp_get_bursts(struct esp *esp, struct of_device *dma_of) |
| 174 | { | 174 | { |
| 175 | struct device_node *dma_dp = dma_of->node; | 175 | struct device_node *dma_dp = dma_of->dev.of_node; |
| 176 | struct of_device *op = esp->dev; | 176 | struct of_device *op = esp->dev; |
| 177 | struct device_node *dp; | 177 | struct device_node *dp; |
| 178 | u8 bursts, val; | 178 | u8 bursts, val; |
| 179 | 179 | ||
| 180 | dp = op->node; | 180 | dp = op->dev.of_node; |
| 181 | bursts = of_getintprop_default(dp, "burst-sizes", 0xff); | 181 | bursts = of_getintprop_default(dp, "burst-sizes", 0xff); |
| 182 | val = of_getintprop_default(dma_dp, "burst-sizes", 0xff); | 182 | val = of_getintprop_default(dma_dp, "burst-sizes", 0xff); |
| 183 | if (val != 0xff) | 183 | if (val != 0xff) |
| @@ -565,7 +565,7 @@ fail: | |||
| 565 | static int __devinit esp_sbus_probe(struct of_device *op, const struct of_device_id *match) | 565 | static int __devinit esp_sbus_probe(struct of_device *op, const struct of_device_id *match) |
| 566 | { | 566 | { |
| 567 | struct device_node *dma_node = NULL; | 567 | struct device_node *dma_node = NULL; |
| 568 | struct device_node *dp = op->node; | 568 | struct device_node *dp = op->dev.of_node; |
| 569 | struct of_device *dma_of = NULL; | 569 | struct of_device *dma_of = NULL; |
| 570 | int hme = 0; | 570 | int hme = 0; |
| 571 | 571 | ||
| @@ -574,7 +574,7 @@ static int __devinit esp_sbus_probe(struct of_device *op, const struct of_device | |||
| 574 | !strcmp(dp->parent->name, "dma"))) | 574 | !strcmp(dp->parent->name, "dma"))) |
| 575 | dma_node = dp->parent; | 575 | dma_node = dp->parent; |
| 576 | else if (!strcmp(dp->name, "SUNW,fas")) { | 576 | else if (!strcmp(dp->name, "SUNW,fas")) { |
| 577 | dma_node = op->node; | 577 | dma_node = op->dev.of_node; |
| 578 | hme = 1; | 578 | hme = 1; |
| 579 | } | 579 | } |
| 580 | if (dma_node) | 580 | if (dma_node) |
| @@ -633,8 +633,11 @@ static const struct of_device_id esp_match[] = { | |||
| 633 | MODULE_DEVICE_TABLE(of, esp_match); | 633 | MODULE_DEVICE_TABLE(of, esp_match); |
| 634 | 634 | ||
| 635 | static struct of_platform_driver esp_sbus_driver = { | 635 | static struct of_platform_driver esp_sbus_driver = { |
| 636 | .name = "esp", | 636 | .driver = { |
| 637 | .match_table = esp_match, | 637 | .name = "esp", |
| 638 | .owner = THIS_MODULE, | ||
| 639 | .of_match_table = esp_match, | ||
| 640 | }, | ||
| 638 | .probe = esp_sbus_probe, | 641 | .probe = esp_sbus_probe, |
| 639 | .remove = __devexit_p(esp_sbus_remove), | 642 | .remove = __devexit_p(esp_sbus_remove), |
| 640 | }; | 643 | }; |
diff --git a/drivers/serial/apbuart.c b/drivers/serial/apbuart.c index fe91319b5f6..0099b8692b6 100644 --- a/drivers/serial/apbuart.c +++ b/drivers/serial/apbuart.c | |||
| @@ -559,7 +559,7 @@ static int __devinit apbuart_probe(struct of_device *op, | |||
| 559 | 559 | ||
| 560 | i = 0; | 560 | i = 0; |
| 561 | for (i = 0; i < grlib_apbuart_port_nr; i++) { | 561 | for (i = 0; i < grlib_apbuart_port_nr; i++) { |
| 562 | if (op->node == grlib_apbuart_nodes[i]) | 562 | if (op->dev.of_node == grlib_apbuart_nodes[i]) |
| 563 | break; | 563 | break; |
| 564 | } | 564 | } |
| 565 | 565 | ||
| @@ -584,12 +584,12 @@ static struct of_device_id __initdata apbuart_match[] = { | |||
| 584 | }; | 584 | }; |
| 585 | 585 | ||
| 586 | static struct of_platform_driver grlib_apbuart_of_driver = { | 586 | static struct of_platform_driver grlib_apbuart_of_driver = { |
| 587 | .match_table = apbuart_match, | ||
| 588 | .probe = apbuart_probe, | 587 | .probe = apbuart_probe, |
| 589 | .driver = { | 588 | .driver = { |
| 590 | .owner = THIS_MODULE, | 589 | .owner = THIS_MODULE, |
| 591 | .name = "grlib-apbuart", | 590 | .name = "grlib-apbuart", |
| 592 | }, | 591 | .of_match_table = apbuart_match, |
| 592 | }, | ||
| 593 | }; | 593 | }; |
| 594 | 594 | ||
| 595 | 595 | ||
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c index 300cea768d7..9eb62a256e9 100644 --- a/drivers/serial/cpm_uart/cpm_uart_core.c +++ b/drivers/serial/cpm_uart/cpm_uart_core.c | |||
| @@ -1342,7 +1342,7 @@ static int __devinit cpm_uart_probe(struct of_device *ofdev, | |||
| 1342 | /* initialize the device pointer for the port */ | 1342 | /* initialize the device pointer for the port */ |
| 1343 | pinfo->port.dev = &ofdev->dev; | 1343 | pinfo->port.dev = &ofdev->dev; |
| 1344 | 1344 | ||
| 1345 | ret = cpm_uart_init_port(ofdev->node, pinfo); | 1345 | ret = cpm_uart_init_port(ofdev->dev.of_node, pinfo); |
| 1346 | if (ret) | 1346 | if (ret) |
| 1347 | return ret; | 1347 | return ret; |
| 1348 | 1348 | ||
| @@ -1372,8 +1372,11 @@ static struct of_device_id cpm_uart_match[] = { | |||
| 1372 | }; | 1372 | }; |
| 1373 | 1373 | ||
| 1374 | static struct of_platform_driver cpm_uart_driver = { | 1374 | static struct of_platform_driver cpm_uart_driver = { |
| 1375 | .name = "cpm_uart", | 1375 | .driver = { |
| 1376 | .match_table = cpm_uart_match, | 1376 | .name = "cpm_uart", |
| 1377 | .owner = THIS_MODULE, | ||
| 1378 | .of_match_table = cpm_uart_match, | ||
| 1379 | }, | ||
| 1377 | .probe = cpm_uart_probe, | 1380 | .probe = cpm_uart_probe, |
| 1378 | .remove = cpm_uart_remove, | 1381 | .remove = cpm_uart_remove, |
| 1379 | }; | 1382 | }; |
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index 02469c31bf0..beb4710faee 100644 --- a/drivers/serial/mpc52xx_uart.c +++ b/drivers/serial/mpc52xx_uart.c | |||
| @@ -1295,14 +1295,14 @@ mpc52xx_uart_of_probe(struct of_device *op, const struct of_device_id *match) | |||
| 1295 | 1295 | ||
| 1296 | /* Check validity & presence */ | 1296 | /* Check validity & presence */ |
| 1297 | for (idx = 0; idx < MPC52xx_PSC_MAXNUM; idx++) | 1297 | for (idx = 0; idx < MPC52xx_PSC_MAXNUM; idx++) |
| 1298 | if (mpc52xx_uart_nodes[idx] == op->node) | 1298 | if (mpc52xx_uart_nodes[idx] == op->dev.of_node) |
| 1299 | break; | 1299 | break; |
| 1300 | if (idx >= MPC52xx_PSC_MAXNUM) | 1300 | if (idx >= MPC52xx_PSC_MAXNUM) |
| 1301 | return -EINVAL; | 1301 | return -EINVAL; |
| 1302 | pr_debug("Found %s assigned to ttyPSC%x\n", | 1302 | pr_debug("Found %s assigned to ttyPSC%x\n", |
| 1303 | mpc52xx_uart_nodes[idx]->full_name, idx); | 1303 | mpc52xx_uart_nodes[idx]->full_name, idx); |
| 1304 | 1304 | ||
| 1305 | uartclk = psc_ops->getuartclk(op->node); | 1305 | uartclk = psc_ops->getuartclk(op->dev.of_node); |
| 1306 | if (uartclk == 0) { | 1306 | if (uartclk == 0) { |
| 1307 | dev_dbg(&op->dev, "Could not find uart clock frequency!\n"); | 1307 | dev_dbg(&op->dev, "Could not find uart clock frequency!\n"); |
| 1308 | return -EINVAL; | 1308 | return -EINVAL; |
| @@ -1322,7 +1322,7 @@ mpc52xx_uart_of_probe(struct of_device *op, const struct of_device_id *match) | |||
| 1322 | port->dev = &op->dev; | 1322 | port->dev = &op->dev; |
| 1323 | 1323 | ||
| 1324 | /* Search for IRQ and mapbase */ | 1324 | /* Search for IRQ and mapbase */ |
| 1325 | ret = of_address_to_resource(op->node, 0, &res); | 1325 | ret = of_address_to_resource(op->dev.of_node, 0, &res); |
| 1326 | if (ret) | 1326 | if (ret) |
| 1327 | return ret; | 1327 | return ret; |
| 1328 | 1328 | ||
| @@ -1332,7 +1332,7 @@ mpc52xx_uart_of_probe(struct of_device *op, const struct of_device_id *match) | |||
| 1332 | return -EINVAL; | 1332 | return -EINVAL; |
| 1333 | } | 1333 | } |
| 1334 | 1334 | ||
| 1335 | psc_ops->get_irq(port, op->node); | 1335 | psc_ops->get_irq(port, op->dev.of_node); |
| 1336 | if (port->irq == NO_IRQ) { | 1336 | if (port->irq == NO_IRQ) { |
| 1337 | dev_dbg(&op->dev, "Could not get irq\n"); | 1337 | dev_dbg(&op->dev, "Could not get irq\n"); |
| 1338 | return -EINVAL; | 1338 | return -EINVAL; |
| @@ -1431,15 +1431,16 @@ mpc52xx_uart_of_enumerate(void) | |||
| 1431 | MODULE_DEVICE_TABLE(of, mpc52xx_uart_of_match); | 1431 | MODULE_DEVICE_TABLE(of, mpc52xx_uart_of_match); |
| 1432 | 1432 | ||
| 1433 | static struct of_platform_driver mpc52xx_uart_of_driver = { | 1433 | static struct of_platform_driver mpc52xx_uart_of_driver = { |
| 1434 | .match_table = mpc52xx_uart_of_match, | ||
| 1435 | .probe = mpc52xx_uart_of_probe, | 1434 | .probe = mpc52xx_uart_of_probe, |
| 1436 | .remove = mpc52xx_uart_of_remove, | 1435 | .remove = mpc52xx_uart_of_remove, |
| 1437 | #ifdef CONFIG_PM | 1436 | #ifdef CONFIG_PM |
| 1438 | .suspend = mpc52xx_uart_of_suspend, | 1437 | .suspend = mpc52xx_uart_of_suspend, |
| 1439 | .resume = mpc52xx_uart_of_resume, | 1438 | .resume = mpc52xx_uart_of_resume, |
| 1440 | #endif | 1439 | #endif |
| 1441 | .driver = { | 1440 | .driver = { |
| 1442 | .name = "mpc52xx-psc-uart", | 1441 | .name = "mpc52xx-psc-uart", |
| 1442 | .owner = THIS_MODULE, | ||
| 1443 | .of_match_table = mpc52xx_uart_of_match, | ||
| 1443 | }, | 1444 | }, |
| 1444 | }; | 1445 | }; |
| 1445 | 1446 | ||
diff --git a/drivers/serial/nwpserial.c b/drivers/serial/nwpserial.c index e1ab8ec0a4a..3c02fa96f28 100644 --- a/drivers/serial/nwpserial.c +++ b/drivers/serial/nwpserial.c | |||
| @@ -344,7 +344,7 @@ int nwpserial_register_port(struct uart_port *port) | |||
| 344 | 344 | ||
| 345 | mutex_lock(&nwpserial_mutex); | 345 | mutex_lock(&nwpserial_mutex); |
| 346 | 346 | ||
| 347 | dn = to_of_device(port->dev)->node; | 347 | dn = to_of_device(port->dev)->dev.of_node; |
| 348 | if (dn == NULL) | 348 | if (dn == NULL) |
| 349 | goto out; | 349 | goto out; |
| 350 | 350 | ||
diff --git a/drivers/serial/of_serial.c b/drivers/serial/of_serial.c index 4abfebdb0fc..a48d9080f55 100644 --- a/drivers/serial/of_serial.c +++ b/drivers/serial/of_serial.c | |||
| @@ -31,7 +31,7 @@ static int __devinit of_platform_serial_setup(struct of_device *ofdev, | |||
| 31 | int type, struct uart_port *port) | 31 | int type, struct uart_port *port) |
| 32 | { | 32 | { |
| 33 | struct resource resource; | 33 | struct resource resource; |
| 34 | struct device_node *np = ofdev->node; | 34 | struct device_node *np = ofdev->dev.of_node; |
| 35 | const unsigned int *clk, *spd; | 35 | const unsigned int *clk, *spd; |
| 36 | const u32 *prop; | 36 | const u32 *prop; |
| 37 | int ret, prop_size; | 37 | int ret, prop_size; |
| @@ -88,7 +88,7 @@ static int __devinit of_platform_serial_probe(struct of_device *ofdev, | |||
| 88 | int port_type; | 88 | int port_type; |
| 89 | int ret; | 89 | int ret; |
| 90 | 90 | ||
| 91 | if (of_find_property(ofdev->node, "used-by-rtas", NULL)) | 91 | if (of_find_property(ofdev->dev.of_node, "used-by-rtas", NULL)) |
| 92 | return -EBUSY; | 92 | return -EBUSY; |
| 93 | 93 | ||
| 94 | info = kmalloc(sizeof(*info), GFP_KERNEL); | 94 | info = kmalloc(sizeof(*info), GFP_KERNEL); |
| @@ -175,11 +175,13 @@ static struct of_device_id __devinitdata of_platform_serial_table[] = { | |||
| 175 | }; | 175 | }; |
| 176 | 176 | ||
| 177 | static struct of_platform_driver of_platform_serial_driver = { | 177 | static struct of_platform_driver of_platform_serial_driver = { |
| 178 | .owner = THIS_MODULE, | 178 | .driver = { |
| 179 | .name = "of_serial", | 179 | .name = "of_serial", |
| 180 | .owner = THIS_MODULE, | ||
| 181 | .of_match_table = of_platform_serial_table, | ||
| 182 | }, | ||
| 180 | .probe = of_platform_serial_probe, | 183 | .probe = of_platform_serial_probe, |
| 181 | .remove = of_platform_serial_remove, | 184 | .remove = of_platform_serial_remove, |
| 182 | .match_table = of_platform_serial_table, | ||
| 183 | }; | 185 | }; |
| 184 | 186 | ||
| 185 | static int __init of_platform_serial_init(void) | 187 | static int __init of_platform_serial_init(void) |
diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c index 700e10833bf..cabbdc7ba58 100644 --- a/drivers/serial/pmac_zilog.c +++ b/drivers/serial/pmac_zilog.c | |||
| @@ -1611,7 +1611,7 @@ static int pmz_attach(struct macio_dev *mdev, const struct of_device_id *match) | |||
| 1611 | /* Iterate the pmz_ports array to find a matching entry | 1611 | /* Iterate the pmz_ports array to find a matching entry |
| 1612 | */ | 1612 | */ |
| 1613 | for (i = 0; i < MAX_ZS_PORTS; i++) | 1613 | for (i = 0; i < MAX_ZS_PORTS; i++) |
| 1614 | if (pmz_ports[i].node == mdev->ofdev.node) { | 1614 | if (pmz_ports[i].node == mdev->ofdev.dev.of_node) { |
| 1615 | struct uart_pmac_port *uap = &pmz_ports[i]; | 1615 | struct uart_pmac_port *uap = &pmz_ports[i]; |
| 1616 | 1616 | ||
| 1617 | uap->dev = mdev; | 1617 | uap->dev = mdev; |
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c index 4f73fb75674..5f90fcd7d10 100644 --- a/drivers/serial/sh-sci.c +++ b/drivers/serial/sh-sci.c | |||
| @@ -1004,8 +1004,9 @@ static void sci_rx_dma_release(struct sci_port *s, bool enable_pio) | |||
| 1004 | s->chan_rx = NULL; | 1004 | s->chan_rx = NULL; |
| 1005 | s->cookie_rx[0] = s->cookie_rx[1] = -EINVAL; | 1005 | s->cookie_rx[0] = s->cookie_rx[1] = -EINVAL; |
| 1006 | dma_release_channel(chan); | 1006 | dma_release_channel(chan); |
| 1007 | dma_free_coherent(port->dev, s->buf_len_rx * 2, | 1007 | if (sg_dma_address(&s->sg_rx[0])) |
| 1008 | sg_virt(&s->sg_rx[0]), sg_dma_address(&s->sg_rx[0])); | 1008 | dma_free_coherent(port->dev, s->buf_len_rx * 2, |
| 1009 | sg_virt(&s->sg_rx[0]), sg_dma_address(&s->sg_rx[0])); | ||
| 1009 | if (enable_pio) | 1010 | if (enable_pio) |
| 1010 | sci_start_rx(port); | 1011 | sci_start_rx(port); |
| 1011 | } | 1012 | } |
diff --git a/drivers/serial/sunhv.c b/drivers/serial/sunhv.c index d14cca7fb88..890f9174296 100644 --- a/drivers/serial/sunhv.c +++ b/drivers/serial/sunhv.c | |||
| @@ -565,7 +565,7 @@ static int __devinit hv_probe(struct of_device *op, const struct of_device_id *m | |||
| 565 | if (err) | 565 | if (err) |
| 566 | goto out_free_con_read_page; | 566 | goto out_free_con_read_page; |
| 567 | 567 | ||
| 568 | sunserial_console_match(&sunhv_console, op->node, | 568 | sunserial_console_match(&sunhv_console, op->dev.of_node, |
| 569 | &sunhv_reg, port->line, false); | 569 | &sunhv_reg, port->line, false); |
| 570 | 570 | ||
| 571 | err = uart_add_one_port(&sunhv_reg, port); | 571 | err = uart_add_one_port(&sunhv_reg, port); |
| @@ -630,8 +630,11 @@ static const struct of_device_id hv_match[] = { | |||
| 630 | MODULE_DEVICE_TABLE(of, hv_match); | 630 | MODULE_DEVICE_TABLE(of, hv_match); |
| 631 | 631 | ||
| 632 | static struct of_platform_driver hv_driver = { | 632 | static struct of_platform_driver hv_driver = { |
| 633 | .name = "hv", | 633 | .driver = { |
| 634 | .match_table = hv_match, | 634 | .name = "hv", |
| 635 | .owner = THIS_MODULE, | ||
| 636 | .of_match_table = hv_match, | ||
| 637 | }, | ||
| 635 | .probe = hv_probe, | 638 | .probe = hv_probe, |
| 636 | .remove = __devexit_p(hv_remove), | 639 | .remove = __devexit_p(hv_remove), |
| 637 | }; | 640 | }; |
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c index d2e0321049e..5e81bc6b48b 100644 --- a/drivers/serial/sunsab.c +++ b/drivers/serial/sunsab.c | |||
| @@ -883,7 +883,7 @@ static int sunsab_console_setup(struct console *con, char *options) | |||
| 883 | printk("Console: ttyS%d (SAB82532)\n", | 883 | printk("Console: ttyS%d (SAB82532)\n", |
| 884 | (sunsab_reg.minor - 64) + con->index); | 884 | (sunsab_reg.minor - 64) + con->index); |
| 885 | 885 | ||
| 886 | sunserial_console_termios(con, to_of_device(up->port.dev)->node); | 886 | sunserial_console_termios(con, to_of_device(up->port.dev)->dev.of_node); |
| 887 | 887 | ||
| 888 | switch (con->cflag & CBAUD) { | 888 | switch (con->cflag & CBAUD) { |
| 889 | case B150: baud = 150; break; | 889 | case B150: baud = 150; break; |
| @@ -1026,11 +1026,11 @@ static int __devinit sab_probe(struct of_device *op, const struct of_device_id * | |||
| 1026 | if (err) | 1026 | if (err) |
| 1027 | goto out1; | 1027 | goto out1; |
| 1028 | 1028 | ||
| 1029 | sunserial_console_match(SUNSAB_CONSOLE(), op->node, | 1029 | sunserial_console_match(SUNSAB_CONSOLE(), op->dev.of_node, |
| 1030 | &sunsab_reg, up[0].port.line, | 1030 | &sunsab_reg, up[0].port.line, |
| 1031 | false); | 1031 | false); |
| 1032 | 1032 | ||
| 1033 | sunserial_console_match(SUNSAB_CONSOLE(), op->node, | 1033 | sunserial_console_match(SUNSAB_CONSOLE(), op->dev.of_node, |
| 1034 | &sunsab_reg, up[1].port.line, | 1034 | &sunsab_reg, up[1].port.line, |
| 1035 | false); | 1035 | false); |
| 1036 | 1036 | ||
| @@ -1093,8 +1093,11 @@ static const struct of_device_id sab_match[] = { | |||
| 1093 | MODULE_DEVICE_TABLE(of, sab_match); | 1093 | MODULE_DEVICE_TABLE(of, sab_match); |
| 1094 | 1094 | ||
| 1095 | static struct of_platform_driver sab_driver = { | 1095 | static struct of_platform_driver sab_driver = { |
| 1096 | .name = "sab", | 1096 | .driver = { |
| 1097 | .match_table = sab_match, | 1097 | .name = "sab", |
| 1098 | .owner = THIS_MODULE, | ||
| 1099 | .of_match_table = sab_match, | ||
| 1100 | }, | ||
| 1098 | .probe = sab_probe, | 1101 | .probe = sab_probe, |
| 1099 | .remove = __devexit_p(sab_remove), | 1102 | .remove = __devexit_p(sab_remove), |
| 1100 | }; | 1103 | }; |
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c index 01f7731e59b..234459c2f01 100644 --- a/drivers/serial/sunsu.c +++ b/drivers/serial/sunsu.c | |||
| @@ -1200,7 +1200,7 @@ static int __devinit sunsu_kbd_ms_init(struct uart_sunsu_port *up) | |||
| 1200 | return -ENODEV; | 1200 | return -ENODEV; |
| 1201 | 1201 | ||
| 1202 | printk("%s: %s port at %llx, irq %u\n", | 1202 | printk("%s: %s port at %llx, irq %u\n", |
| 1203 | to_of_device(up->port.dev)->node->full_name, | 1203 | to_of_device(up->port.dev)->dev.of_node->full_name, |
| 1204 | (up->su_type == SU_PORT_KBD) ? "Keyboard" : "Mouse", | 1204 | (up->su_type == SU_PORT_KBD) ? "Keyboard" : "Mouse", |
| 1205 | (unsigned long long) up->port.mapbase, | 1205 | (unsigned long long) up->port.mapbase, |
| 1206 | up->port.irq); | 1206 | up->port.irq); |
| @@ -1352,7 +1352,7 @@ static int __init sunsu_console_setup(struct console *co, char *options) | |||
| 1352 | spin_lock_init(&port->lock); | 1352 | spin_lock_init(&port->lock); |
| 1353 | 1353 | ||
| 1354 | /* Get firmware console settings. */ | 1354 | /* Get firmware console settings. */ |
| 1355 | sunserial_console_termios(co, to_of_device(port->dev)->node); | 1355 | sunserial_console_termios(co, to_of_device(port->dev)->dev.of_node); |
| 1356 | 1356 | ||
| 1357 | memset(&termios, 0, sizeof(struct ktermios)); | 1357 | memset(&termios, 0, sizeof(struct ktermios)); |
| 1358 | termios.c_cflag = co->cflag; | 1358 | termios.c_cflag = co->cflag; |
| @@ -1409,7 +1409,7 @@ static enum su_type __devinit su_get_type(struct device_node *dp) | |||
| 1409 | static int __devinit su_probe(struct of_device *op, const struct of_device_id *match) | 1409 | static int __devinit su_probe(struct of_device *op, const struct of_device_id *match) |
| 1410 | { | 1410 | { |
| 1411 | static int inst; | 1411 | static int inst; |
| 1412 | struct device_node *dp = op->node; | 1412 | struct device_node *dp = op->dev.of_node; |
| 1413 | struct uart_sunsu_port *up; | 1413 | struct uart_sunsu_port *up; |
| 1414 | struct resource *rp; | 1414 | struct resource *rp; |
| 1415 | enum su_type type; | 1415 | enum su_type type; |
| @@ -1539,8 +1539,11 @@ static const struct of_device_id su_match[] = { | |||
| 1539 | MODULE_DEVICE_TABLE(of, su_match); | 1539 | MODULE_DEVICE_TABLE(of, su_match); |
| 1540 | 1540 | ||
| 1541 | static struct of_platform_driver su_driver = { | 1541 | static struct of_platform_driver su_driver = { |
| 1542 | .name = "su", | 1542 | .driver = { |
| 1543 | .match_table = su_match, | 1543 | .name = "su", |
| 1544 | .owner = THIS_MODULE, | ||
| 1545 | .of_match_table = su_match, | ||
| 1546 | }, | ||
| 1544 | .probe = su_probe, | 1547 | .probe = su_probe, |
| 1545 | .remove = __devexit_p(su_remove), | 1548 | .remove = __devexit_p(su_remove), |
| 1546 | }; | 1549 | }; |
diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c index 978b3cee02d..f9a24f4ebb3 100644 --- a/drivers/serial/sunzilog.c +++ b/drivers/serial/sunzilog.c | |||
| @@ -1230,7 +1230,7 @@ static int __init sunzilog_console_setup(struct console *con, char *options) | |||
| 1230 | (sunzilog_reg.minor - 64) + con->index, con->index); | 1230 | (sunzilog_reg.minor - 64) + con->index, con->index); |
| 1231 | 1231 | ||
| 1232 | /* Get firmware console settings. */ | 1232 | /* Get firmware console settings. */ |
| 1233 | sunserial_console_termios(con, to_of_device(up->port.dev)->node); | 1233 | sunserial_console_termios(con, to_of_device(up->port.dev)->dev.of_node); |
| 1234 | 1234 | ||
| 1235 | /* Firmware console speed is limited to 150-->38400 baud so | 1235 | /* Firmware console speed is limited to 150-->38400 baud so |
| 1236 | * this hackish cflag thing is OK. | 1236 | * this hackish cflag thing is OK. |
| @@ -1408,7 +1408,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *m | |||
| 1408 | int keyboard_mouse = 0; | 1408 | int keyboard_mouse = 0; |
| 1409 | int err; | 1409 | int err; |
| 1410 | 1410 | ||
| 1411 | if (of_find_property(op->node, "keyboard", NULL)) | 1411 | if (of_find_property(op->dev.of_node, "keyboard", NULL)) |
| 1412 | keyboard_mouse = 1; | 1412 | keyboard_mouse = 1; |
| 1413 | 1413 | ||
| 1414 | /* uarts must come before keyboards/mice */ | 1414 | /* uarts must come before keyboards/mice */ |
| @@ -1465,7 +1465,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *m | |||
| 1465 | sunzilog_init_hw(&up[1]); | 1465 | sunzilog_init_hw(&up[1]); |
| 1466 | 1466 | ||
| 1467 | if (!keyboard_mouse) { | 1467 | if (!keyboard_mouse) { |
| 1468 | if (sunserial_console_match(SUNZILOG_CONSOLE(), op->node, | 1468 | if (sunserial_console_match(SUNZILOG_CONSOLE(), op->dev.of_node, |
| 1469 | &sunzilog_reg, up[0].port.line, | 1469 | &sunzilog_reg, up[0].port.line, |
| 1470 | false)) | 1470 | false)) |
| 1471 | up->flags |= SUNZILOG_FLAG_IS_CONS; | 1471 | up->flags |= SUNZILOG_FLAG_IS_CONS; |
| @@ -1475,7 +1475,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *m | |||
| 1475 | rp, sizeof(struct zilog_layout)); | 1475 | rp, sizeof(struct zilog_layout)); |
| 1476 | return err; | 1476 | return err; |
| 1477 | } | 1477 | } |
| 1478 | if (sunserial_console_match(SUNZILOG_CONSOLE(), op->node, | 1478 | if (sunserial_console_match(SUNZILOG_CONSOLE(), op->dev.of_node, |
| 1479 | &sunzilog_reg, up[1].port.line, | 1479 | &sunzilog_reg, up[1].port.line, |
| 1480 | false)) | 1480 | false)) |
| 1481 | up->flags |= SUNZILOG_FLAG_IS_CONS; | 1481 | up->flags |= SUNZILOG_FLAG_IS_CONS; |
| @@ -1541,8 +1541,11 @@ static const struct of_device_id zs_match[] = { | |||
| 1541 | MODULE_DEVICE_TABLE(of, zs_match); | 1541 | MODULE_DEVICE_TABLE(of, zs_match); |
| 1542 | 1542 | ||
| 1543 | static struct of_platform_driver zs_driver = { | 1543 | static struct of_platform_driver zs_driver = { |
| 1544 | .name = "zs", | 1544 | .driver = { |
| 1545 | .match_table = zs_match, | 1545 | .name = "zs", |
| 1546 | .owner = THIS_MODULE, | ||
| 1547 | .of_match_table = zs_match, | ||
| 1548 | }, | ||
| 1546 | .probe = zs_probe, | 1549 | .probe = zs_probe, |
| 1547 | .remove = __devexit_p(zs_remove), | 1550 | .remove = __devexit_p(zs_remove), |
| 1548 | }; | 1551 | }; |
diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c index e6639a95d27..8acccd56437 100644 --- a/drivers/serial/uartlite.c +++ b/drivers/serial/uartlite.c | |||
| @@ -591,15 +591,15 @@ ulite_of_probe(struct of_device *op, const struct of_device_id *match) | |||
| 591 | 591 | ||
| 592 | dev_dbg(&op->dev, "%s(%p, %p)\n", __func__, op, match); | 592 | dev_dbg(&op->dev, "%s(%p, %p)\n", __func__, op, match); |
| 593 | 593 | ||
| 594 | rc = of_address_to_resource(op->node, 0, &res); | 594 | rc = of_address_to_resource(op->dev.of_node, 0, &res); |
| 595 | if (rc) { | 595 | if (rc) { |
| 596 | dev_err(&op->dev, "invalid address\n"); | 596 | dev_err(&op->dev, "invalid address\n"); |
| 597 | return rc; | 597 | return rc; |
| 598 | } | 598 | } |
| 599 | 599 | ||
| 600 | irq = irq_of_parse_and_map(op->node, 0); | 600 | irq = irq_of_parse_and_map(op->dev.of_node, 0); |
| 601 | 601 | ||
| 602 | id = of_get_property(op->node, "port-number", NULL); | 602 | id = of_get_property(op->dev.of_node, "port-number", NULL); |
| 603 | 603 | ||
| 604 | return ulite_assign(&op->dev, id ? *id : -1, res.start, irq); | 604 | return ulite_assign(&op->dev, id ? *id : -1, res.start, irq); |
| 605 | } | 605 | } |
| @@ -610,13 +610,12 @@ static int __devexit ulite_of_remove(struct of_device *op) | |||
| 610 | } | 610 | } |
| 611 | 611 | ||
| 612 | static struct of_platform_driver ulite_of_driver = { | 612 | static struct of_platform_driver ulite_of_driver = { |
| 613 | .owner = THIS_MODULE, | ||
| 614 | .name = "uartlite", | ||
| 615 | .match_table = ulite_of_match, | ||
| 616 | .probe = ulite_of_probe, | 613 | .probe = ulite_of_probe, |
| 617 | .remove = __devexit_p(ulite_of_remove), | 614 | .remove = __devexit_p(ulite_of_remove), |
| 618 | .driver = { | 615 | .driver = { |
| 619 | .name = "uartlite", | 616 | .name = "uartlite", |
| 617 | .owner = THIS_MODULE, | ||
| 618 | .of_match_table = ulite_of_match, | ||
| 620 | }, | 619 | }, |
| 621 | }; | 620 | }; |
| 622 | 621 | ||
diff --git a/drivers/serial/ucc_uart.c b/drivers/serial/ucc_uart.c index 074904912f6..907b06f5c44 100644 --- a/drivers/serial/ucc_uart.c +++ b/drivers/serial/ucc_uart.c | |||
| @@ -1197,7 +1197,7 @@ static void uart_firmware_cont(const struct firmware *fw, void *context) | |||
| 1197 | static int ucc_uart_probe(struct of_device *ofdev, | 1197 | static int ucc_uart_probe(struct of_device *ofdev, |
| 1198 | const struct of_device_id *match) | 1198 | const struct of_device_id *match) |
| 1199 | { | 1199 | { |
| 1200 | struct device_node *np = ofdev->node; | 1200 | struct device_node *np = ofdev->dev.of_node; |
| 1201 | const unsigned int *iprop; /* Integer OF properties */ | 1201 | const unsigned int *iprop; /* Integer OF properties */ |
| 1202 | const char *sprop; /* String OF properties */ | 1202 | const char *sprop; /* String OF properties */ |
| 1203 | struct uart_qe_port *qe_port = NULL; | 1203 | struct uart_qe_port *qe_port = NULL; |
| @@ -1486,9 +1486,11 @@ static struct of_device_id ucc_uart_match[] = { | |||
| 1486 | MODULE_DEVICE_TABLE(of, ucc_uart_match); | 1486 | MODULE_DEVICE_TABLE(of, ucc_uart_match); |
| 1487 | 1487 | ||
| 1488 | static struct of_platform_driver ucc_uart_of_driver = { | 1488 | static struct of_platform_driver ucc_uart_of_driver = { |
| 1489 | .owner = THIS_MODULE, | 1489 | .driver = { |
| 1490 | .name = "ucc_uart", | 1490 | .name = "ucc_uart", |
| 1491 | .match_table = ucc_uart_match, | 1491 | .owner = THIS_MODULE, |
| 1492 | .of_match_table = ucc_uart_match, | ||
| 1493 | }, | ||
| 1492 | .probe = ucc_uart_probe, | 1494 | .probe = ucc_uart_probe, |
| 1493 | .remove = ucc_uart_remove, | 1495 | .remove = ucc_uart_remove, |
| 1494 | }; | 1496 | }; |
diff --git a/drivers/spi/mpc52xx_psc_spi.c b/drivers/spi/mpc52xx_psc_spi.c index 77d4cc88ede..7104cb739da 100644 --- a/drivers/spi/mpc52xx_psc_spi.c +++ b/drivers/spi/mpc52xx_psc_spi.c | |||
| @@ -472,18 +472,18 @@ static int __init mpc52xx_psc_spi_of_probe(struct of_device *op, | |||
| 472 | s16 id = -1; | 472 | s16 id = -1; |
| 473 | int rc; | 473 | int rc; |
| 474 | 474 | ||
| 475 | regaddr_p = of_get_address(op->node, 0, &size64, NULL); | 475 | regaddr_p = of_get_address(op->dev.of_node, 0, &size64, NULL); |
| 476 | if (!regaddr_p) { | 476 | if (!regaddr_p) { |
| 477 | dev_err(&op->dev, "Invalid PSC address\n"); | 477 | dev_err(&op->dev, "Invalid PSC address\n"); |
| 478 | return -EINVAL; | 478 | return -EINVAL; |
| 479 | } | 479 | } |
| 480 | regaddr64 = of_translate_address(op->node, regaddr_p); | 480 | regaddr64 = of_translate_address(op->dev.of_node, regaddr_p); |
| 481 | 481 | ||
| 482 | /* get PSC id (1..6, used by port_config) */ | 482 | /* get PSC id (1..6, used by port_config) */ |
| 483 | if (op->dev.platform_data == NULL) { | 483 | if (op->dev.platform_data == NULL) { |
| 484 | const u32 *psc_nump; | 484 | const u32 *psc_nump; |
| 485 | 485 | ||
| 486 | psc_nump = of_get_property(op->node, "cell-index", NULL); | 486 | psc_nump = of_get_property(op->dev.of_node, "cell-index", NULL); |
| 487 | if (!psc_nump || *psc_nump > 5) { | 487 | if (!psc_nump || *psc_nump > 5) { |
| 488 | dev_err(&op->dev, "Invalid cell-index property\n"); | 488 | dev_err(&op->dev, "Invalid cell-index property\n"); |
| 489 | return -EINVAL; | 489 | return -EINVAL; |
| @@ -492,9 +492,10 @@ static int __init mpc52xx_psc_spi_of_probe(struct of_device *op, | |||
| 492 | } | 492 | } |
| 493 | 493 | ||
| 494 | rc = mpc52xx_psc_spi_do_probe(&op->dev, (u32)regaddr64, (u32)size64, | 494 | rc = mpc52xx_psc_spi_do_probe(&op->dev, (u32)regaddr64, (u32)size64, |
| 495 | irq_of_parse_and_map(op->node, 0), id); | 495 | irq_of_parse_and_map(op->dev.of_node, 0), id); |
| 496 | if (rc == 0) | 496 | if (rc == 0) |
| 497 | of_register_spi_devices(dev_get_drvdata(&op->dev), op->node); | 497 | of_register_spi_devices(dev_get_drvdata(&op->dev), |
| 498 | op->dev.of_node); | ||
| 498 | 499 | ||
| 499 | return rc; | 500 | return rc; |
| 500 | } | 501 | } |
| @@ -513,14 +514,12 @@ static const struct of_device_id mpc52xx_psc_spi_of_match[] = { | |||
| 513 | MODULE_DEVICE_TABLE(of, mpc52xx_psc_spi_of_match); | 514 | MODULE_DEVICE_TABLE(of, mpc52xx_psc_spi_of_match); |
| 514 | 515 | ||
| 515 | static struct of_platform_driver mpc52xx_psc_spi_of_driver = { | 516 | static struct of_platform_driver mpc52xx_psc_spi_of_driver = { |
| 516 | .owner = THIS_MODULE, | ||
| 517 | .name = "mpc52xx-psc-spi", | ||
| 518 | .match_table = mpc52xx_psc_spi_of_match, | ||
| 519 | .probe = mpc52xx_psc_spi_of_probe, | 517 | .probe = mpc52xx_psc_spi_of_probe, |
| 520 | .remove = __exit_p(mpc52xx_psc_spi_of_remove), | 518 | .remove = __exit_p(mpc52xx_psc_spi_of_remove), |
| 521 | .driver = { | 519 | .driver = { |
| 522 | .name = "mpc52xx-psc-spi", | 520 | .name = "mpc52xx-psc-spi", |
| 523 | .owner = THIS_MODULE, | 521 | .owner = THIS_MODULE, |
| 522 | .of_match_table = mpc52xx_psc_spi_of_match, | ||
| 524 | }, | 523 | }, |
| 525 | }; | 524 | }; |
| 526 | 525 | ||
diff --git a/drivers/spi/mpc52xx_spi.c b/drivers/spi/mpc52xx_spi.c index cd68f1ce5cc..b1a76bff775 100644 --- a/drivers/spi/mpc52xx_spi.c +++ b/drivers/spi/mpc52xx_spi.c | |||
| @@ -403,7 +403,7 @@ static int __devinit mpc52xx_spi_probe(struct of_device *op, | |||
| 403 | 403 | ||
| 404 | /* MMIO registers */ | 404 | /* MMIO registers */ |
| 405 | dev_dbg(&op->dev, "probing mpc5200 SPI device\n"); | 405 | dev_dbg(&op->dev, "probing mpc5200 SPI device\n"); |
| 406 | regs = of_iomap(op->node, 0); | 406 | regs = of_iomap(op->dev.of_node, 0); |
| 407 | if (!regs) | 407 | if (!regs) |
| 408 | return -ENODEV; | 408 | return -ENODEV; |
| 409 | 409 | ||
| @@ -445,11 +445,11 @@ static int __devinit mpc52xx_spi_probe(struct of_device *op, | |||
| 445 | ms = spi_master_get_devdata(master); | 445 | ms = spi_master_get_devdata(master); |
| 446 | ms->master = master; | 446 | ms->master = master; |
| 447 | ms->regs = regs; | 447 | ms->regs = regs; |
| 448 | ms->irq0 = irq_of_parse_and_map(op->node, 0); | 448 | ms->irq0 = irq_of_parse_and_map(op->dev.of_node, 0); |
| 449 | ms->irq1 = irq_of_parse_and_map(op->node, 1); | 449 | ms->irq1 = irq_of_parse_and_map(op->dev.of_node, 1); |
| 450 | ms->state = mpc52xx_spi_fsmstate_idle; | 450 | ms->state = mpc52xx_spi_fsmstate_idle; |
| 451 | ms->ipb_freq = mpc5xxx_get_bus_frequency(op->node); | 451 | ms->ipb_freq = mpc5xxx_get_bus_frequency(op->dev.of_node); |
| 452 | ms->gpio_cs_count = of_gpio_count(op->node); | 452 | ms->gpio_cs_count = of_gpio_count(op->dev.of_node); |
| 453 | if (ms->gpio_cs_count > 0) { | 453 | if (ms->gpio_cs_count > 0) { |
| 454 | master->num_chipselect = ms->gpio_cs_count; | 454 | master->num_chipselect = ms->gpio_cs_count; |
| 455 | ms->gpio_cs = kmalloc(ms->gpio_cs_count * sizeof(unsigned int), | 455 | ms->gpio_cs = kmalloc(ms->gpio_cs_count * sizeof(unsigned int), |
| @@ -460,7 +460,7 @@ static int __devinit mpc52xx_spi_probe(struct of_device *op, | |||
| 460 | } | 460 | } |
| 461 | 461 | ||
| 462 | for (i = 0; i < ms->gpio_cs_count; i++) { | 462 | for (i = 0; i < ms->gpio_cs_count; i++) { |
| 463 | gpio_cs = of_get_gpio(op->node, i); | 463 | gpio_cs = of_get_gpio(op->dev.of_node, i); |
| 464 | if (gpio_cs < 0) { | 464 | if (gpio_cs < 0) { |
| 465 | dev_err(&op->dev, | 465 | dev_err(&op->dev, |
| 466 | "could not parse the gpio field " | 466 | "could not parse the gpio field " |
| @@ -512,7 +512,7 @@ static int __devinit mpc52xx_spi_probe(struct of_device *op, | |||
| 512 | if (rc) | 512 | if (rc) |
| 513 | goto err_register; | 513 | goto err_register; |
| 514 | 514 | ||
| 515 | of_register_spi_devices(master, op->node); | 515 | of_register_spi_devices(master, op->dev.of_node); |
| 516 | dev_info(&ms->master->dev, "registered MPC5200 SPI bus\n"); | 516 | dev_info(&ms->master->dev, "registered MPC5200 SPI bus\n"); |
| 517 | 517 | ||
| 518 | return rc; | 518 | return rc; |
| @@ -558,9 +558,11 @@ static const struct of_device_id mpc52xx_spi_match[] __devinitconst = { | |||
| 558 | MODULE_DEVICE_TABLE(of, mpc52xx_spi_match); | 558 | MODULE_DEVICE_TABLE(of, mpc52xx_spi_match); |
| 559 | 559 | ||
| 560 | static struct of_platform_driver mpc52xx_spi_of_driver = { | 560 | static struct of_platform_driver mpc52xx_spi_of_driver = { |
| 561 | .owner = THIS_MODULE, | 561 | .driver = { |
| 562 | .name = "mpc52xx-spi", | 562 | .name = "mpc52xx-spi", |
| 563 | .match_table = mpc52xx_spi_match, | 563 | .owner = THIS_MODULE, |
| 564 | .of_match_table = mpc52xx_spi_match, | ||
| 565 | }, | ||
| 564 | .probe = mpc52xx_spi_probe, | 566 | .probe = mpc52xx_spi_probe, |
| 565 | .remove = __exit_p(mpc52xx_spi_remove), | 567 | .remove = __exit_p(mpc52xx_spi_remove), |
| 566 | }; | 568 | }; |
diff --git a/drivers/spi/spi_mpc8xxx.c b/drivers/spi/spi_mpc8xxx.c index e324627d97a..75b7f8c0bab 100644 --- a/drivers/spi/spi_mpc8xxx.c +++ b/drivers/spi/spi_mpc8xxx.c | |||
| @@ -797,7 +797,7 @@ static void mpc8xxx_spi_free_dummy_rx(void) | |||
| 797 | static unsigned long mpc8xxx_spi_cpm_get_pram(struct mpc8xxx_spi *mspi) | 797 | static unsigned long mpc8xxx_spi_cpm_get_pram(struct mpc8xxx_spi *mspi) |
| 798 | { | 798 | { |
| 799 | struct device *dev = mspi->dev; | 799 | struct device *dev = mspi->dev; |
| 800 | struct device_node *np = dev_archdata_get_node(&dev->archdata); | 800 | struct device_node *np = dev->of_node; |
| 801 | const u32 *iprop; | 801 | const u32 *iprop; |
| 802 | int size; | 802 | int size; |
| 803 | unsigned long spi_base_ofs; | 803 | unsigned long spi_base_ofs; |
| @@ -851,7 +851,7 @@ static unsigned long mpc8xxx_spi_cpm_get_pram(struct mpc8xxx_spi *mspi) | |||
| 851 | static int mpc8xxx_spi_cpm_init(struct mpc8xxx_spi *mspi) | 851 | static int mpc8xxx_spi_cpm_init(struct mpc8xxx_spi *mspi) |
| 852 | { | 852 | { |
| 853 | struct device *dev = mspi->dev; | 853 | struct device *dev = mspi->dev; |
| 854 | struct device_node *np = dev_archdata_get_node(&dev->archdata); | 854 | struct device_node *np = dev->of_node; |
| 855 | const u32 *iprop; | 855 | const u32 *iprop; |
| 856 | int size; | 856 | int size; |
| 857 | unsigned long pram_ofs; | 857 | unsigned long pram_ofs; |
| @@ -1123,7 +1123,7 @@ static void mpc8xxx_spi_cs_control(struct spi_device *spi, bool on) | |||
| 1123 | 1123 | ||
| 1124 | static int of_mpc8xxx_spi_get_chipselects(struct device *dev) | 1124 | static int of_mpc8xxx_spi_get_chipselects(struct device *dev) |
| 1125 | { | 1125 | { |
| 1126 | struct device_node *np = dev_archdata_get_node(&dev->archdata); | 1126 | struct device_node *np = dev->of_node; |
| 1127 | struct fsl_spi_platform_data *pdata = dev->platform_data; | 1127 | struct fsl_spi_platform_data *pdata = dev->platform_data; |
| 1128 | struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(pdata); | 1128 | struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(pdata); |
| 1129 | unsigned int ngpios; | 1129 | unsigned int ngpios; |
| @@ -1224,7 +1224,7 @@ static int __devinit of_mpc8xxx_spi_probe(struct of_device *ofdev, | |||
| 1224 | const struct of_device_id *ofid) | 1224 | const struct of_device_id *ofid) |
| 1225 | { | 1225 | { |
| 1226 | struct device *dev = &ofdev->dev; | 1226 | struct device *dev = &ofdev->dev; |
| 1227 | struct device_node *np = ofdev->node; | 1227 | struct device_node *np = ofdev->dev.of_node; |
| 1228 | struct mpc8xxx_spi_probe_info *pinfo; | 1228 | struct mpc8xxx_spi_probe_info *pinfo; |
| 1229 | struct fsl_spi_platform_data *pdata; | 1229 | struct fsl_spi_platform_data *pdata; |
| 1230 | struct spi_master *master; | 1230 | struct spi_master *master; |
| @@ -1312,8 +1312,11 @@ static const struct of_device_id of_mpc8xxx_spi_match[] = { | |||
| 1312 | MODULE_DEVICE_TABLE(of, of_mpc8xxx_spi_match); | 1312 | MODULE_DEVICE_TABLE(of, of_mpc8xxx_spi_match); |
| 1313 | 1313 | ||
| 1314 | static struct of_platform_driver of_mpc8xxx_spi_driver = { | 1314 | static struct of_platform_driver of_mpc8xxx_spi_driver = { |
| 1315 | .name = "mpc8xxx_spi", | 1315 | .driver = { |
| 1316 | .match_table = of_mpc8xxx_spi_match, | 1316 | .name = "mpc8xxx_spi", |
| 1317 | .owner = THIS_MODULE, | ||
| 1318 | .of_match_table = of_mpc8xxx_spi_match, | ||
| 1319 | }, | ||
| 1317 | .probe = of_mpc8xxx_spi_probe, | 1320 | .probe = of_mpc8xxx_spi_probe, |
| 1318 | .remove = __devexit_p(of_mpc8xxx_spi_remove), | 1321 | .remove = __devexit_p(of_mpc8xxx_spi_remove), |
| 1319 | }; | 1322 | }; |
diff --git a/drivers/spi/spi_ppc4xx.c b/drivers/spi/spi_ppc4xx.c index 7cb5ff37f6e..19c0b3b34fc 100644 --- a/drivers/spi/spi_ppc4xx.c +++ b/drivers/spi/spi_ppc4xx.c | |||
| @@ -587,12 +587,12 @@ static const struct of_device_id spi_ppc4xx_of_match[] = { | |||
| 587 | MODULE_DEVICE_TABLE(of, spi_ppc4xx_of_match); | 587 | MODULE_DEVICE_TABLE(of, spi_ppc4xx_of_match); |
| 588 | 588 | ||
| 589 | static struct of_platform_driver spi_ppc4xx_of_driver = { | 589 | static struct of_platform_driver spi_ppc4xx_of_driver = { |
| 590 | .match_table = spi_ppc4xx_of_match, | ||
| 591 | .probe = spi_ppc4xx_of_probe, | 590 | .probe = spi_ppc4xx_of_probe, |
| 592 | .remove = __exit_p(spi_ppc4xx_of_remove), | 591 | .remove = __exit_p(spi_ppc4xx_of_remove), |
| 593 | .driver = { | 592 | .driver = { |
| 594 | .name = DRIVER_NAME, | 593 | .name = DRIVER_NAME, |
| 595 | .owner = THIS_MODULE, | 594 | .owner = THIS_MODULE, |
| 595 | .of_match_table = spi_ppc4xx_of_match, | ||
| 596 | }, | 596 | }, |
| 597 | }; | 597 | }; |
| 598 | 598 | ||
diff --git a/drivers/spi/xilinx_spi_of.c b/drivers/spi/xilinx_spi_of.c index 748d33a76d2..55c58012a02 100644 --- a/drivers/spi/xilinx_spi_of.c +++ b/drivers/spi/xilinx_spi_of.c | |||
| @@ -109,12 +109,12 @@ static const struct of_device_id xilinx_spi_of_match[] = { | |||
| 109 | MODULE_DEVICE_TABLE(of, xilinx_spi_of_match); | 109 | MODULE_DEVICE_TABLE(of, xilinx_spi_of_match); |
| 110 | 110 | ||
| 111 | static struct of_platform_driver xilinx_spi_of_driver = { | 111 | static struct of_platform_driver xilinx_spi_of_driver = { |
| 112 | .match_table = xilinx_spi_of_match, | ||
| 113 | .probe = xilinx_spi_of_probe, | 112 | .probe = xilinx_spi_of_probe, |
| 114 | .remove = __exit_p(xilinx_spi_of_remove), | 113 | .remove = __exit_p(xilinx_spi_of_remove), |
| 115 | .driver = { | 114 | .driver = { |
| 116 | .name = "xilinx-xps-spi", | 115 | .name = "xilinx-xps-spi", |
| 117 | .owner = THIS_MODULE, | 116 | .owner = THIS_MODULE, |
| 117 | .of_match_table = xilinx_spi_of_match, | ||
| 118 | }, | 118 | }, |
| 119 | }; | 119 | }; |
| 120 | 120 | ||
diff --git a/drivers/usb/gadget/fsl_qe_udc.c b/drivers/usb/gadget/fsl_qe_udc.c index 3537d51073b..2928523268b 100644 --- a/drivers/usb/gadget/fsl_qe_udc.c +++ b/drivers/usb/gadget/fsl_qe_udc.c | |||
| @@ -2768,8 +2768,11 @@ static const struct of_device_id qe_udc_match[] __devinitconst = { | |||
| 2768 | MODULE_DEVICE_TABLE(of, qe_udc_match); | 2768 | MODULE_DEVICE_TABLE(of, qe_udc_match); |
| 2769 | 2769 | ||
| 2770 | static struct of_platform_driver udc_driver = { | 2770 | static struct of_platform_driver udc_driver = { |
| 2771 | .name = (char *)driver_name, | 2771 | .driver = { |
| 2772 | .match_table = qe_udc_match, | 2772 | .name = (char *)driver_name, |
| 2773 | .owner = THIS_MODULE, | ||
| 2774 | .of_match_table = qe_udc_match, | ||
| 2775 | }, | ||
| 2773 | .probe = qe_udc_probe, | 2776 | .probe = qe_udc_probe, |
| 2774 | .remove = __devexit_p(qe_udc_remove), | 2777 | .remove = __devexit_p(qe_udc_remove), |
| 2775 | #ifdef CONFIG_PM | 2778 | #ifdef CONFIG_PM |
diff --git a/drivers/usb/host/ehci-ppc-of.c b/drivers/usb/host/ehci-ppc-of.c index 8df33b8a634..5aec92866ab 100644 --- a/drivers/usb/host/ehci-ppc-of.c +++ b/drivers/usb/host/ehci-ppc-of.c | |||
| @@ -108,7 +108,7 @@ ppc44x_enable_bmt(struct device_node *dn) | |||
| 108 | static int __devinit | 108 | static int __devinit |
| 109 | ehci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match) | 109 | ehci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match) |
| 110 | { | 110 | { |
| 111 | struct device_node *dn = op->node; | 111 | struct device_node *dn = op->dev.of_node; |
| 112 | struct usb_hcd *hcd; | 112 | struct usb_hcd *hcd; |
| 113 | struct ehci_hcd *ehci = NULL; | 113 | struct ehci_hcd *ehci = NULL; |
| 114 | struct resource res; | 114 | struct resource res; |
| @@ -274,13 +274,12 @@ MODULE_DEVICE_TABLE(of, ehci_hcd_ppc_of_match); | |||
| 274 | 274 | ||
| 275 | 275 | ||
| 276 | static struct of_platform_driver ehci_hcd_ppc_of_driver = { | 276 | static struct of_platform_driver ehci_hcd_ppc_of_driver = { |
| 277 | .name = "ppc-of-ehci", | ||
| 278 | .match_table = ehci_hcd_ppc_of_match, | ||
| 279 | .probe = ehci_hcd_ppc_of_probe, | 277 | .probe = ehci_hcd_ppc_of_probe, |
| 280 | .remove = ehci_hcd_ppc_of_remove, | 278 | .remove = ehci_hcd_ppc_of_remove, |
| 281 | .shutdown = ehci_hcd_ppc_of_shutdown, | 279 | .shutdown = ehci_hcd_ppc_of_shutdown, |
| 282 | .driver = { | 280 | .driver = { |
| 283 | .name = "ppc-of-ehci", | 281 | .name = "ppc-of-ehci", |
| 284 | .owner = THIS_MODULE, | 282 | .owner = THIS_MODULE, |
| 283 | .of_match_table = ehci_hcd_ppc_of_match, | ||
| 285 | }, | 284 | }, |
| 286 | }; | 285 | }; |
diff --git a/drivers/usb/host/ehci-xilinx-of.c b/drivers/usb/host/ehci-xilinx-of.c index f603bb2c0a8..013972bbde5 100644 --- a/drivers/usb/host/ehci-xilinx-of.c +++ b/drivers/usb/host/ehci-xilinx-of.c | |||
| @@ -288,13 +288,12 @@ static const struct of_device_id ehci_hcd_xilinx_of_match[] = { | |||
| 288 | MODULE_DEVICE_TABLE(of, ehci_hcd_xilinx_of_match); | 288 | MODULE_DEVICE_TABLE(of, ehci_hcd_xilinx_of_match); |
| 289 | 289 | ||
| 290 | static struct of_platform_driver ehci_hcd_xilinx_of_driver = { | 290 | static struct of_platform_driver ehci_hcd_xilinx_of_driver = { |
| 291 | .name = "xilinx-of-ehci", | ||
| 292 | .match_table = ehci_hcd_xilinx_of_match, | ||
| 293 | .probe = ehci_hcd_xilinx_of_probe, | 291 | .probe = ehci_hcd_xilinx_of_probe, |
| 294 | .remove = ehci_hcd_xilinx_of_remove, | 292 | .remove = ehci_hcd_xilinx_of_remove, |
| 295 | .shutdown = ehci_hcd_xilinx_of_shutdown, | 293 | .shutdown = ehci_hcd_xilinx_of_shutdown, |
| 296 | .driver = { | 294 | .driver = { |
| 297 | .name = "xilinx-of-ehci", | 295 | .name = "xilinx-of-ehci", |
| 298 | .owner = THIS_MODULE, | 296 | .owner = THIS_MODULE, |
| 297 | .of_match_table = ehci_hcd_xilinx_of_match, | ||
| 299 | }, | 298 | }, |
| 300 | }; | 299 | }; |
diff --git a/drivers/usb/host/fhci-hcd.c b/drivers/usb/host/fhci-hcd.c index 90453379a43..c7c8392a88b 100644 --- a/drivers/usb/host/fhci-hcd.c +++ b/drivers/usb/host/fhci-hcd.c | |||
| @@ -565,7 +565,7 @@ static int __devinit of_fhci_probe(struct of_device *ofdev, | |||
| 565 | const struct of_device_id *ofid) | 565 | const struct of_device_id *ofid) |
| 566 | { | 566 | { |
| 567 | struct device *dev = &ofdev->dev; | 567 | struct device *dev = &ofdev->dev; |
| 568 | struct device_node *node = ofdev->node; | 568 | struct device_node *node = dev->of_node; |
| 569 | struct usb_hcd *hcd; | 569 | struct usb_hcd *hcd; |
| 570 | struct fhci_hcd *fhci; | 570 | struct fhci_hcd *fhci; |
| 571 | struct resource usb_regs; | 571 | struct resource usb_regs; |
| @@ -670,7 +670,7 @@ static int __devinit of_fhci_probe(struct of_device *ofdev, | |||
| 670 | } | 670 | } |
| 671 | 671 | ||
| 672 | for (j = 0; j < NUM_PINS; j++) { | 672 | for (j = 0; j < NUM_PINS; j++) { |
| 673 | fhci->pins[j] = qe_pin_request(ofdev->node, j); | 673 | fhci->pins[j] = qe_pin_request(node, j); |
| 674 | if (IS_ERR(fhci->pins[j])) { | 674 | if (IS_ERR(fhci->pins[j])) { |
| 675 | ret = PTR_ERR(fhci->pins[j]); | 675 | ret = PTR_ERR(fhci->pins[j]); |
| 676 | dev_err(dev, "can't get pin %d: %d\n", j, ret); | 676 | dev_err(dev, "can't get pin %d: %d\n", j, ret); |
| @@ -813,8 +813,11 @@ static const struct of_device_id of_fhci_match[] = { | |||
| 813 | MODULE_DEVICE_TABLE(of, of_fhci_match); | 813 | MODULE_DEVICE_TABLE(of, of_fhci_match); |
| 814 | 814 | ||
| 815 | static struct of_platform_driver of_fhci_driver = { | 815 | static struct of_platform_driver of_fhci_driver = { |
| 816 | .name = "fsl,usb-fhci", | 816 | .driver = { |
| 817 | .match_table = of_fhci_match, | 817 | .name = "fsl,usb-fhci", |
| 818 | .owner = THIS_MODULE, | ||
| 819 | .of_match_table = of_fhci_match, | ||
| 820 | }, | ||
| 818 | .probe = of_fhci_probe, | 821 | .probe = of_fhci_probe, |
| 819 | .remove = __devexit_p(of_fhci_remove), | 822 | .remove = __devexit_p(of_fhci_remove), |
| 820 | }; | 823 | }; |
diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c index 8f0259eaa2c..ec85d0c3cc3 100644 --- a/drivers/usb/host/isp1760-if.c +++ b/drivers/usb/host/isp1760-if.c | |||
| @@ -31,7 +31,7 @@ static int of_isp1760_probe(struct of_device *dev, | |||
| 31 | const struct of_device_id *match) | 31 | const struct of_device_id *match) |
| 32 | { | 32 | { |
| 33 | struct usb_hcd *hcd; | 33 | struct usb_hcd *hcd; |
| 34 | struct device_node *dp = dev->node; | 34 | struct device_node *dp = dev->dev.of_node; |
| 35 | struct resource *res; | 35 | struct resource *res; |
| 36 | struct resource memory; | 36 | struct resource memory; |
| 37 | struct of_irq oirq; | 37 | struct of_irq oirq; |
| @@ -120,8 +120,11 @@ static const struct of_device_id of_isp1760_match[] = { | |||
| 120 | MODULE_DEVICE_TABLE(of, of_isp1760_match); | 120 | MODULE_DEVICE_TABLE(of, of_isp1760_match); |
| 121 | 121 | ||
| 122 | static struct of_platform_driver isp1760_of_driver = { | 122 | static struct of_platform_driver isp1760_of_driver = { |
| 123 | .name = "nxp-isp1760", | 123 | .driver = { |
| 124 | .match_table = of_isp1760_match, | 124 | .name = "nxp-isp1760", |
| 125 | .owner = THIS_MODULE, | ||
| 126 | .of_match_table = of_isp1760_match, | ||
| 127 | }, | ||
| 125 | .probe = of_isp1760_probe, | 128 | .probe = of_isp1760_probe, |
| 126 | .remove = of_isp1760_remove, | 129 | .remove = of_isp1760_remove, |
| 127 | }; | 130 | }; |
diff --git a/drivers/usb/host/ohci-ppc-of.c b/drivers/usb/host/ohci-ppc-of.c index 103263c230c..df165917412 100644 --- a/drivers/usb/host/ohci-ppc-of.c +++ b/drivers/usb/host/ohci-ppc-of.c | |||
| @@ -83,7 +83,7 @@ static const struct hc_driver ohci_ppc_of_hc_driver = { | |||
| 83 | static int __devinit | 83 | static int __devinit |
| 84 | ohci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match) | 84 | ohci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match) |
| 85 | { | 85 | { |
| 86 | struct device_node *dn = op->node; | 86 | struct device_node *dn = op->dev.of_node; |
| 87 | struct usb_hcd *hcd; | 87 | struct usb_hcd *hcd; |
| 88 | struct ohci_hcd *ohci; | 88 | struct ohci_hcd *ohci; |
| 89 | struct resource res; | 89 | struct resource res; |
| @@ -244,18 +244,13 @@ MODULE_DEVICE_TABLE(of, ohci_hcd_ppc_of_match); | |||
| 244 | 244 | ||
| 245 | 245 | ||
| 246 | static struct of_platform_driver ohci_hcd_ppc_of_driver = { | 246 | static struct of_platform_driver ohci_hcd_ppc_of_driver = { |
| 247 | .name = "ppc-of-ohci", | ||
| 248 | .match_table = ohci_hcd_ppc_of_match, | ||
| 249 | .probe = ohci_hcd_ppc_of_probe, | 247 | .probe = ohci_hcd_ppc_of_probe, |
| 250 | .remove = ohci_hcd_ppc_of_remove, | 248 | .remove = ohci_hcd_ppc_of_remove, |
| 251 | .shutdown = ohci_hcd_ppc_of_shutdown, | 249 | .shutdown = ohci_hcd_ppc_of_shutdown, |
| 252 | #ifdef CONFIG_PM | 250 | .driver = { |
| 253 | /*.suspend = ohci_hcd_ppc_soc_drv_suspend,*/ | 251 | .name = "ppc-of-ohci", |
| 254 | /*.resume = ohci_hcd_ppc_soc_drv_resume,*/ | 252 | .owner = THIS_MODULE, |
| 255 | #endif | 253 | .of_match_table = ohci_hcd_ppc_of_match, |
| 256 | .driver = { | ||
| 257 | .name = "ppc-of-ohci", | ||
| 258 | .owner = THIS_MODULE, | ||
| 259 | }, | 254 | }, |
| 260 | }; | 255 | }; |
| 261 | 256 | ||
diff --git a/drivers/video/bw2.c b/drivers/video/bw2.c index 43320925c4c..2c371c07f0d 100644 --- a/drivers/video/bw2.c +++ b/drivers/video/bw2.c | |||
| @@ -376,8 +376,11 @@ static const struct of_device_id bw2_match[] = { | |||
| 376 | MODULE_DEVICE_TABLE(of, bw2_match); | 376 | MODULE_DEVICE_TABLE(of, bw2_match); |
| 377 | 377 | ||
| 378 | static struct of_platform_driver bw2_driver = { | 378 | static struct of_platform_driver bw2_driver = { |
| 379 | .name = "bw2", | 379 | .driver = { |
| 380 | .match_table = bw2_match, | 380 | .name = "bw2", |
| 381 | .owner = THIS_MODULE, | ||
| 382 | .of_match_table = bw2_match, | ||
| 383 | }, | ||
| 381 | .probe = bw2_probe, | 384 | .probe = bw2_probe, |
| 382 | .remove = __devexit_p(bw2_remove), | 385 | .remove = __devexit_p(bw2_remove), |
| 383 | }; | 386 | }; |
diff --git a/drivers/video/cg14.c b/drivers/video/cg14.c index 77a040af20a..d12e05b6e63 100644 --- a/drivers/video/cg14.c +++ b/drivers/video/cg14.c | |||
| @@ -596,8 +596,11 @@ static const struct of_device_id cg14_match[] = { | |||
| 596 | MODULE_DEVICE_TABLE(of, cg14_match); | 596 | MODULE_DEVICE_TABLE(of, cg14_match); |
| 597 | 597 | ||
| 598 | static struct of_platform_driver cg14_driver = { | 598 | static struct of_platform_driver cg14_driver = { |
| 599 | .name = "cg14", | 599 | .driver = { |
| 600 | .match_table = cg14_match, | 600 | .name = "cg14", |
| 601 | .owner = THIS_MODULE, | ||
| 602 | .of_match_table = cg14_match, | ||
| 603 | }, | ||
| 601 | .probe = cg14_probe, | 604 | .probe = cg14_probe, |
| 602 | .remove = __devexit_p(cg14_remove), | 605 | .remove = __devexit_p(cg14_remove), |
| 603 | }; | 606 | }; |
diff --git a/drivers/video/cg3.c b/drivers/video/cg3.c index 30eedf79322..b98f93f7f66 100644 --- a/drivers/video/cg3.c +++ b/drivers/video/cg3.c | |||
| @@ -463,8 +463,11 @@ static const struct of_device_id cg3_match[] = { | |||
| 463 | MODULE_DEVICE_TABLE(of, cg3_match); | 463 | MODULE_DEVICE_TABLE(of, cg3_match); |
| 464 | 464 | ||
| 465 | static struct of_platform_driver cg3_driver = { | 465 | static struct of_platform_driver cg3_driver = { |
| 466 | .name = "cg3", | 466 | .driver = { |
| 467 | .match_table = cg3_match, | 467 | .name = "cg3", |
| 468 | .owner = THIS_MODULE, | ||
| 469 | .of_match_table = cg3_match, | ||
| 470 | }, | ||
| 468 | .probe = cg3_probe, | 471 | .probe = cg3_probe, |
| 469 | .remove = __devexit_p(cg3_remove), | 472 | .remove = __devexit_p(cg3_remove), |
| 470 | }; | 473 | }; |
diff --git a/drivers/video/cg6.c b/drivers/video/cg6.c index 6d0fcb43696..480d761a27a 100644 --- a/drivers/video/cg6.c +++ b/drivers/video/cg6.c | |||
| @@ -740,7 +740,7 @@ static void cg6_unmap_regs(struct of_device *op, struct fb_info *info, | |||
| 740 | static int __devinit cg6_probe(struct of_device *op, | 740 | static int __devinit cg6_probe(struct of_device *op, |
| 741 | const struct of_device_id *match) | 741 | const struct of_device_id *match) |
| 742 | { | 742 | { |
| 743 | struct device_node *dp = op->node; | 743 | struct device_node *dp = op->dev.of_node; |
| 744 | struct fb_info *info; | 744 | struct fb_info *info; |
| 745 | struct cg6_par *par; | 745 | struct cg6_par *par; |
| 746 | int linebytes, err; | 746 | int linebytes, err; |
| @@ -856,8 +856,11 @@ static const struct of_device_id cg6_match[] = { | |||
| 856 | MODULE_DEVICE_TABLE(of, cg6_match); | 856 | MODULE_DEVICE_TABLE(of, cg6_match); |
| 857 | 857 | ||
| 858 | static struct of_platform_driver cg6_driver = { | 858 | static struct of_platform_driver cg6_driver = { |
| 859 | .name = "cg6", | 859 | .driver = { |
| 860 | .match_table = cg6_match, | 860 | .name = "cg6", |
| 861 | .owner = THIS_MODULE, | ||
| 862 | .of_match_table = cg6_match, | ||
| 863 | }, | ||
| 861 | .probe = cg6_probe, | 864 | .probe = cg6_probe, |
| 862 | .remove = __devexit_p(cg6_remove), | 865 | .remove = __devexit_p(cg6_remove), |
| 863 | }; | 866 | }; |
diff --git a/drivers/video/ffb.c b/drivers/video/ffb.c index a42fabab69d..95c0227f47f 100644 --- a/drivers/video/ffb.c +++ b/drivers/video/ffb.c | |||
| @@ -896,7 +896,7 @@ static void ffb_init_fix(struct fb_info *info) | |||
| 896 | static int __devinit ffb_probe(struct of_device *op, | 896 | static int __devinit ffb_probe(struct of_device *op, |
| 897 | const struct of_device_id *match) | 897 | const struct of_device_id *match) |
| 898 | { | 898 | { |
| 899 | struct device_node *dp = op->node; | 899 | struct device_node *dp = op->dev.of_node; |
| 900 | struct ffb_fbc __iomem *fbc; | 900 | struct ffb_fbc __iomem *fbc; |
| 901 | struct ffb_dac __iomem *dac; | 901 | struct ffb_dac __iomem *dac; |
| 902 | struct fb_info *info; | 902 | struct fb_info *info; |
| @@ -1053,8 +1053,11 @@ static const struct of_device_id ffb_match[] = { | |||
| 1053 | MODULE_DEVICE_TABLE(of, ffb_match); | 1053 | MODULE_DEVICE_TABLE(of, ffb_match); |
| 1054 | 1054 | ||
| 1055 | static struct of_platform_driver ffb_driver = { | 1055 | static struct of_platform_driver ffb_driver = { |
| 1056 | .name = "ffb", | 1056 | .driver = { |
| 1057 | .match_table = ffb_match, | 1057 | .name = "ffb", |
| 1058 | .owner = THIS_MODULE, | ||
| 1059 | .of_match_table = ffb_match, | ||
| 1060 | }, | ||
| 1058 | .probe = ffb_probe, | 1061 | .probe = ffb_probe, |
| 1059 | .remove = __devexit_p(ffb_remove), | 1062 | .remove = __devexit_p(ffb_remove), |
| 1060 | }; | 1063 | }; |
diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c index 994358a4f30..27455ce298b 100644 --- a/drivers/video/fsl-diu-fb.c +++ b/drivers/video/fsl-diu-fb.c | |||
| @@ -1421,7 +1421,7 @@ static ssize_t show_monitor(struct device *device, | |||
| 1421 | static int __devinit fsl_diu_probe(struct of_device *ofdev, | 1421 | static int __devinit fsl_diu_probe(struct of_device *ofdev, |
| 1422 | const struct of_device_id *match) | 1422 | const struct of_device_id *match) |
| 1423 | { | 1423 | { |
| 1424 | struct device_node *np = ofdev->node; | 1424 | struct device_node *np = ofdev->dev.of_node; |
| 1425 | struct mfb_info *mfbi; | 1425 | struct mfb_info *mfbi; |
| 1426 | phys_addr_t dummy_ad_addr; | 1426 | phys_addr_t dummy_ad_addr; |
| 1427 | int ret, i, error = 0; | 1427 | int ret, i, error = 0; |
| @@ -1647,9 +1647,11 @@ static struct of_device_id fsl_diu_match[] = { | |||
| 1647 | MODULE_DEVICE_TABLE(of, fsl_diu_match); | 1647 | MODULE_DEVICE_TABLE(of, fsl_diu_match); |
| 1648 | 1648 | ||
| 1649 | static struct of_platform_driver fsl_diu_driver = { | 1649 | static struct of_platform_driver fsl_diu_driver = { |
| 1650 | .owner = THIS_MODULE, | 1650 | .driver = { |
| 1651 | .name = "fsl_diu", | 1651 | .name = "fsl_diu", |
| 1652 | .match_table = fsl_diu_match, | 1652 | .owner = THIS_MODULE, |
| 1653 | .of_match_table = fsl_diu_match, | ||
| 1654 | }, | ||
| 1653 | .probe = fsl_diu_probe, | 1655 | .probe = fsl_diu_probe, |
| 1654 | .remove = fsl_diu_remove, | 1656 | .remove = fsl_diu_remove, |
| 1655 | .suspend = fsl_diu_suspend, | 1657 | .suspend = fsl_diu_suspend, |
diff --git a/drivers/video/leo.c b/drivers/video/leo.c index 1db55f12849..3d7895316ea 100644 --- a/drivers/video/leo.c +++ b/drivers/video/leo.c | |||
| @@ -663,8 +663,11 @@ static const struct of_device_id leo_match[] = { | |||
| 663 | MODULE_DEVICE_TABLE(of, leo_match); | 663 | MODULE_DEVICE_TABLE(of, leo_match); |
| 664 | 664 | ||
| 665 | static struct of_platform_driver leo_driver = { | 665 | static struct of_platform_driver leo_driver = { |
| 666 | .name = "leo", | 666 | .driver = { |
| 667 | .match_table = leo_match, | 667 | .name = "leo", |
| 668 | .owner = THIS_MODULE, | ||
| 669 | .of_match_table = leo_match, | ||
| 670 | }, | ||
| 668 | .probe = leo_probe, | 671 | .probe = leo_probe, |
| 669 | .remove = __devexit_p(leo_remove), | 672 | .remove = __devexit_p(leo_remove), |
| 670 | }; | 673 | }; |
diff --git a/drivers/video/mb862xx/mb862xxfb.c b/drivers/video/mb862xx/mb862xxfb.c index 8280a58a0e5..0540de4f5cb 100644 --- a/drivers/video/mb862xx/mb862xxfb.c +++ b/drivers/video/mb862xx/mb862xxfb.c | |||
| @@ -718,9 +718,11 @@ static struct of_device_id __devinitdata of_platform_mb862xx_tbl[] = { | |||
| 718 | }; | 718 | }; |
| 719 | 719 | ||
| 720 | static struct of_platform_driver of_platform_mb862xxfb_driver = { | 720 | static struct of_platform_driver of_platform_mb862xxfb_driver = { |
| 721 | .owner = THIS_MODULE, | 721 | .driver = { |
| 722 | .name = DRV_NAME, | 722 | .name = DRV_NAME, |
| 723 | .match_table = of_platform_mb862xx_tbl, | 723 | .owner = THIS_MODULE, |
| 724 | .of_match_table = of_platform_mb862xx_tbl, | ||
| 725 | }, | ||
| 724 | .probe = of_platform_mb862xx_probe, | 726 | .probe = of_platform_mb862xx_probe, |
| 725 | .remove = __devexit_p(of_platform_mb862xx_remove), | 727 | .remove = __devexit_p(of_platform_mb862xx_remove), |
| 726 | }; | 728 | }; |
diff --git a/drivers/video/p9100.c b/drivers/video/p9100.c index 81440f2b909..c85dd408a9b 100644 --- a/drivers/video/p9100.c +++ b/drivers/video/p9100.c | |||
| @@ -353,8 +353,11 @@ static const struct of_device_id p9100_match[] = { | |||
| 353 | MODULE_DEVICE_TABLE(of, p9100_match); | 353 | MODULE_DEVICE_TABLE(of, p9100_match); |
| 354 | 354 | ||
| 355 | static struct of_platform_driver p9100_driver = { | 355 | static struct of_platform_driver p9100_driver = { |
| 356 | .name = "p9100", | 356 | .driver = { |
| 357 | .match_table = p9100_match, | 357 | .name = "p9100", |
| 358 | .owner = THIS_MODULE, | ||
| 359 | .of_match_table = p9100_match, | ||
| 360 | }, | ||
| 358 | .probe = p9100_probe, | 361 | .probe = p9100_probe, |
| 359 | .remove = __devexit_p(p9100_remove), | 362 | .remove = __devexit_p(p9100_remove), |
| 360 | }; | 363 | }; |
diff --git a/drivers/video/platinumfb.c b/drivers/video/platinumfb.c index 8a204e7a5b5..72a1f4c0473 100644 --- a/drivers/video/platinumfb.c +++ b/drivers/video/platinumfb.c | |||
| @@ -536,7 +536,7 @@ static int __init platinumfb_setup(char *options) | |||
| 536 | static int __devinit platinumfb_probe(struct of_device* odev, | 536 | static int __devinit platinumfb_probe(struct of_device* odev, |
| 537 | const struct of_device_id *match) | 537 | const struct of_device_id *match) |
| 538 | { | 538 | { |
| 539 | struct device_node *dp = odev->node; | 539 | struct device_node *dp = odev->dev.of_node; |
| 540 | struct fb_info *info; | 540 | struct fb_info *info; |
| 541 | struct fb_info_platinum *pinfo; | 541 | struct fb_info_platinum *pinfo; |
| 542 | volatile __u8 *fbuffer; | 542 | volatile __u8 *fbuffer; |
| @@ -679,8 +679,11 @@ static struct of_device_id platinumfb_match[] = | |||
| 679 | 679 | ||
| 680 | static struct of_platform_driver platinum_driver = | 680 | static struct of_platform_driver platinum_driver = |
| 681 | { | 681 | { |
| 682 | .name = "platinumfb", | 682 | .driver = { |
| 683 | .match_table = platinumfb_match, | 683 | .name = "platinumfb", |
| 684 | .owner = THIS_MODULE, | ||
| 685 | .of_match_table = platinumfb_match, | ||
| 686 | }, | ||
| 684 | .probe = platinumfb_probe, | 687 | .probe = platinumfb_probe, |
| 685 | .remove = platinumfb_remove, | 688 | .remove = platinumfb_remove, |
| 686 | }; | 689 | }; |
diff --git a/drivers/video/sunxvr1000.c b/drivers/video/sunxvr1000.c index 23e69e834a1..489b44e8db8 100644 --- a/drivers/video/sunxvr1000.c +++ b/drivers/video/sunxvr1000.c | |||
| @@ -114,7 +114,7 @@ static int __devinit gfb_set_fbinfo(struct gfb_info *gp) | |||
| 114 | static int __devinit gfb_probe(struct of_device *op, | 114 | static int __devinit gfb_probe(struct of_device *op, |
| 115 | const struct of_device_id *match) | 115 | const struct of_device_id *match) |
| 116 | { | 116 | { |
| 117 | struct device_node *dp = op->node; | 117 | struct device_node *dp = op->dev.of_node; |
| 118 | struct fb_info *info; | 118 | struct fb_info *info; |
| 119 | struct gfb_info *gp; | 119 | struct gfb_info *gp; |
| 120 | int err; | 120 | int err; |
| @@ -199,10 +199,13 @@ static const struct of_device_id gfb_match[] = { | |||
| 199 | MODULE_DEVICE_TABLE(of, ffb_match); | 199 | MODULE_DEVICE_TABLE(of, ffb_match); |
| 200 | 200 | ||
| 201 | static struct of_platform_driver gfb_driver = { | 201 | static struct of_platform_driver gfb_driver = { |
| 202 | .name = "gfb", | ||
| 203 | .match_table = gfb_match, | ||
| 204 | .probe = gfb_probe, | 202 | .probe = gfb_probe, |
| 205 | .remove = __devexit_p(gfb_remove), | 203 | .remove = __devexit_p(gfb_remove), |
| 204 | .driver = { | ||
| 205 | .name = "gfb", | ||
| 206 | .owner = THIS_MODULE, | ||
| 207 | .of_match_table = gfb_match, | ||
| 208 | }, | ||
| 206 | }; | 209 | }; |
| 207 | 210 | ||
| 208 | static int __init gfb_init(void) | 211 | static int __init gfb_init(void) |
diff --git a/drivers/video/tcx.c b/drivers/video/tcx.c index c0c2b18fcdc..ef7a7bd8b50 100644 --- a/drivers/video/tcx.c +++ b/drivers/video/tcx.c | |||
| @@ -512,8 +512,11 @@ static const struct of_device_id tcx_match[] = { | |||
| 512 | MODULE_DEVICE_TABLE(of, tcx_match); | 512 | MODULE_DEVICE_TABLE(of, tcx_match); |
| 513 | 513 | ||
| 514 | static struct of_platform_driver tcx_driver = { | 514 | static struct of_platform_driver tcx_driver = { |
| 515 | .name = "tcx", | 515 | .driver = { |
| 516 | .match_table = tcx_match, | 516 | .name = "tcx", |
| 517 | .owner = THIS_MODULE, | ||
| 518 | .of_match_table = tcx_match, | ||
| 519 | }, | ||
| 517 | .probe = tcx_probe, | 520 | .probe = tcx_probe, |
| 518 | .remove = __devexit_p(tcx_remove), | 521 | .remove = __devexit_p(tcx_remove), |
| 519 | }; | 522 | }; |
diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c index 3fcb83f0388..574dc54e12d 100644 --- a/drivers/video/xilinxfb.c +++ b/drivers/video/xilinxfb.c | |||
| @@ -423,7 +423,7 @@ xilinxfb_of_probe(struct of_device *op, const struct of_device_id *match) | |||
| 423 | * To check whether the core is connected directly to DCR or PLB | 423 | * To check whether the core is connected directly to DCR or PLB |
| 424 | * interface and initialize the tft_access accordingly. | 424 | * interface and initialize the tft_access accordingly. |
| 425 | */ | 425 | */ |
| 426 | p = (u32 *)of_get_property(op->node, "xlnx,dcr-splb-slave-if", NULL); | 426 | p = (u32 *)of_get_property(op->dev.of_node, "xlnx,dcr-splb-slave-if", NULL); |
| 427 | tft_access = p ? *p : 0; | 427 | tft_access = p ? *p : 0; |
| 428 | 428 | ||
| 429 | /* | 429 | /* |
| @@ -432,41 +432,41 @@ xilinxfb_of_probe(struct of_device *op, const struct of_device_id *match) | |||
| 432 | */ | 432 | */ |
| 433 | if (tft_access) { | 433 | if (tft_access) { |
| 434 | drvdata->flags |= PLB_ACCESS_FLAG; | 434 | drvdata->flags |= PLB_ACCESS_FLAG; |
| 435 | rc = of_address_to_resource(op->node, 0, &res); | 435 | rc = of_address_to_resource(op->dev.of_node, 0, &res); |
| 436 | if (rc) { | 436 | if (rc) { |
| 437 | dev_err(&op->dev, "invalid address\n"); | 437 | dev_err(&op->dev, "invalid address\n"); |
| 438 | goto err; | 438 | goto err; |
| 439 | } | 439 | } |
| 440 | } else { | 440 | } else { |
| 441 | res.start = 0; | 441 | res.start = 0; |
| 442 | start = dcr_resource_start(op->node, 0); | 442 | start = dcr_resource_start(op->dev.of_node, 0); |
| 443 | drvdata->dcr_len = dcr_resource_len(op->node, 0); | 443 | drvdata->dcr_len = dcr_resource_len(op->dev.of_node, 0); |
| 444 | drvdata->dcr_host = dcr_map(op->node, start, drvdata->dcr_len); | 444 | drvdata->dcr_host = dcr_map(op->dev.of_node, start, drvdata->dcr_len); |
| 445 | if (!DCR_MAP_OK(drvdata->dcr_host)) { | 445 | if (!DCR_MAP_OK(drvdata->dcr_host)) { |
| 446 | dev_err(&op->dev, "invalid DCR address\n"); | 446 | dev_err(&op->dev, "invalid DCR address\n"); |
| 447 | goto err; | 447 | goto err; |
| 448 | } | 448 | } |
| 449 | } | 449 | } |
| 450 | 450 | ||
| 451 | prop = of_get_property(op->node, "phys-size", &size); | 451 | prop = of_get_property(op->dev.of_node, "phys-size", &size); |
| 452 | if ((prop) && (size >= sizeof(u32)*2)) { | 452 | if ((prop) && (size >= sizeof(u32)*2)) { |
| 453 | pdata.screen_width_mm = prop[0]; | 453 | pdata.screen_width_mm = prop[0]; |
| 454 | pdata.screen_height_mm = prop[1]; | 454 | pdata.screen_height_mm = prop[1]; |
| 455 | } | 455 | } |
| 456 | 456 | ||
| 457 | prop = of_get_property(op->node, "resolution", &size); | 457 | prop = of_get_property(op->dev.of_node, "resolution", &size); |
| 458 | if ((prop) && (size >= sizeof(u32)*2)) { | 458 | if ((prop) && (size >= sizeof(u32)*2)) { |
| 459 | pdata.xres = prop[0]; | 459 | pdata.xres = prop[0]; |
| 460 | pdata.yres = prop[1]; | 460 | pdata.yres = prop[1]; |
| 461 | } | 461 | } |
| 462 | 462 | ||
| 463 | prop = of_get_property(op->node, "virtual-resolution", &size); | 463 | prop = of_get_property(op->dev.of_node, "virtual-resolution", &size); |
| 464 | if ((prop) && (size >= sizeof(u32)*2)) { | 464 | if ((prop) && (size >= sizeof(u32)*2)) { |
| 465 | pdata.xvirt = prop[0]; | 465 | pdata.xvirt = prop[0]; |
| 466 | pdata.yvirt = prop[1]; | 466 | pdata.yvirt = prop[1]; |
| 467 | } | 467 | } |
| 468 | 468 | ||
| 469 | if (of_find_property(op->node, "rotate-display", NULL)) | 469 | if (of_find_property(op->dev.of_node, "rotate-display", NULL)) |
| 470 | pdata.rotate_screen = 1; | 470 | pdata.rotate_screen = 1; |
| 471 | 471 | ||
| 472 | dev_set_drvdata(&op->dev, drvdata); | 472 | dev_set_drvdata(&op->dev, drvdata); |
| @@ -492,13 +492,12 @@ static struct of_device_id xilinxfb_of_match[] __devinitdata = { | |||
| 492 | MODULE_DEVICE_TABLE(of, xilinxfb_of_match); | 492 | MODULE_DEVICE_TABLE(of, xilinxfb_of_match); |
| 493 | 493 | ||
| 494 | static struct of_platform_driver xilinxfb_of_driver = { | 494 | static struct of_platform_driver xilinxfb_of_driver = { |
| 495 | .owner = THIS_MODULE, | ||
| 496 | .name = DRIVER_NAME, | ||
| 497 | .match_table = xilinxfb_of_match, | ||
| 498 | .probe = xilinxfb_of_probe, | 495 | .probe = xilinxfb_of_probe, |
| 499 | .remove = __devexit_p(xilinxfb_of_remove), | 496 | .remove = __devexit_p(xilinxfb_of_remove), |
| 500 | .driver = { | 497 | .driver = { |
| 501 | .name = DRIVER_NAME, | 498 | .name = DRIVER_NAME, |
| 499 | .owner = THIS_MODULE, | ||
| 500 | .of_match_table = xilinxfb_of_match, | ||
| 502 | }, | 501 | }, |
| 503 | }; | 502 | }; |
| 504 | 503 | ||
diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c index ba2efce4b40..d62b9ce8f77 100644 --- a/drivers/watchdog/cpwd.c +++ b/drivers/watchdog/cpwd.c | |||
| @@ -577,7 +577,7 @@ static int __devinit cpwd_probe(struct of_device *op, | |||
| 577 | * interrupt_mask register cannot be written, so no timer | 577 | * interrupt_mask register cannot be written, so no timer |
| 578 | * interrupts can be masked within the PLD. | 578 | * interrupts can be masked within the PLD. |
| 579 | */ | 579 | */ |
| 580 | str_prop = of_get_property(op->node, "model", NULL); | 580 | str_prop = of_get_property(op->dev.of_node, "model", NULL); |
| 581 | p->broken = (str_prop && !strcmp(str_prop, WD_BADMODEL)); | 581 | p->broken = (str_prop && !strcmp(str_prop, WD_BADMODEL)); |
| 582 | 582 | ||
| 583 | if (!p->enabled) | 583 | if (!p->enabled) |
| @@ -677,8 +677,11 @@ static const struct of_device_id cpwd_match[] = { | |||
| 677 | MODULE_DEVICE_TABLE(of, cpwd_match); | 677 | MODULE_DEVICE_TABLE(of, cpwd_match); |
| 678 | 678 | ||
| 679 | static struct of_platform_driver cpwd_driver = { | 679 | static struct of_platform_driver cpwd_driver = { |
| 680 | .name = DRIVER_NAME, | 680 | .driver = { |
| 681 | .match_table = cpwd_match, | 681 | .name = DRIVER_NAME, |
| 682 | .owner = THIS_MODULE, | ||
| 683 | .of_match_table = cpwd_match, | ||
| 684 | }, | ||
| 682 | .probe = cpwd_probe, | 685 | .probe = cpwd_probe, |
| 683 | .remove = __devexit_p(cpwd_remove), | 686 | .remove = __devexit_p(cpwd_remove), |
| 684 | }; | 687 | }; |
diff --git a/drivers/watchdog/gef_wdt.c b/drivers/watchdog/gef_wdt.c index abdbad034a6..ca0f4c6cf5a 100644 --- a/drivers/watchdog/gef_wdt.c +++ b/drivers/watchdog/gef_wdt.c | |||
| @@ -303,9 +303,11 @@ static const struct of_device_id gef_wdt_ids[] = { | |||
| 303 | }; | 303 | }; |
| 304 | 304 | ||
| 305 | static struct of_platform_driver gef_wdt_driver = { | 305 | static struct of_platform_driver gef_wdt_driver = { |
| 306 | .owner = THIS_MODULE, | 306 | .driver = { |
| 307 | .name = "gef_wdt", | 307 | .name = "gef_wdt", |
| 308 | .match_table = gef_wdt_ids, | 308 | .owner = THIS_MODULE, |
| 309 | .of_match_table = gef_wdt_ids, | ||
| 310 | }, | ||
| 309 | .probe = gef_wdt_probe, | 311 | .probe = gef_wdt_probe, |
| 310 | }; | 312 | }; |
| 311 | 313 | ||
diff --git a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c index 4e3941c5e29..7b55974191d 100644 --- a/drivers/watchdog/mpc8xxx_wdt.c +++ b/drivers/watchdog/mpc8xxx_wdt.c | |||
| @@ -273,12 +273,12 @@ static const struct of_device_id mpc8xxx_wdt_match[] = { | |||
| 273 | MODULE_DEVICE_TABLE(of, mpc8xxx_wdt_match); | 273 | MODULE_DEVICE_TABLE(of, mpc8xxx_wdt_match); |
| 274 | 274 | ||
| 275 | static struct of_platform_driver mpc8xxx_wdt_driver = { | 275 | static struct of_platform_driver mpc8xxx_wdt_driver = { |
| 276 | .match_table = mpc8xxx_wdt_match, | ||
| 277 | .probe = mpc8xxx_wdt_probe, | 276 | .probe = mpc8xxx_wdt_probe, |
| 278 | .remove = __devexit_p(mpc8xxx_wdt_remove), | 277 | .remove = __devexit_p(mpc8xxx_wdt_remove), |
| 279 | .driver = { | 278 | .driver = { |
| 280 | .name = "mpc8xxx_wdt", | 279 | .name = "mpc8xxx_wdt", |
| 281 | .owner = THIS_MODULE, | 280 | .owner = THIS_MODULE, |
| 281 | .of_match_table = mpc8xxx_wdt_match, | ||
| 282 | }, | 282 | }, |
| 283 | }; | 283 | }; |
| 284 | 284 | ||
diff --git a/drivers/watchdog/riowd.c b/drivers/watchdog/riowd.c index ea7f803f624..5dceeddc885 100644 --- a/drivers/watchdog/riowd.c +++ b/drivers/watchdog/riowd.c | |||
| @@ -239,8 +239,11 @@ static const struct of_device_id riowd_match[] = { | |||
| 239 | MODULE_DEVICE_TABLE(of, riowd_match); | 239 | MODULE_DEVICE_TABLE(of, riowd_match); |
| 240 | 240 | ||
| 241 | static struct of_platform_driver riowd_driver = { | 241 | static struct of_platform_driver riowd_driver = { |
| 242 | .name = DRIVER_NAME, | 242 | .driver = { |
| 243 | .match_table = riowd_match, | 243 | .name = DRIVER_NAME, |
| 244 | .owner = THIS_MODULE, | ||
| 245 | .of_match_table = riowd_match, | ||
| 246 | }, | ||
| 244 | .probe = riowd_probe, | 247 | .probe = riowd_probe, |
| 245 | .remove = __devexit_p(riowd_remove), | 248 | .remove = __devexit_p(riowd_remove), |
| 246 | }; | 249 | }; |
