Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6

* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6:
mmc_spi: Fix unterminated of_match_table
of/sparc: fix build regression from of_device changes
of/device: Replace struct of_device with struct platform_device

+523 -530
+1 -1
arch/powerpc/platforms/83xx/mpc837x_mds.c
··· 102 102 103 103 static int __init mpc837x_declare_of_platform_devices(void) 104 104 { 105 - /* Publish of_device */ 105 + /* Publish platform_device */ 106 106 of_platform_bus_probe(NULL, mpc837x_ids, NULL); 107 107 108 108 return 0;
+1 -1
arch/powerpc/platforms/83xx/mpc837x_rdb.c
··· 78 78 79 79 static int __init mpc837x_declare_of_platform_devices(void) 80 80 { 81 - /* Publish of_device */ 81 + /* Publish platform_device */ 82 82 of_platform_bus_probe(NULL, mpc837x_ids, NULL); 83 83 84 84 return 0;
+1 -1
arch/powerpc/sysdev/fsl_rio.c
··· 1332 1332 1333 1333 /** 1334 1334 * fsl_rio_setup - Setup Freescale PowerPC RapidIO interface 1335 - * @dev: of_device pointer 1335 + * @dev: platform_device pointer 1336 1336 * 1337 1337 * Initializes MPC85xx RapidIO hardware interface, configures 1338 1338 * master port with system-specific info, and registers the
+4 -4
drivers/ata/pata_mpc52xx.c
··· 680 680 /* ======================================================================== */ 681 681 682 682 static int __devinit 683 - mpc52xx_ata_probe(struct of_device *op, const struct of_device_id *match) 683 + mpc52xx_ata_probe(struct platform_device *op, const struct of_device_id *match) 684 684 { 685 685 unsigned int ipb_freq; 686 686 struct resource res_mem; ··· 821 821 } 822 822 823 823 static int 824 - mpc52xx_ata_remove(struct of_device *op) 824 + mpc52xx_ata_remove(struct platform_device *op) 825 825 { 826 826 struct mpc52xx_ata_priv *priv; 827 827 int task_irq; ··· 848 848 #ifdef CONFIG_PM 849 849 850 850 static int 851 - mpc52xx_ata_suspend(struct of_device *op, pm_message_t state) 851 + mpc52xx_ata_suspend(struct platform_device *op, pm_message_t state) 852 852 { 853 853 struct ata_host *host = dev_get_drvdata(&op->dev); 854 854 ··· 856 856 } 857 857 858 858 static int 859 - mpc52xx_ata_resume(struct of_device *op) 859 + mpc52xx_ata_resume(struct platform_device *op) 860 860 { 861 861 struct ata_host *host = dev_get_drvdata(&op->dev); 862 862 struct mpc52xx_ata_priv *priv = host->private_data;
+2 -2
drivers/ata/pata_of_platform.c
··· 14 14 #include <linux/of_platform.h> 15 15 #include <linux/ata_platform.h> 16 16 17 - static int __devinit pata_of_platform_probe(struct of_device *ofdev, 17 + static int __devinit pata_of_platform_probe(struct platform_device *ofdev, 18 18 const struct of_device_id *match) 19 19 { 20 20 int ret; ··· 78 78 reg_shift, pio_mask); 79 79 } 80 80 81 - static int __devexit pata_of_platform_remove(struct of_device *ofdev) 81 + static int __devexit pata_of_platform_remove(struct platform_device *ofdev) 82 82 { 83 83 return __pata_platform_remove(&ofdev->dev); 84 84 }
+4 -4
drivers/ata/sata_fsl.c
··· 1296 1296 }, 1297 1297 }; 1298 1298 1299 - static int sata_fsl_probe(struct of_device *ofdev, 1299 + static int sata_fsl_probe(struct platform_device *ofdev, 1300 1300 const struct of_device_id *match) 1301 1301 { 1302 1302 int retval = -ENXIO; ··· 1370 1370 return retval; 1371 1371 } 1372 1372 1373 - static int sata_fsl_remove(struct of_device *ofdev) 1373 + static int sata_fsl_remove(struct platform_device *ofdev) 1374 1374 { 1375 1375 struct ata_host *host = dev_get_drvdata(&ofdev->dev); 1376 1376 struct sata_fsl_host_priv *host_priv = host->private_data; ··· 1387 1387 } 1388 1388 1389 1389 #ifdef CONFIG_PM 1390 - static int sata_fsl_suspend(struct of_device *op, pm_message_t state) 1390 + static int sata_fsl_suspend(struct platform_device *op, pm_message_t state) 1391 1391 { 1392 1392 struct ata_host *host = dev_get_drvdata(&op->dev); 1393 1393 return ata_host_suspend(host, state); 1394 1394 } 1395 1395 1396 - static int sata_fsl_resume(struct of_device *op) 1396 + static int sata_fsl_resume(struct platform_device *op) 1397 1397 { 1398 1398 struct ata_host *host = dev_get_drvdata(&op->dev); 1399 1399 struct sata_fsl_host_priv *host_priv = host->private_data;
+13 -13
drivers/atm/fore200e.c
··· 674 674 675 675 static u32 fore200e_sba_dma_map(struct fore200e *fore200e, void* virt_addr, int size, int direction) 676 676 { 677 - struct of_device *op = fore200e->bus_dev; 677 + struct platform_device *op = fore200e->bus_dev; 678 678 u32 dma_addr; 679 679 680 680 dma_addr = dma_map_single(&op->dev, virt_addr, size, direction); ··· 687 687 688 688 static void fore200e_sba_dma_unmap(struct fore200e *fore200e, u32 dma_addr, int size, int direction) 689 689 { 690 - struct of_device *op = fore200e->bus_dev; 690 + struct platform_device *op = fore200e->bus_dev; 691 691 692 692 DPRINTK(3, "SBUS DVMA unmapping: dma_addr = 0x%08x, size = %d, direction = %d,\n", 693 693 dma_addr, size, direction); ··· 697 697 698 698 static void fore200e_sba_dma_sync_for_cpu(struct fore200e *fore200e, u32 dma_addr, int size, int direction) 699 699 { 700 - struct of_device *op = fore200e->bus_dev; 700 + struct platform_device *op = fore200e->bus_dev; 701 701 702 702 DPRINTK(3, "SBUS DVMA sync: dma_addr = 0x%08x, size = %d, direction = %d\n", dma_addr, size, direction); 703 703 ··· 706 706 707 707 static void fore200e_sba_dma_sync_for_device(struct fore200e *fore200e, u32 dma_addr, int size, int direction) 708 708 { 709 - struct of_device *op = fore200e->bus_dev; 709 + struct platform_device *op = fore200e->bus_dev; 710 710 711 711 DPRINTK(3, "SBUS DVMA sync: dma_addr = 0x%08x, size = %d, direction = %d\n", dma_addr, size, direction); 712 712 ··· 719 719 static int fore200e_sba_dma_chunk_alloc(struct fore200e *fore200e, struct chunk *chunk, 720 720 int size, int nbr, int alignment) 721 721 { 722 - struct of_device *op = fore200e->bus_dev; 722 + struct platform_device *op = fore200e->bus_dev; 723 723 724 724 chunk->alloc_size = chunk->align_size = size * nbr; 725 725 ··· 738 738 /* free a DVMA consistent chunk of memory */ 739 739 static void fore200e_sba_dma_chunk_free(struct fore200e *fore200e, struct chunk *chunk) 740 740 { 741 - struct of_device *op = fore200e->bus_dev; 741 + struct platform_device *op = fore200e->bus_dev; 742 742 743 743 dma_free_coherent(&op->dev, chunk->alloc_size, 744 744 chunk->alloc_addr, chunk->dma_addr); ··· 770 770 771 771 static int __init fore200e_sba_map(struct fore200e *fore200e) 772 772 { 773 - struct of_device *op = fore200e->bus_dev; 773 + struct platform_device *op = fore200e->bus_dev; 774 774 unsigned int bursts; 775 775 776 776 /* gain access to the SBA specific registers */ ··· 800 800 801 801 static void fore200e_sba_unmap(struct fore200e *fore200e) 802 802 { 803 - struct of_device *op = fore200e->bus_dev; 803 + struct platform_device *op = fore200e->bus_dev; 804 804 805 805 of_iounmap(&op->resource[0], fore200e->regs.sba.hcr, SBA200E_HCR_LENGTH); 806 806 of_iounmap(&op->resource[1], fore200e->regs.sba.bsr, SBA200E_BSR_LENGTH); ··· 816 816 817 817 static int __init fore200e_sba_prom_read(struct fore200e *fore200e, struct prom_data *prom) 818 818 { 819 - struct of_device *op = fore200e->bus_dev; 819 + struct platform_device *op = fore200e->bus_dev; 820 820 const u8 *prop; 821 821 int len; 822 822 ··· 840 840 841 841 static int fore200e_sba_proc_read(struct fore200e *fore200e, char *page) 842 842 { 843 - struct of_device *op = fore200e->bus_dev; 843 + struct platform_device *op = fore200e->bus_dev; 844 844 const struct linux_prom_registers *regs; 845 845 846 846 regs = of_get_property(op->dev.of_node, "reg", NULL); ··· 2513 2513 device = &((struct pci_dev *) fore200e->bus_dev)->dev; 2514 2514 #ifdef CONFIG_SBUS 2515 2515 else if (strcmp(fore200e->bus->model_name, "SBA-200E") == 0) 2516 - device = &((struct of_device *) fore200e->bus_dev)->dev; 2516 + device = &((struct platform_device *) fore200e->bus_dev)->dev; 2517 2517 #endif 2518 2518 else 2519 2519 return err; ··· 2643 2643 } 2644 2644 2645 2645 #ifdef CONFIG_SBUS 2646 - static int __devinit fore200e_sba_probe(struct of_device *op, 2646 + static int __devinit fore200e_sba_probe(struct platform_device *op, 2647 2647 const struct of_device_id *match) 2648 2648 { 2649 2649 const struct fore200e_bus *bus = match->data; ··· 2675 2675 return 0; 2676 2676 } 2677 2677 2678 - static int __devexit fore200e_sba_remove(struct of_device *op) 2678 + static int __devexit fore200e_sba_remove(struct platform_device *op) 2679 2679 { 2680 2680 struct fore200e *fore200e = dev_get_drvdata(&op->dev); 2681 2681
+2 -2
drivers/block/xsysace.c
··· 1194 1194 1195 1195 #if defined(CONFIG_OF) 1196 1196 static int __devinit 1197 - ace_of_probe(struct of_device *op, const struct of_device_id *match) 1197 + ace_of_probe(struct platform_device *op, const struct of_device_id *match) 1198 1198 { 1199 1199 struct resource res; 1200 1200 resource_size_t physaddr; ··· 1226 1226 return ace_alloc(&op->dev, id ? *id : 0, physaddr, irq, bus_width); 1227 1227 } 1228 1228 1229 - static int __devexit ace_of_remove(struct of_device *op) 1229 + static int __devexit ace_of_remove(struct platform_device *op) 1230 1230 { 1231 1231 ace_free(&op->dev); 1232 1232 return 0;
+2 -2
drivers/char/hw_random/n2-drv.c
··· 619 619 pr_info("%s", version); 620 620 } 621 621 622 - static int __devinit n2rng_probe(struct of_device *op, 622 + static int __devinit n2rng_probe(struct platform_device *op, 623 623 const struct of_device_id *match) 624 624 { 625 625 int victoria_falls = (match->data != NULL); ··· 714 714 return err; 715 715 } 716 716 717 - static int __devexit n2rng_remove(struct of_device *op) 717 + static int __devexit n2rng_remove(struct platform_device *op) 718 718 { 719 719 struct n2rng *np = dev_get_drvdata(&op->dev); 720 720
+1 -1
drivers/char/hw_random/n2rng.h
··· 65 65 }; 66 66 67 67 struct n2rng { 68 - struct of_device *op; 68 + struct platform_device *op; 69 69 70 70 unsigned long flags; 71 71 #define N2RNG_FLAG_VF 0x00000001 /* Victoria Falls RNG, else N2 */
+2 -2
drivers/char/hw_random/pasemi-rng.c
··· 94 94 .data_read = pasemi_rng_data_read, 95 95 }; 96 96 97 - static int __devinit rng_probe(struct of_device *ofdev, 97 + static int __devinit rng_probe(struct platform_device *ofdev, 98 98 const struct of_device_id *match) 99 99 { 100 100 void __iomem *rng_regs; ··· 123 123 return err; 124 124 } 125 125 126 - static int __devexit rng_remove(struct of_device *dev) 126 + static int __devexit rng_remove(struct platform_device *dev) 127 127 { 128 128 void __iomem *rng_regs = (void __iomem *)pasemi_rng.priv; 129 129
+2 -2
drivers/char/ipmi/ipmi_si_intf.c
··· 2528 2528 2529 2529 2530 2530 #ifdef CONFIG_PPC_OF 2531 - static int __devinit ipmi_of_probe(struct of_device *dev, 2531 + static int __devinit ipmi_of_probe(struct platform_device *dev, 2532 2532 const struct of_device_id *match) 2533 2533 { 2534 2534 struct smi_info *info; ··· 2607 2607 return 0; 2608 2608 } 2609 2609 2610 - static int __devexit ipmi_of_remove(struct of_device *dev) 2610 + static int __devexit ipmi_of_remove(struct platform_device *dev) 2611 2611 { 2612 2612 cleanup_one_si(dev_get_drvdata(&dev->dev)); 2613 2613 return 0;
+1 -1
drivers/char/rtc.c
··· 961 961 #endif 962 962 #ifdef CONFIG_SPARC32 963 963 struct device_node *ebus_dp; 964 - struct of_device *op; 964 + struct platform_device *op; 965 965 #else 966 966 void *r; 967 967 #ifdef RTC_IRQ
+2 -2
drivers/char/xilinx_hwicap/xilinx_hwicap.c
··· 761 761 762 762 #if defined(CONFIG_OF) 763 763 static int __devinit 764 - hwicap_of_probe(struct of_device *op, const struct of_device_id *match) 764 + hwicap_of_probe(struct platform_device *op, const struct of_device_id *match) 765 765 { 766 766 struct resource res; 767 767 const unsigned int *id; ··· 798 798 regs); 799 799 } 800 800 801 - static int __devexit hwicap_of_remove(struct of_device *op) 801 + static int __devexit hwicap_of_remove(struct platform_device *op) 802 802 { 803 803 return hwicap_remove(&op->dev); 804 804 }
+2 -2
drivers/crypto/amcc/crypto4xx_core.c
··· 1150 1150 /** 1151 1151 * Module Initialization Routine 1152 1152 */ 1153 - static int __init crypto4xx_probe(struct of_device *ofdev, 1153 + static int __init crypto4xx_probe(struct platform_device *ofdev, 1154 1154 const struct of_device_id *match) 1155 1155 { 1156 1156 int rc; ··· 1258 1258 return rc; 1259 1259 } 1260 1260 1261 - static int __exit crypto4xx_remove(struct of_device *ofdev) 1261 + static int __exit crypto4xx_remove(struct platform_device *ofdev) 1262 1262 { 1263 1263 struct device *dev = &ofdev->dev; 1264 1264 struct crypto4xx_core_device *core_dev = dev_get_drvdata(dev);
+1 -1
drivers/crypto/amcc/crypto4xx_core.h
··· 104 104 105 105 struct crypto4xx_core_device { 106 106 struct device *device; 107 - struct of_device *ofdev; 107 + struct platform_device *ofdev; 108 108 struct crypto4xx_device *dev; 109 109 u32 int_status; 110 110 u32 irq;
+13 -13
drivers/crypto/n2_core.c
··· 1552 1552 1553 1553 /* To map CWQ queues to interrupt sources, the hypervisor API provides 1554 1554 * a devino. This isn't very useful to us because all of the 1555 - * interrupts listed in the of_device node have been translated to 1555 + * interrupts listed in the device_node have been translated to 1556 1556 * Linux virtual IRQ cookie numbers. 1557 1557 * 1558 1558 * So we have to back-translate, going through the 'intr' and 'ino' ··· 1560 1560 * 'interrupts' property entries, in order to to figure out which 1561 1561 * devino goes to which already-translated IRQ. 1562 1562 */ 1563 - static int find_devino_index(struct of_device *dev, struct spu_mdesc_info *ip, 1563 + static int find_devino_index(struct platform_device *dev, struct spu_mdesc_info *ip, 1564 1564 unsigned long dev_ino) 1565 1565 { 1566 1566 const unsigned int *dev_intrs; ··· 1580 1580 if (!dev_intrs) 1581 1581 return -ENODEV; 1582 1582 1583 - for (i = 0; i < dev->num_irqs; i++) { 1583 + for (i = 0; i < dev->archdata.num_irqs; i++) { 1584 1584 if (dev_intrs[i] == intr) 1585 1585 return i; 1586 1586 } ··· 1588 1588 return -ENODEV; 1589 1589 } 1590 1590 1591 - static int spu_map_ino(struct of_device *dev, struct spu_mdesc_info *ip, 1591 + static int spu_map_ino(struct platform_device *dev, struct spu_mdesc_info *ip, 1592 1592 const char *irq_name, struct spu_queue *p, 1593 1593 irq_handler_t handler) 1594 1594 { ··· 1603 1603 if (index < 0) 1604 1604 return index; 1605 1605 1606 - p->irq = dev->irqs[index]; 1606 + p->irq = dev->archdata.irqs[index]; 1607 1607 1608 1608 sprintf(p->irq_name, "%s-%d", irq_name, index); 1609 1609 ··· 1736 1736 * gathering cpu membership information. 1737 1737 */ 1738 1738 static int spu_mdesc_walk_arcs(struct mdesc_handle *mdesc, 1739 - struct of_device *dev, 1739 + struct platform_device *dev, 1740 1740 u64 node, struct spu_queue *p, 1741 1741 struct spu_queue **table) 1742 1742 { ··· 1763 1763 1764 1764 /* Process an 'exec-unit' MDESC node of type 'cwq'. */ 1765 1765 static int handle_exec_unit(struct spu_mdesc_info *ip, struct list_head *list, 1766 - struct of_device *dev, struct mdesc_handle *mdesc, 1766 + struct platform_device *dev, struct mdesc_handle *mdesc, 1767 1767 u64 node, const char *iname, unsigned long q_type, 1768 1768 irq_handler_t handler, struct spu_queue **table) 1769 1769 { ··· 1794 1794 return spu_map_ino(dev, ip, iname, p, handler); 1795 1795 } 1796 1796 1797 - static int spu_mdesc_scan(struct mdesc_handle *mdesc, struct of_device *dev, 1797 + static int spu_mdesc_scan(struct mdesc_handle *mdesc, struct platform_device *dev, 1798 1798 struct spu_mdesc_info *ip, struct list_head *list, 1799 1799 const char *exec_name, unsigned long q_type, 1800 1800 irq_handler_t handler, struct spu_queue **table) ··· 1855 1855 } 1856 1856 1857 1857 static int __devinit grab_mdesc_irq_props(struct mdesc_handle *mdesc, 1858 - struct of_device *dev, 1858 + struct platform_device *dev, 1859 1859 struct spu_mdesc_info *ip, 1860 1860 const char *node_name) 1861 1861 { ··· 2004 2004 pr_info("%s", version); 2005 2005 } 2006 2006 2007 - static int __devinit n2_crypto_probe(struct of_device *dev, 2007 + static int __devinit n2_crypto_probe(struct platform_device *dev, 2008 2008 const struct of_device_id *match) 2009 2009 { 2010 2010 struct mdesc_handle *mdesc; ··· 2081 2081 return err; 2082 2082 } 2083 2083 2084 - static int __devexit n2_crypto_remove(struct of_device *dev) 2084 + static int __devexit n2_crypto_remove(struct platform_device *dev) 2085 2085 { 2086 2086 struct n2_crypto *np = dev_get_drvdata(&dev->dev); 2087 2087 ··· 2116 2116 kfree(mp); 2117 2117 } 2118 2118 2119 - static int __devinit n2_mau_probe(struct of_device *dev, 2119 + static int __devinit n2_mau_probe(struct platform_device *dev, 2120 2120 const struct of_device_id *match) 2121 2121 { 2122 2122 struct mdesc_handle *mdesc; ··· 2184 2184 return err; 2185 2185 } 2186 2186 2187 - static int __devexit n2_mau_remove(struct of_device *dev) 2187 + static int __devexit n2_mau_remove(struct platform_device *dev) 2188 2188 { 2189 2189 struct n2_mau *mp = dev_get_drvdata(&dev->dev); 2190 2190
+3 -3
drivers/crypto/talitos.c
··· 118 118 119 119 struct talitos_private { 120 120 struct device *dev; 121 - struct of_device *ofdev; 121 + struct platform_device *ofdev; 122 122 void __iomem *reg; 123 123 int irq; 124 124 ··· 2308 2308 return ret; 2309 2309 } 2310 2310 2311 - static int talitos_remove(struct of_device *ofdev) 2311 + static int talitos_remove(struct platform_device *ofdev) 2312 2312 { 2313 2313 struct device *dev = &ofdev->dev; 2314 2314 struct talitos_private *priv = dev_get_drvdata(dev); ··· 2401 2401 return t_alg; 2402 2402 } 2403 2403 2404 - static int talitos_probe(struct of_device *ofdev, 2404 + static int talitos_probe(struct platform_device *ofdev, 2405 2405 const struct of_device_id *match) 2406 2406 { 2407 2407 struct device *dev = &ofdev->dev;
+2 -2
drivers/dma/fsldma.c
··· 1297 1297 kfree(chan); 1298 1298 } 1299 1299 1300 - static int __devinit fsldma_of_probe(struct of_device *op, 1300 + static int __devinit fsldma_of_probe(struct platform_device *op, 1301 1301 const struct of_device_id *match) 1302 1302 { 1303 1303 struct fsldma_device *fdev; ··· 1382 1382 return err; 1383 1383 } 1384 1384 1385 - static int fsldma_of_remove(struct of_device *op) 1385 + static int fsldma_of_remove(struct platform_device *op) 1386 1386 { 1387 1387 struct fsldma_device *fdev; 1388 1388 unsigned int i;
+2 -2
drivers/dma/mpc512x_dma.c
··· 627 627 return &mdesc->desc; 628 628 } 629 629 630 - static int __devinit mpc_dma_probe(struct of_device *op, 630 + static int __devinit mpc_dma_probe(struct platform_device *op, 631 631 const struct of_device_id *match) 632 632 { 633 633 struct device_node *dn = op->dev.of_node; ··· 753 753 return retval; 754 754 } 755 755 756 - static int __devexit mpc_dma_remove(struct of_device *op) 756 + static int __devexit mpc_dma_remove(struct platform_device *op) 757 757 { 758 758 struct device *dev = &op->dev; 759 759 struct mpc_dma *mdma = dev_get_drvdata(dev);
+4 -4
drivers/dma/ppc4xx/adma.c
··· 4257 4257 struct ppc440spe_adma_chan *chan, 4258 4258 int *initcode) 4259 4259 { 4260 - struct of_device *ofdev; 4260 + struct platform_device *ofdev; 4261 4261 struct device_node *np; 4262 4262 int ret; 4263 4263 4264 - ofdev = container_of(adev->dev, struct of_device, dev); 4264 + ofdev = container_of(adev->dev, struct platform_device, dev); 4265 4265 np = ofdev->dev.of_node; 4266 4266 if (adev->id != PPC440SPE_XOR_ID) { 4267 4267 adev->err_irq = irq_of_parse_and_map(np, 1); ··· 4393 4393 /** 4394 4394 * ppc440spe_adma_probe - probe the asynch device 4395 4395 */ 4396 - static int __devinit ppc440spe_adma_probe(struct of_device *ofdev, 4396 + static int __devinit ppc440spe_adma_probe(struct platform_device *ofdev, 4397 4397 const struct of_device_id *match) 4398 4398 { 4399 4399 struct device_node *np = ofdev->dev.of_node; ··· 4625 4625 /** 4626 4626 * ppc440spe_adma_remove - remove the asynch device 4627 4627 */ 4628 - static int __devexit ppc440spe_adma_remove(struct of_device *ofdev) 4628 + static int __devexit ppc440spe_adma_remove(struct platform_device *ofdev) 4629 4629 { 4630 4630 struct ppc440spe_adma_device *adev = dev_get_drvdata(&ofdev->dev); 4631 4631 struct device_node *np = ofdev->dev.of_node;
+6 -6
drivers/edac/mpc85xx_edac.c
··· 200 200 return IRQ_HANDLED; 201 201 } 202 202 203 - static int __devinit mpc85xx_pci_err_probe(struct of_device *op, 203 + static int __devinit mpc85xx_pci_err_probe(struct platform_device *op, 204 204 const struct of_device_id *match) 205 205 { 206 206 struct edac_pci_ctl_info *pci; ··· 305 305 return res; 306 306 } 307 307 308 - static int mpc85xx_pci_err_remove(struct of_device *op) 308 + static int mpc85xx_pci_err_remove(struct platform_device *op) 309 309 { 310 310 struct edac_pci_ctl_info *pci = dev_get_drvdata(&op->dev); 311 311 struct mpc85xx_pci_pdata *pdata = pci->pvt_info; ··· 503 503 return IRQ_HANDLED; 504 504 } 505 505 506 - static int __devinit mpc85xx_l2_err_probe(struct of_device *op, 506 + static int __devinit mpc85xx_l2_err_probe(struct platform_device *op, 507 507 const struct of_device_id *match) 508 508 { 509 509 struct edac_device_ctl_info *edac_dev; ··· 613 613 return res; 614 614 } 615 615 616 - static int mpc85xx_l2_err_remove(struct of_device *op) 616 + static int mpc85xx_l2_err_remove(struct platform_device *op) 617 617 { 618 618 struct edac_device_ctl_info *edac_dev = dev_get_drvdata(&op->dev); 619 619 struct mpc85xx_l2_pdata *pdata = edac_dev->pvt_info; ··· 956 956 } 957 957 } 958 958 959 - static int __devinit mpc85xx_mc_err_probe(struct of_device *op, 959 + static int __devinit mpc85xx_mc_err_probe(struct platform_device *op, 960 960 const struct of_device_id *match) 961 961 { 962 962 struct mem_ctl_info *mci; ··· 1088 1088 return res; 1089 1089 } 1090 1090 1091 - static int mpc85xx_mc_err_remove(struct of_device *op) 1091 + static int mpc85xx_mc_err_remove(struct platform_device *op) 1092 1092 { 1093 1093 struct mem_ctl_info *mci = dev_get_drvdata(&op->dev); 1094 1094 struct mpc85xx_mc_pdata *pdata = mci->pvt_info;
+6 -6
drivers/edac/ppc4xx_edac.c
··· 184 184 185 185 /* Function Prototypes */ 186 186 187 - static int ppc4xx_edac_probe(struct of_device *device, 187 + static int ppc4xx_edac_probe(struct platform_device *device, 188 188 const struct of_device_id *device_id); 189 - static int ppc4xx_edac_remove(struct of_device *device); 189 + static int ppc4xx_edac_remove(struct platform_device *device); 190 190 191 191 /* Global Variables */ 192 192 ··· 1014 1014 */ 1015 1015 static int __devinit 1016 1016 ppc4xx_edac_mc_init(struct mem_ctl_info *mci, 1017 - struct of_device *op, 1017 + struct platform_device *op, 1018 1018 const struct of_device_id *match, 1019 1019 const dcr_host_t *dcr_host, 1020 1020 u32 mcopt1) ··· 1108 1108 * mapped and assigned. 1109 1109 */ 1110 1110 static int __devinit 1111 - ppc4xx_edac_register_irq(struct of_device *op, struct mem_ctl_info *mci) 1111 + ppc4xx_edac_register_irq(struct platform_device *op, struct mem_ctl_info *mci) 1112 1112 { 1113 1113 int status = 0; 1114 1114 int ded_irq, sec_irq; ··· 1238 1238 * driver; otherwise, < 0 on error. 1239 1239 */ 1240 1240 static int __devinit 1241 - ppc4xx_edac_probe(struct of_device *op, const struct of_device_id *match) 1241 + ppc4xx_edac_probe(struct platform_device *op, const struct of_device_id *match) 1242 1242 { 1243 1243 int status = 0; 1244 1244 u32 mcopt1, memcheck; ··· 1359 1359 * Unconditionally returns 0. 1360 1360 */ 1361 1361 static int 1362 - ppc4xx_edac_remove(struct of_device *op) 1362 + ppc4xx_edac_remove(struct platform_device *op) 1363 1363 { 1364 1364 struct mem_ctl_info *mci = dev_get_drvdata(&op->dev); 1365 1365 struct ppc4xx_edac_pdata *pdata = mci->pvt_info;
+1 -1
drivers/hwmon/ams/ams.h
··· 23 23 24 24 /* General properties */ 25 25 struct device_node *of_node; 26 - struct of_device *of_dev; 26 + struct platform_device *of_dev; 27 27 char has_device; 28 28 char vflag; 29 29 u32 orient1;
+2 -2
drivers/hwmon/ultra45_env.c
··· 234 234 .attrs = env_attributes, 235 235 }; 236 236 237 - static int __devinit env_probe(struct of_device *op, 237 + static int __devinit env_probe(struct platform_device *op, 238 238 const struct of_device_id *match) 239 239 { 240 240 struct env *p = kzalloc(sizeof(*p), GFP_KERNEL); ··· 276 276 goto out; 277 277 } 278 278 279 - static int __devexit env_remove(struct of_device *op) 279 + static int __devexit env_remove(struct platform_device *op) 280 280 { 281 281 struct env *p = dev_get_drvdata(&op->dev); 282 282
+4 -4
drivers/i2c/busses/i2c-cpm.c
··· 105 105 106 106 struct cpm_i2c { 107 107 char *base; 108 - struct of_device *ofdev; 108 + struct platform_device *ofdev; 109 109 struct i2c_adapter adap; 110 110 uint dp_addr; 111 111 int version; /* CPM1=1, CPM2=2 */ ··· 428 428 429 429 static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm) 430 430 { 431 - struct of_device *ofdev = cpm->ofdev; 431 + struct platform_device *ofdev = cpm->ofdev; 432 432 const u32 *data; 433 433 int len, ret, i; 434 434 void __iomem *i2c_base; ··· 634 634 cpm_muram_free(cpm->i2c_addr); 635 635 } 636 636 637 - static int __devinit cpm_i2c_probe(struct of_device *ofdev, 637 + static int __devinit cpm_i2c_probe(struct platform_device *ofdev, 638 638 const struct of_device_id *match) 639 639 { 640 640 int result, len; ··· 687 687 return result; 688 688 } 689 689 690 - static int __devexit cpm_i2c_remove(struct of_device *ofdev) 690 + static int __devexit cpm_i2c_remove(struct platform_device *ofdev) 691 691 { 692 692 struct cpm_i2c *cpm = dev_get_drvdata(&ofdev->dev); 693 693
+3 -3
drivers/i2c/busses/i2c-ibm_iic.c
··· 661 661 return (u8)((opb + 9) / 10 - 1); 662 662 } 663 663 664 - static int __devinit iic_request_irq(struct of_device *ofdev, 664 + static int __devinit iic_request_irq(struct platform_device *ofdev, 665 665 struct ibm_iic_private *dev) 666 666 { 667 667 struct device_node *np = ofdev->dev.of_node; ··· 692 692 /* 693 693 * Register single IIC interface 694 694 */ 695 - static int __devinit iic_probe(struct of_device *ofdev, 695 + static int __devinit iic_probe(struct platform_device *ofdev, 696 696 const struct of_device_id *match) 697 697 { 698 698 struct device_node *np = ofdev->dev.of_node; ··· 780 780 /* 781 781 * Cleanup initialized IIC interface 782 782 */ 783 - static int __devexit iic_remove(struct of_device *ofdev) 783 + static int __devexit iic_remove(struct platform_device *ofdev) 784 784 { 785 785 struct ibm_iic_private *dev = dev_get_drvdata(&ofdev->dev); 786 786
+2 -2
drivers/i2c/busses/i2c-mpc.c
··· 560 560 .timeout = HZ, 561 561 }; 562 562 563 - static int __devinit fsl_i2c_probe(struct of_device *op, 563 + static int __devinit fsl_i2c_probe(struct platform_device *op, 564 564 const struct of_device_id *match) 565 565 { 566 566 struct mpc_i2c *i2c; ··· 646 646 return result; 647 647 }; 648 648 649 - static int __devexit fsl_i2c_remove(struct of_device *op) 649 + static int __devexit fsl_i2c_remove(struct platform_device *op) 650 650 { 651 651 struct mpc_i2c *i2c = dev_get_drvdata(&op->dev); 652 652
+1 -1
drivers/infiniband/hw/ehca/ehca_classes.h
··· 112 112 113 113 struct ehca_shca { 114 114 struct ib_device ib_device; 115 - struct of_device *ofdev; 115 + struct platform_device *ofdev; 116 116 u8 num_ports; 117 117 int hw_level; 118 118 struct list_head shca_list;
+2 -2
drivers/infiniband/hw/ehca/ehca_main.c
··· 713 713 .attrs = ehca_dev_attrs 714 714 }; 715 715 716 - static int __devinit ehca_probe(struct of_device *dev, 716 + static int __devinit ehca_probe(struct platform_device *dev, 717 717 const struct of_device_id *id) 718 718 { 719 719 struct ehca_shca *shca; ··· 879 879 return -EINVAL; 880 880 } 881 881 882 - static int __devexit ehca_remove(struct of_device *dev) 882 + static int __devexit ehca_remove(struct platform_device *dev) 883 883 { 884 884 struct ehca_shca *shca = dev_get_drvdata(&dev->dev); 885 885 unsigned long flags;
+5 -5
drivers/input/misc/sparcspkr.c
··· 173 173 return 0; 174 174 } 175 175 176 - static int sparcspkr_shutdown(struct of_device *dev) 176 + static int sparcspkr_shutdown(struct platform_device *dev) 177 177 { 178 178 struct sparcspkr_state *state = dev_get_drvdata(&dev->dev); 179 179 struct input_dev *input_dev = state->input_dev; ··· 184 184 return 0; 185 185 } 186 186 187 - static int __devinit bbc_beep_probe(struct of_device *op, const struct of_device_id *match) 187 + static int __devinit bbc_beep_probe(struct platform_device *op, const struct of_device_id *match) 188 188 { 189 189 struct sparcspkr_state *state; 190 190 struct bbc_beep_info *info; ··· 231 231 return err; 232 232 } 233 233 234 - static int __devexit bbc_remove(struct of_device *op) 234 + static int __devexit bbc_remove(struct platform_device *op) 235 235 { 236 236 struct sparcspkr_state *state = dev_get_drvdata(&op->dev); 237 237 struct input_dev *input_dev = state->input_dev; ··· 269 269 .shutdown = sparcspkr_shutdown, 270 270 }; 271 271 272 - static int __devinit grover_beep_probe(struct of_device *op, const struct of_device_id *match) 272 + static int __devinit grover_beep_probe(struct platform_device *op, const struct of_device_id *match) 273 273 { 274 274 struct sparcspkr_state *state; 275 275 struct grover_beep_info *info; ··· 312 312 return err; 313 313 } 314 314 315 - static int __devexit grover_remove(struct of_device *op) 315 + static int __devexit grover_remove(struct platform_device *op) 316 316 { 317 317 struct sparcspkr_state *state = dev_get_drvdata(&op->dev); 318 318 struct grover_beep_info *info = &state->u.grover;
+4 -4
drivers/input/serio/i8042-sparcio.h
··· 49 49 #define OBP_PS2MS_NAME1 "kdmouse" 50 50 #define OBP_PS2MS_NAME2 "mouse" 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 platform_device *op, const struct of_device_id *match) 53 53 { 54 54 struct device_node *dp = op->dev.of_node; 55 55 ··· 57 57 while (dp) { 58 58 if (!strcmp(dp->name, OBP_PS2KBD_NAME1) || 59 59 !strcmp(dp->name, OBP_PS2KBD_NAME2)) { 60 - struct of_device *kbd = of_find_device_by_node(dp); 60 + struct platform_device *kbd = of_find_device_by_node(dp); 61 61 unsigned int irq = kbd->archdata.irqs[0]; 62 62 if (irq == 0xffffffff) 63 63 irq = op->archdata.irqs[0]; ··· 67 67 kbd_res = &kbd->resource[0]; 68 68 } else if (!strcmp(dp->name, OBP_PS2MS_NAME1) || 69 69 !strcmp(dp->name, OBP_PS2MS_NAME2)) { 70 - struct of_device *ms = of_find_device_by_node(dp); 70 + struct platform_device *ms = of_find_device_by_node(dp); 71 71 unsigned int irq = ms->archdata.irqs[0]; 72 72 if (irq == 0xffffffff) 73 73 irq = op->archdata.irqs[0]; ··· 80 80 return 0; 81 81 } 82 82 83 - static int __devexit sparc_i8042_remove(struct of_device *op) 83 + static int __devexit sparc_i8042_remove(struct platform_device *op) 84 84 { 85 85 of_iounmap(kbd_res, kbd_iobase, 8); 86 86
+2 -2
drivers/input/serio/xilinx_ps2.c
··· 232 232 * It returns 0, if the driver is bound to the PS/2 device, or a negative 233 233 * value if there is an error. 234 234 */ 235 - static int __devinit xps2_of_probe(struct of_device *ofdev, 235 + static int __devinit xps2_of_probe(struct platform_device *ofdev, 236 236 const struct of_device_id *match) 237 237 { 238 238 struct resource r_irq; /* Interrupt resources */ ··· 332 332 * if the driver module is being unloaded. It frees any resources allocated to 333 333 * the device. 334 334 */ 335 - static int __devexit xps2_of_remove(struct of_device *of_dev) 335 + static int __devexit xps2_of_remove(struct platform_device *of_dev) 336 336 { 337 337 struct device *dev = &of_dev->dev; 338 338 struct xps2data *drvdata = dev_get_drvdata(dev);
+2 -2
drivers/leds/leds-gpio.c
··· 224 224 struct gpio_led_data led_data[]; 225 225 }; 226 226 227 - static int __devinit of_gpio_leds_probe(struct of_device *ofdev, 227 + static int __devinit of_gpio_leds_probe(struct platform_device *ofdev, 228 228 const struct of_device_id *match) 229 229 { 230 230 struct device_node *np = ofdev->dev.of_node, *child; ··· 283 283 return ret; 284 284 } 285 285 286 - static int __devexit of_gpio_leds_remove(struct of_device *ofdev) 286 + static int __devexit of_gpio_leds_remove(struct platform_device *ofdev) 287 287 { 288 288 struct gpio_led_of_platform_data *pdata = dev_get_drvdata(&ofdev->dev); 289 289 int i;
+3 -3
drivers/macintosh/macio_sysfs.c
··· 15 15 static ssize_t 16 16 compatible_show (struct device *dev, struct device_attribute *attr, char *buf) 17 17 { 18 - struct of_device *of; 18 + struct platform_device *of; 19 19 const char *compat; 20 20 int cplen; 21 21 int length = 0; ··· 52 52 static ssize_t devspec_show(struct device *dev, 53 53 struct device_attribute *attr, char *buf) 54 54 { 55 - struct of_device *ofdev; 55 + struct platform_device *ofdev; 56 56 57 - ofdev = to_of_device(dev); 57 + ofdev = to_platform_device(dev); 58 58 return sprintf(buf, "%s\n", ofdev->dev.of_node->full_name); 59 59 } 60 60
+3 -3
drivers/macintosh/smu.c
··· 75 75 struct smu_device { 76 76 spinlock_t lock; 77 77 struct device_node *of_node; 78 - struct of_device *of_dev; 78 + struct platform_device *of_dev; 79 79 int doorbell; /* doorbell gpio */ 80 80 u32 __iomem *db_buf; /* doorbell buffer */ 81 81 struct device_node *db_node; ··· 645 645 646 646 static DECLARE_WORK(smu_expose_childs_work, smu_expose_childs); 647 647 648 - static int smu_platform_probe(struct of_device* dev, 648 + static int smu_platform_probe(struct platform_device* dev, 649 649 const struct of_device_id *match) 650 650 { 651 651 if (!smu) ··· 695 695 696 696 device_initcall(smu_init_sysfs); 697 697 698 - struct of_device *smu_get_ofdev(void) 698 + struct platform_device *smu_get_ofdev(void) 699 699 { 700 700 if (!smu) 701 701 return NULL;
+1 -1
drivers/macintosh/therm_adt746x.c
··· 84 84 85 85 static enum {ADT7460, ADT7467} therm_type; 86 86 static int therm_bus, therm_address; 87 - static struct of_device * of_dev; 87 + static struct platform_device * of_dev; 88 88 static struct thermostat* thermostat; 89 89 static struct task_struct *thread_therm = NULL; 90 90
+3 -3
drivers/macintosh/therm_pm72.c
··· 148 148 * Driver statics 149 149 */ 150 150 151 - static struct of_device * of_dev; 151 + static struct platform_device * of_dev; 152 152 static struct i2c_adapter * u3_0; 153 153 static struct i2c_adapter * u3_1; 154 154 static struct i2c_adapter * k2; ··· 2210 2210 } 2211 2211 } 2212 2212 2213 - static int fcu_of_probe(struct of_device* dev, const struct of_device_id *match) 2213 + static int fcu_of_probe(struct platform_device* dev, const struct of_device_id *match) 2214 2214 { 2215 2215 state = state_detached; 2216 2216 ··· 2221 2221 return i2c_add_driver(&therm_pm72_driver); 2222 2222 } 2223 2223 2224 - static int fcu_of_remove(struct of_device* dev) 2224 + static int fcu_of_remove(struct platform_device* dev) 2225 2225 { 2226 2226 i2c_del_driver(&therm_pm72_driver); 2227 2227
+3 -3
drivers/macintosh/therm_windtunnel.c
··· 52 52 struct task_struct *poll_task; 53 53 54 54 struct mutex lock; 55 - struct of_device *of_dev; 55 + struct platform_device *of_dev; 56 56 57 57 struct i2c_client *thermostat; 58 58 struct i2c_client *fan; ··· 444 444 /************************************************************************/ 445 445 446 446 static int 447 - therm_of_probe( struct of_device *dev, const struct of_device_id *match ) 447 + therm_of_probe( struct platform_device *dev, const struct of_device_id *match ) 448 448 { 449 449 return i2c_add_driver( &g4fan_driver ); 450 450 } 451 451 452 452 static int 453 - therm_of_remove( struct of_device *dev ) 453 + therm_of_remove( struct platform_device *dev ) 454 454 { 455 455 i2c_del_driver( &g4fan_driver ); 456 456 return 0;
+4 -4
drivers/media/video/fsl-viu.c
··· 1418 1418 .current_norm = V4L2_STD_NTSC_M, 1419 1419 }; 1420 1420 1421 - static int __devinit viu_of_probe(struct of_device *op, 1421 + static int __devinit viu_of_probe(struct platform_device *op, 1422 1422 const struct of_device_id *match) 1423 1423 { 1424 1424 struct viu_dev *viu_dev; ··· 1549 1549 return ret; 1550 1550 } 1551 1551 1552 - static int __devexit viu_of_remove(struct of_device *op) 1552 + static int __devexit viu_of_remove(struct platform_device *op) 1553 1553 { 1554 1554 struct v4l2_device *v4l2_dev = dev_get_drvdata(&op->dev); 1555 1555 struct viu_dev *dev = container_of(v4l2_dev, struct viu_dev, v4l2_dev); ··· 1570 1570 } 1571 1571 1572 1572 #ifdef CONFIG_PM 1573 - static int viu_suspend(struct of_device *op, pm_message_t state) 1573 + static int viu_suspend(struct platform_device *op, pm_message_t state) 1574 1574 { 1575 1575 struct v4l2_device *v4l2_dev = dev_get_drvdata(&op->dev); 1576 1576 struct viu_dev *dev = container_of(v4l2_dev, struct viu_dev, v4l2_dev); ··· 1579 1579 return 0; 1580 1580 } 1581 1581 1582 - static int viu_resume(struct of_device *op) 1582 + static int viu_resume(struct platform_device *op) 1583 1583 { 1584 1584 struct v4l2_device *v4l2_dev = dev_get_drvdata(&op->dev); 1585 1585 struct viu_dev *dev = container_of(v4l2_dev, struct viu_dev, v4l2_dev);
+1
drivers/mmc/host/mmc_spi.c
··· 1536 1536 #if defined(CONFIG_OF) 1537 1537 static struct of_device_id mmc_spi_of_match_table[] __devinitdata = { 1538 1538 { .compatible = "mmc-spi-slot", }, 1539 + {}, 1539 1540 }; 1540 1541 #endif 1541 1542
+4 -4
drivers/mmc/host/sdhci-of-core.c
··· 85 85 86 86 #ifdef CONFIG_PM 87 87 88 - static int sdhci_of_suspend(struct of_device *ofdev, pm_message_t state) 88 + static int sdhci_of_suspend(struct platform_device *ofdev, pm_message_t state) 89 89 { 90 90 struct sdhci_host *host = dev_get_drvdata(&ofdev->dev); 91 91 92 92 return mmc_suspend_host(host->mmc); 93 93 } 94 94 95 - static int sdhci_of_resume(struct of_device *ofdev) 95 + static int sdhci_of_resume(struct platform_device *ofdev) 96 96 { 97 97 struct sdhci_host *host = dev_get_drvdata(&ofdev->dev); 98 98 ··· 115 115 return machine_is(mpc837x_rdb) || machine_is(mpc837x_mds); 116 116 } 117 117 118 - static int __devinit sdhci_of_probe(struct of_device *ofdev, 118 + static int __devinit sdhci_of_probe(struct platform_device *ofdev, 119 119 const struct of_device_id *match) 120 120 { 121 121 struct device_node *np = ofdev->dev.of_node; ··· 183 183 return ret; 184 184 } 185 185 186 - static int __devexit sdhci_of_remove(struct of_device *ofdev) 186 + static int __devexit sdhci_of_remove(struct platform_device *ofdev) 187 187 { 188 188 struct sdhci_host *host = dev_get_drvdata(&ofdev->dev); 189 189
+4 -4
drivers/mtd/maps/physmap_of.c
··· 43 43 #ifdef CONFIG_MTD_PARTITIONS 44 44 #define OF_FLASH_PARTS(info) ((info)->parts) 45 45 46 - static int parse_obsolete_partitions(struct of_device *dev, 46 + static int parse_obsolete_partitions(struct platform_device *dev, 47 47 struct of_flash *info, 48 48 struct device_node *dp) 49 49 { ··· 93 93 #define parse_partitions(info, dev) (0) 94 94 #endif /* MTD_PARTITIONS */ 95 95 96 - static int of_flash_remove(struct of_device *dev) 96 + static int of_flash_remove(struct platform_device *dev) 97 97 { 98 98 struct of_flash *info; 99 99 int i; ··· 140 140 /* Helper function to handle probing of the obsolete "direct-mapped" 141 141 * compatible binding, which has an extra "probe-type" property 142 142 * describing the type of flash probe necessary. */ 143 - static struct mtd_info * __devinit obsolete_probe(struct of_device *dev, 143 + static struct mtd_info * __devinit obsolete_probe(struct platform_device *dev, 144 144 struct map_info *map) 145 145 { 146 146 struct device_node *dp = dev->dev.of_node; ··· 215 215 } 216 216 #endif 217 217 218 - static int __devinit of_flash_probe(struct of_device *dev, 218 + static int __devinit of_flash_probe(struct platform_device *dev, 219 219 const struct of_device_id *match) 220 220 { 221 221 #ifdef CONFIG_MTD_PARTITIONS
+3 -3
drivers/mtd/maps/sun_uflash.c
··· 48 48 .bankwidth = UFLASH_BUSWIDTH, 49 49 }; 50 50 51 - int uflash_devinit(struct of_device *op, struct device_node *dp) 51 + int uflash_devinit(struct platform_device *op, struct device_node *dp) 52 52 { 53 53 struct uflash_dev *up; 54 54 ··· 108 108 return 0; 109 109 } 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 platform_device *op, const struct of_device_id *match) 112 112 { 113 113 struct device_node *dp = op->dev.of_node; 114 114 ··· 121 121 return uflash_devinit(op, dp); 122 122 } 123 123 124 - static int __devexit uflash_remove(struct of_device *op) 124 + static int __devexit uflash_remove(struct platform_device *op) 125 125 { 126 126 struct uflash_dev *up = dev_get_drvdata(&op->dev); 127 127
+2 -2
drivers/mtd/nand/fsl_elbc_nand.c
··· 958 958 return 0; 959 959 } 960 960 961 - static int fsl_elbc_ctrl_remove(struct of_device *ofdev) 961 + static int fsl_elbc_ctrl_remove(struct platform_device *ofdev) 962 962 { 963 963 struct fsl_elbc_ctrl *ctrl = dev_get_drvdata(&ofdev->dev); 964 964 int i; ··· 1013 1013 * in the chip probe function. 1014 1014 */ 1015 1015 1016 - static int __devinit fsl_elbc_ctrl_probe(struct of_device *ofdev, 1016 + static int __devinit fsl_elbc_ctrl_probe(struct platform_device *ofdev, 1017 1017 const struct of_device_id *match) 1018 1018 { 1019 1019 struct device_node *child;
+2 -2
drivers/mtd/nand/fsl_upm.c
··· 217 217 return ret; 218 218 } 219 219 220 - static int __devinit fun_probe(struct of_device *ofdev, 220 + static int __devinit fun_probe(struct platform_device *ofdev, 221 221 const struct of_device_id *ofid) 222 222 { 223 223 struct fsl_upm_nand *fun; ··· 335 335 return ret; 336 336 } 337 337 338 - static int __devexit fun_remove(struct of_device *ofdev) 338 + static int __devexit fun_remove(struct platform_device *ofdev) 339 339 { 340 340 struct fsl_upm_nand *fun = dev_get_drvdata(&ofdev->dev); 341 341 int i;
+2 -2
drivers/mtd/nand/mpc5121_nfc.c
··· 647 647 iounmap(prv->csreg); 648 648 } 649 649 650 - static int __devinit mpc5121_nfc_probe(struct of_device *op, 650 + static int __devinit mpc5121_nfc_probe(struct platform_device *op, 651 651 const struct of_device_id *match) 652 652 { 653 653 struct device_node *rootnode, *dn = op->dev.of_node; ··· 869 869 return retval; 870 870 } 871 871 872 - static int __devexit mpc5121_nfc_remove(struct of_device *op) 872 + static int __devexit mpc5121_nfc_remove(struct platform_device *op) 873 873 { 874 874 struct device *dev = &op->dev; 875 875 struct mtd_info *mtd = dev_get_drvdata(dev);
+3 -3
drivers/mtd/nand/ndfc.c
··· 35 35 36 36 37 37 struct ndfc_controller { 38 - struct of_device *ofdev; 38 + struct platform_device *ofdev; 39 39 void __iomem *ndfcbase; 40 40 struct mtd_info mtd; 41 41 struct nand_chip chip; ··· 225 225 return ret; 226 226 } 227 227 228 - static int __devinit ndfc_probe(struct of_device *ofdev, 228 + static int __devinit ndfc_probe(struct platform_device *ofdev, 229 229 const struct of_device_id *match) 230 230 { 231 231 struct ndfc_controller *ndfc = &ndfc_ctrl; ··· 277 277 return 0; 278 278 } 279 279 280 - static int __devexit ndfc_remove(struct of_device *ofdev) 280 + static int __devexit ndfc_remove(struct platform_device *ofdev) 281 281 { 282 282 struct ndfc_controller *ndfc = dev_get_drvdata(&ofdev->dev); 283 283
+2 -2
drivers/mtd/nand/pasemi_nand.c
··· 89 89 return !!(inl(lpcctl) & LBICTRL_LPCCTL_NR); 90 90 } 91 91 92 - static int __devinit pasemi_nand_probe(struct of_device *ofdev, 92 + static int __devinit pasemi_nand_probe(struct platform_device *ofdev, 93 93 const struct of_device_id *match) 94 94 { 95 95 struct pci_dev *pdev; ··· 185 185 return err; 186 186 } 187 187 188 - static int __devexit pasemi_nand_remove(struct of_device *ofdev) 188 + static int __devexit pasemi_nand_remove(struct platform_device *ofdev) 189 189 { 190 190 struct nand_chip *chip; 191 191
+2 -2
drivers/mtd/nand/socrates_nand.c
··· 162 162 /* 163 163 * Probe for the NAND device. 164 164 */ 165 - static int __devinit socrates_nand_probe(struct of_device *ofdev, 165 + static int __devinit socrates_nand_probe(struct platform_device *ofdev, 166 166 const struct of_device_id *ofid) 167 167 { 168 168 struct socrates_nand_host *host; ··· 276 276 /* 277 277 * Remove a NAND device. 278 278 */ 279 - static int __devexit socrates_nand_remove(struct of_device *ofdev) 279 + static int __devexit socrates_nand_remove(struct platform_device *ofdev) 280 280 { 281 281 struct socrates_nand_host *host = dev_get_drvdata(&ofdev->dev); 282 282 struct mtd_info *mtd = &host->mtd;
+9 -9
drivers/net/can/mscan/mpc5xxx_can.c
··· 38 38 39 39 struct mpc5xxx_can_data { 40 40 unsigned int type; 41 - u32 (*get_clock)(struct of_device *ofdev, const char *clock_name, 41 + u32 (*get_clock)(struct platform_device *ofdev, const char *clock_name, 42 42 int *mscan_clksrc); 43 43 }; 44 44 ··· 48 48 {} 49 49 }; 50 50 51 - static u32 __devinit mpc52xx_can_get_clock(struct of_device *ofdev, 51 + static u32 __devinit mpc52xx_can_get_clock(struct platform_device *ofdev, 52 52 const char *clock_name, 53 53 int *mscan_clksrc) 54 54 { ··· 101 101 return freq; 102 102 } 103 103 #else /* !CONFIG_PPC_MPC52xx */ 104 - static u32 __devinit mpc52xx_can_get_clock(struct of_device *ofdev, 104 + static u32 __devinit mpc52xx_can_get_clock(struct platform_device *ofdev, 105 105 const char *clock_name, 106 106 int *mscan_clksrc) 107 107 { ··· 129 129 {} 130 130 }; 131 131 132 - static u32 __devinit mpc512x_can_get_clock(struct of_device *ofdev, 132 + static u32 __devinit mpc512x_can_get_clock(struct platform_device *ofdev, 133 133 const char *clock_name, 134 134 int *mscan_clksrc) 135 135 { ··· 239 239 return freq; 240 240 } 241 241 #else /* !CONFIG_PPC_MPC512x */ 242 - static u32 __devinit mpc512x_can_get_clock(struct of_device *ofdev, 242 + static u32 __devinit mpc512x_can_get_clock(struct platform_device *ofdev, 243 243 const char *clock_name, 244 244 int *mscan_clksrc) 245 245 { ··· 247 247 } 248 248 #endif /* CONFIG_PPC_MPC512x */ 249 249 250 - static int __devinit mpc5xxx_can_probe(struct of_device *ofdev, 250 + static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev, 251 251 const struct of_device_id *id) 252 252 { 253 253 struct mpc5xxx_can_data *data = (struct mpc5xxx_can_data *)id->data; ··· 317 317 return err; 318 318 } 319 319 320 - static int __devexit mpc5xxx_can_remove(struct of_device *ofdev) 320 + static int __devexit mpc5xxx_can_remove(struct platform_device *ofdev) 321 321 { 322 322 struct net_device *dev = dev_get_drvdata(&ofdev->dev); 323 323 struct mscan_priv *priv = netdev_priv(dev); ··· 334 334 335 335 #ifdef CONFIG_PM 336 336 static struct mscan_regs saved_regs; 337 - static int mpc5xxx_can_suspend(struct of_device *ofdev, pm_message_t state) 337 + static int mpc5xxx_can_suspend(struct platform_device *ofdev, pm_message_t state) 338 338 { 339 339 struct net_device *dev = dev_get_drvdata(&ofdev->dev); 340 340 struct mscan_priv *priv = netdev_priv(dev); ··· 345 345 return 0; 346 346 } 347 347 348 - static int mpc5xxx_can_resume(struct of_device *ofdev) 348 + static int mpc5xxx_can_resume(struct platform_device *ofdev) 349 349 { 350 350 struct net_device *dev = dev_get_drvdata(&ofdev->dev); 351 351 struct mscan_priv *priv = netdev_priv(dev);
+2 -2
drivers/net/can/sja1000/sja1000_of_platform.c
··· 67 67 out_8(priv->reg_base + reg, val); 68 68 } 69 69 70 - static int __devexit sja1000_ofp_remove(struct of_device *ofdev) 70 + static int __devexit sja1000_ofp_remove(struct platform_device *ofdev) 71 71 { 72 72 struct net_device *dev = dev_get_drvdata(&ofdev->dev); 73 73 struct sja1000_priv *priv = netdev_priv(dev); ··· 87 87 return 0; 88 88 } 89 89 90 - static int __devinit sja1000_ofp_probe(struct of_device *ofdev, 90 + static int __devinit sja1000_ofp_probe(struct platform_device *ofdev, 91 91 const struct of_device_id *id) 92 92 { 93 93 struct device_node *np = ofdev->dev.of_node;
+2 -2
drivers/net/ehea/ehea.h
··· 413 413 414 414 struct ehea_adapter { 415 415 u64 handle; 416 - struct of_device *ofdev; 416 + struct platform_device *ofdev; 417 417 struct ehea_port *port[EHEA_MAX_PORTS]; 418 418 struct ehea_eq *neq; /* notification event queue */ 419 419 struct tasklet_struct neq_tasklet; ··· 465 465 struct net_device *netdev; 466 466 struct net_device_stats stats; 467 467 struct ehea_port_res port_res[EHEA_MAX_PORT_RES]; 468 - struct of_device ofdev; /* Open Firmware Device */ 468 + struct platform_device ofdev; /* Open Firmware Device */ 469 469 struct ehea_mc_list *mc_list; /* Multicast MAC addresses */ 470 470 struct vlan_group *vgrp; 471 471 struct ehea_eq *qp_eq;
+6 -6
drivers/net/ehea/ehea_main.c
··· 107 107 struct ehea_bcmc_reg_array ehea_bcmc_regs; 108 108 109 109 110 - static int __devinit ehea_probe_adapter(struct of_device *dev, 110 + static int __devinit ehea_probe_adapter(struct platform_device *dev, 111 111 const struct of_device_id *id); 112 112 113 - static int __devexit ehea_remove(struct of_device *dev); 113 + static int __devexit ehea_remove(struct platform_device *dev); 114 114 115 115 static struct of_device_id ehea_device_table[] = { 116 116 { ··· 3376 3376 static DEVICE_ATTR(probe_port, S_IWUSR, NULL, ehea_probe_port); 3377 3377 static DEVICE_ATTR(remove_port, S_IWUSR, NULL, ehea_remove_port); 3378 3378 3379 - int ehea_create_device_sysfs(struct of_device *dev) 3379 + int ehea_create_device_sysfs(struct platform_device *dev) 3380 3380 { 3381 3381 int ret = device_create_file(&dev->dev, &dev_attr_probe_port); 3382 3382 if (ret) ··· 3387 3387 return ret; 3388 3388 } 3389 3389 3390 - void ehea_remove_device_sysfs(struct of_device *dev) 3390 + void ehea_remove_device_sysfs(struct platform_device *dev) 3391 3391 { 3392 3392 device_remove_file(&dev->dev, &dev_attr_probe_port); 3393 3393 device_remove_file(&dev->dev, &dev_attr_remove_port); 3394 3394 } 3395 3395 3396 - static int __devinit ehea_probe_adapter(struct of_device *dev, 3396 + static int __devinit ehea_probe_adapter(struct platform_device *dev, 3397 3397 const struct of_device_id *id) 3398 3398 { 3399 3399 struct ehea_adapter *adapter; ··· 3492 3492 return ret; 3493 3493 } 3494 3494 3495 - static int __devexit ehea_remove(struct of_device *dev) 3495 + static int __devexit ehea_remove(struct platform_device *dev) 3496 3496 { 3497 3497 struct ehea_adapter *adapter = dev_get_drvdata(&dev->dev); 3498 3498 int i;
+4 -4
drivers/net/fec_mpc52xx.c
··· 850 850 /* ======================================================================== */ 851 851 852 852 static int __devinit 853 - mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match) 853 + mpc52xx_fec_probe(struct platform_device *op, const struct of_device_id *match) 854 854 { 855 855 int rv; 856 856 struct net_device *ndev; ··· 995 995 } 996 996 997 997 static int 998 - mpc52xx_fec_remove(struct of_device *op) 998 + mpc52xx_fec_remove(struct platform_device *op) 999 999 { 1000 1000 struct net_device *ndev; 1001 1001 struct mpc52xx_fec_priv *priv; ··· 1025 1025 } 1026 1026 1027 1027 #ifdef CONFIG_PM 1028 - static int mpc52xx_fec_of_suspend(struct of_device *op, pm_message_t state) 1028 + static int mpc52xx_fec_of_suspend(struct platform_device *op, pm_message_t state) 1029 1029 { 1030 1030 struct net_device *dev = dev_get_drvdata(&op->dev); 1031 1031 ··· 1035 1035 return 0; 1036 1036 } 1037 1037 1038 - static int mpc52xx_fec_of_resume(struct of_device *op) 1038 + static int mpc52xx_fec_of_resume(struct platform_device *op) 1039 1039 { 1040 1040 struct net_device *dev = dev_get_drvdata(&op->dev); 1041 1041
+2 -2
drivers/net/fec_mpc52xx_phy.c
··· 61 61 data | FEC_MII_WRITE_FRAME); 62 62 } 63 63 64 - static int mpc52xx_fec_mdio_probe(struct of_device *of, 64 + static int mpc52xx_fec_mdio_probe(struct platform_device *of, 65 65 const struct of_device_id *match) 66 66 { 67 67 struct device *dev = &of->dev; ··· 122 122 return err; 123 123 } 124 124 125 - static int mpc52xx_fec_mdio_remove(struct of_device *of) 125 + static int mpc52xx_fec_mdio_remove(struct platform_device *of) 126 126 { 127 127 struct device *dev = &of->dev; 128 128 struct mii_bus *bus = dev_get_drvdata(dev);
+2 -2
drivers/net/fs_enet/fs_enet-main.c
··· 997 997 #endif 998 998 }; 999 999 1000 - static int __devinit fs_enet_probe(struct of_device *ofdev, 1000 + static int __devinit fs_enet_probe(struct platform_device *ofdev, 1001 1001 const struct of_device_id *match) 1002 1002 { 1003 1003 struct net_device *ndev; ··· 1105 1105 return ret; 1106 1106 } 1107 1107 1108 - static int fs_enet_remove(struct of_device *ofdev) 1108 + static int fs_enet_remove(struct platform_device *ofdev) 1109 1109 { 1110 1110 struct net_device *ndev = dev_get_drvdata(&ofdev->dev); 1111 1111 struct fs_enet_private *fep = netdev_priv(ndev);
+1 -1
drivers/net/fs_enet/mac-fcc.c
··· 84 84 85 85 static int do_pd_setup(struct fs_enet_private *fep) 86 86 { 87 - struct of_device *ofdev = to_of_device(fep->dev); 87 + struct platform_device *ofdev = to_platform_device(fep->dev); 88 88 struct fs_platform_info *fpi = fep->fpi; 89 89 int ret = -EINVAL; 90 90
+1 -1
drivers/net/fs_enet/mac-fec.c
··· 96 96 97 97 static int do_pd_setup(struct fs_enet_private *fep) 98 98 { 99 - struct of_device *ofdev = to_of_device(fep->dev); 99 + struct platform_device *ofdev = to_platform_device(fep->dev); 100 100 101 101 fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL); 102 102 if (fep->interrupt == NO_IRQ)
+1 -1
drivers/net/fs_enet/mac-scc.c
··· 96 96 97 97 static int do_pd_setup(struct fs_enet_private *fep) 98 98 { 99 - struct of_device *ofdev = to_of_device(fep->dev); 99 + struct platform_device *ofdev = to_platform_device(fep->dev); 100 100 101 101 fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL); 102 102 if (fep->interrupt == NO_IRQ)
+2 -2
drivers/net/fs_enet/mii-bitbang.c
··· 150 150 return 0; 151 151 } 152 152 153 - static int __devinit fs_enet_mdio_probe(struct of_device *ofdev, 153 + static int __devinit fs_enet_mdio_probe(struct platform_device *ofdev, 154 154 const struct of_device_id *match) 155 155 { 156 156 struct mii_bus *new_bus; ··· 200 200 return ret; 201 201 } 202 202 203 - static int fs_enet_mdio_remove(struct of_device *ofdev) 203 + static int fs_enet_mdio_remove(struct platform_device *ofdev) 204 204 { 205 205 struct mii_bus *bus = dev_get_drvdata(&ofdev->dev); 206 206 struct bb_info *bitbang = bus->priv;
+2 -2
drivers/net/fs_enet/mii-fec.c
··· 101 101 return 0; 102 102 } 103 103 104 - static int __devinit fs_enet_mdio_probe(struct of_device *ofdev, 104 + static int __devinit fs_enet_mdio_probe(struct platform_device *ofdev, 105 105 const struct of_device_id *match) 106 106 { 107 107 struct resource res; ··· 192 192 return ret; 193 193 } 194 194 195 - static int fs_enet_mdio_remove(struct of_device *ofdev) 195 + static int fs_enet_mdio_remove(struct platform_device *ofdev) 196 196 { 197 197 struct mii_bus *bus = dev_get_drvdata(&ofdev->dev); 198 198 struct fec_info *fec = bus->priv;
+2 -2
drivers/net/fsl_pq_mdio.c
··· 265 265 #endif 266 266 267 267 268 - static int fsl_pq_mdio_probe(struct of_device *ofdev, 268 + static int fsl_pq_mdio_probe(struct platform_device *ofdev, 269 269 const struct of_device_id *match) 270 270 { 271 271 struct device_node *np = ofdev->dev.of_node; ··· 425 425 } 426 426 427 427 428 - static int fsl_pq_mdio_remove(struct of_device *ofdev) 428 + static int fsl_pq_mdio_remove(struct platform_device *ofdev) 429 429 { 430 430 struct device *device = &ofdev->dev; 431 431 struct mii_bus *bus = dev_get_drvdata(device);
+5 -5
drivers/net/gianfar.c
··· 122 122 static void adjust_link(struct net_device *dev); 123 123 static void init_registers(struct net_device *dev); 124 124 static int init_phy(struct net_device *dev); 125 - static int gfar_probe(struct of_device *ofdev, 125 + static int gfar_probe(struct platform_device *ofdev, 126 126 const struct of_device_id *match); 127 - static int gfar_remove(struct of_device *ofdev); 127 + static int gfar_remove(struct platform_device *ofdev); 128 128 static void free_skb_resources(struct gfar_private *priv); 129 129 static void gfar_set_multi(struct net_device *dev); 130 130 static void gfar_set_hash_for_addr(struct net_device *dev, u8 *addr); ··· 605 605 return 0; 606 606 } 607 607 608 - static int gfar_of_init(struct of_device *ofdev, struct net_device **pdev) 608 + static int gfar_of_init(struct platform_device *ofdev, struct net_device **pdev) 609 609 { 610 610 const char *model; 611 611 const char *ctype; ··· 959 959 960 960 /* Set up the ethernet device structure, private data, 961 961 * and anything else we need before we start */ 962 - static int gfar_probe(struct of_device *ofdev, 962 + static int gfar_probe(struct platform_device *ofdev, 963 963 const struct of_device_id *match) 964 964 { 965 965 u32 tempval; ··· 1238 1238 return err; 1239 1239 } 1240 1240 1241 - static int gfar_remove(struct of_device *ofdev) 1241 + static int gfar_remove(struct platform_device *ofdev) 1242 1242 { 1243 1243 struct gfar_private *priv = dev_get_drvdata(&ofdev->dev); 1244 1244
+1 -1
drivers/net/gianfar.h
··· 1054 1054 1055 1055 struct device_node *node; 1056 1056 struct net_device *ndev; 1057 - struct of_device *ofdev; 1057 + struct platform_device *ofdev; 1058 1058 enum gfar_errata errata; 1059 1059 1060 1060 struct gfar_priv_grp gfargrp[MAXGROUPS];
+3 -3
drivers/net/greth.c
··· 1373 1373 } 1374 1374 1375 1375 /* Initialize the GRETH MAC */ 1376 - static int __devinit greth_of_probe(struct of_device *ofdev, const struct of_device_id *match) 1376 + static int __devinit greth_of_probe(struct platform_device *ofdev, const struct of_device_id *match) 1377 1377 { 1378 1378 struct net_device *dev; 1379 1379 struct greth_private *greth; ··· 1412 1412 } 1413 1413 1414 1414 regs = (struct greth_regs *) greth->regs; 1415 - greth->irq = ofdev->irqs[0]; 1415 + greth->irq = ofdev->archdata.irqs[0]; 1416 1416 1417 1417 dev_set_drvdata(greth->dev, dev); 1418 1418 SET_NETDEV_DEV(dev, greth->dev); ··· 1572 1572 return err; 1573 1573 } 1574 1574 1575 - static int __devexit greth_of_remove(struct of_device *of_dev) 1575 + static int __devexit greth_of_remove(struct platform_device *of_dev) 1576 1576 { 1577 1577 struct net_device *ndev = dev_get_drvdata(&of_dev->dev); 1578 1578 struct greth_private *greth = netdev_priv(ndev);
+1 -1
drivers/net/greth.h
··· 118 118 119 119 int irq; 120 120 121 - struct device *dev; /* Pointer to of_device->dev */ 121 + struct device *dev; /* Pointer to platform_device->dev */ 122 122 struct net_device *netdev; 123 123 struct napi_struct napi; 124 124 spinlock_t devlock;
+3 -3
drivers/net/ibm_newemac/core.c
··· 2245 2245 struct emac_depentry { 2246 2246 u32 phandle; 2247 2247 struct device_node *node; 2248 - struct of_device *ofdev; 2248 + struct platform_device *ofdev; 2249 2249 void *drvdata; 2250 2250 }; 2251 2251 ··· 2719 2719 .ndo_change_mtu = emac_change_mtu, 2720 2720 }; 2721 2721 2722 - static int __devinit emac_probe(struct of_device *ofdev, 2722 + static int __devinit emac_probe(struct platform_device *ofdev, 2723 2723 const struct of_device_id *match) 2724 2724 { 2725 2725 struct net_device *ndev; ··· 2941 2941 return err; 2942 2942 } 2943 2943 2944 - static int __devexit emac_remove(struct of_device *ofdev) 2944 + static int __devexit emac_remove(struct platform_device *ofdev) 2945 2945 { 2946 2946 struct emac_instance *dev = dev_get_drvdata(&ofdev->dev); 2947 2947
+6 -6
drivers/net/ibm_newemac/core.h
··· 170 170 struct net_device *ndev; 171 171 struct resource rsrc_regs; 172 172 struct emac_regs __iomem *emacp; 173 - struct of_device *ofdev; 173 + struct platform_device *ofdev; 174 174 struct device_node **blist; /* bootlist entry */ 175 175 176 176 /* MAL linkage */ 177 177 u32 mal_ph; 178 - struct of_device *mal_dev; 178 + struct platform_device *mal_dev; 179 179 u32 mal_rx_chan; 180 180 u32 mal_tx_chan; 181 181 struct mal_instance *mal; ··· 196 196 197 197 /* Shared MDIO if any */ 198 198 u32 mdio_ph; 199 - struct of_device *mdio_dev; 199 + struct platform_device *mdio_dev; 200 200 struct emac_instance *mdio_instance; 201 201 struct mutex mdio_lock; 202 202 203 203 /* ZMII infos if any */ 204 204 u32 zmii_ph; 205 205 u32 zmii_port; 206 - struct of_device *zmii_dev; 206 + struct platform_device *zmii_dev; 207 207 208 208 /* RGMII infos if any */ 209 209 u32 rgmii_ph; 210 210 u32 rgmii_port; 211 - struct of_device *rgmii_dev; 211 + struct platform_device *rgmii_dev; 212 212 213 213 /* TAH infos if any */ 214 214 u32 tah_ph; 215 215 u32 tah_port; 216 - struct of_device *tah_dev; 216 + struct platform_device *tah_dev; 217 217 218 218 /* IRQs */ 219 219 int wol_irq;
+2 -2
drivers/net/ibm_newemac/mal.c
··· 517 517 return regs + 1; 518 518 } 519 519 520 - static int __devinit mal_probe(struct of_device *ofdev, 520 + static int __devinit mal_probe(struct platform_device *ofdev, 521 521 const struct of_device_id *match) 522 522 { 523 523 struct mal_instance *mal; ··· 730 730 return err; 731 731 } 732 732 733 - static int __devexit mal_remove(struct of_device *ofdev) 733 + static int __devexit mal_remove(struct platform_device *ofdev) 734 734 { 735 735 struct mal_instance *mal = dev_get_drvdata(&ofdev->dev); 736 736
+1 -1
drivers/net/ibm_newemac/mal.h
··· 210 210 dma_addr_t bd_dma; 211 211 struct mal_descriptor *bd_virt; 212 212 213 - struct of_device *ofdev; 213 + struct platform_device *ofdev; 214 214 int index; 215 215 spinlock_t lock; 216 216
+9 -9
drivers/net/ibm_newemac/rgmii.c
··· 93 93 } 94 94 } 95 95 96 - int __devinit rgmii_attach(struct of_device *ofdev, int input, int mode) 96 + int __devinit rgmii_attach(struct platform_device *ofdev, int input, int mode) 97 97 { 98 98 struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); 99 99 struct rgmii_regs __iomem *p = dev->base; ··· 122 122 return 0; 123 123 } 124 124 125 - void rgmii_set_speed(struct of_device *ofdev, int input, int speed) 125 + void rgmii_set_speed(struct platform_device *ofdev, int input, int speed) 126 126 { 127 127 struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); 128 128 struct rgmii_regs __iomem *p = dev->base; ··· 144 144 mutex_unlock(&dev->lock); 145 145 } 146 146 147 - void rgmii_get_mdio(struct of_device *ofdev, int input) 147 + void rgmii_get_mdio(struct platform_device *ofdev, int input) 148 148 { 149 149 struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); 150 150 struct rgmii_regs __iomem *p = dev->base; ··· 165 165 DBG2(dev, " fer = 0x%08x\n", fer); 166 166 } 167 167 168 - void rgmii_put_mdio(struct of_device *ofdev, int input) 168 + void rgmii_put_mdio(struct platform_device *ofdev, int input) 169 169 { 170 170 struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); 171 171 struct rgmii_regs __iomem *p = dev->base; ··· 186 186 mutex_unlock(&dev->lock); 187 187 } 188 188 189 - void rgmii_detach(struct of_device *ofdev, int input) 189 + void rgmii_detach(struct platform_device *ofdev, int input) 190 190 { 191 191 struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); 192 192 struct rgmii_regs __iomem *p; ··· 206 206 mutex_unlock(&dev->lock); 207 207 } 208 208 209 - int rgmii_get_regs_len(struct of_device *ofdev) 209 + int rgmii_get_regs_len(struct platform_device *ofdev) 210 210 { 211 211 return sizeof(struct emac_ethtool_regs_subhdr) + 212 212 sizeof(struct rgmii_regs); 213 213 } 214 214 215 - void *rgmii_dump_regs(struct of_device *ofdev, void *buf) 215 + void *rgmii_dump_regs(struct platform_device *ofdev, void *buf) 216 216 { 217 217 struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); 218 218 struct emac_ethtool_regs_subhdr *hdr = buf; ··· 228 228 } 229 229 230 230 231 - static int __devinit rgmii_probe(struct of_device *ofdev, 231 + static int __devinit rgmii_probe(struct platform_device *ofdev, 232 232 const struct of_device_id *match) 233 233 { 234 234 struct device_node *np = ofdev->dev.of_node; ··· 293 293 return rc; 294 294 } 295 295 296 - static int __devexit rgmii_remove(struct of_device *ofdev) 296 + static int __devexit rgmii_remove(struct platform_device *ofdev) 297 297 { 298 298 struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); 299 299
+8 -8
drivers/net/ibm_newemac/rgmii.h
··· 51 51 int users; 52 52 53 53 /* OF device instance */ 54 - struct of_device *ofdev; 54 + struct platform_device *ofdev; 55 55 }; 56 56 57 57 #ifdef CONFIG_IBM_NEW_EMAC_RGMII 58 58 59 59 extern int rgmii_init(void); 60 60 extern void rgmii_exit(void); 61 - extern int rgmii_attach(struct of_device *ofdev, int input, int mode); 62 - extern void rgmii_detach(struct of_device *ofdev, int input); 63 - extern void rgmii_get_mdio(struct of_device *ofdev, int input); 64 - extern void rgmii_put_mdio(struct of_device *ofdev, int input); 65 - extern void rgmii_set_speed(struct of_device *ofdev, int input, int speed); 66 - extern int rgmii_get_regs_len(struct of_device *ofdev); 67 - extern void *rgmii_dump_regs(struct of_device *ofdev, void *buf); 61 + extern int rgmii_attach(struct platform_device *ofdev, int input, int mode); 62 + extern void rgmii_detach(struct platform_device *ofdev, int input); 63 + extern void rgmii_get_mdio(struct platform_device *ofdev, int input); 64 + extern void rgmii_put_mdio(struct platform_device *ofdev, int input); 65 + extern void rgmii_set_speed(struct platform_device *ofdev, int input, int speed); 66 + extern int rgmii_get_regs_len(struct platform_device *ofdev); 67 + extern void *rgmii_dump_regs(struct platform_device *ofdev, void *buf); 68 68 69 69 #else 70 70
+7 -7
drivers/net/ibm_newemac/tah.c
··· 23 23 #include "emac.h" 24 24 #include "core.h" 25 25 26 - int __devinit tah_attach(struct of_device *ofdev, int channel) 26 + int __devinit tah_attach(struct platform_device *ofdev, int channel) 27 27 { 28 28 struct tah_instance *dev = dev_get_drvdata(&ofdev->dev); 29 29 ··· 35 35 return 0; 36 36 } 37 37 38 - void tah_detach(struct of_device *ofdev, int channel) 38 + void tah_detach(struct platform_device *ofdev, int channel) 39 39 { 40 40 struct tah_instance *dev = dev_get_drvdata(&ofdev->dev); 41 41 ··· 44 44 mutex_unlock(&dev->lock); 45 45 } 46 46 47 - void tah_reset(struct of_device *ofdev) 47 + void tah_reset(struct platform_device *ofdev) 48 48 { 49 49 struct tah_instance *dev = dev_get_drvdata(&ofdev->dev); 50 50 struct tah_regs __iomem *p = dev->base; ··· 66 66 TAH_MR_DIG); 67 67 } 68 68 69 - int tah_get_regs_len(struct of_device *ofdev) 69 + int tah_get_regs_len(struct platform_device *ofdev) 70 70 { 71 71 return sizeof(struct emac_ethtool_regs_subhdr) + 72 72 sizeof(struct tah_regs); 73 73 } 74 74 75 - void *tah_dump_regs(struct of_device *ofdev, void *buf) 75 + void *tah_dump_regs(struct platform_device *ofdev, void *buf) 76 76 { 77 77 struct tah_instance *dev = dev_get_drvdata(&ofdev->dev); 78 78 struct emac_ethtool_regs_subhdr *hdr = buf; ··· 87 87 return regs + 1; 88 88 } 89 89 90 - static int __devinit tah_probe(struct of_device *ofdev, 90 + static int __devinit tah_probe(struct platform_device *ofdev, 91 91 const struct of_device_id *match) 92 92 { 93 93 struct device_node *np = ofdev->dev.of_node; ··· 139 139 return rc; 140 140 } 141 141 142 - static int __devexit tah_remove(struct of_device *ofdev) 142 + static int __devexit tah_remove(struct platform_device *ofdev) 143 143 { 144 144 struct tah_instance *dev = dev_get_drvdata(&ofdev->dev); 145 145
+6 -6
drivers/net/ibm_newemac/tah.h
··· 48 48 int users; 49 49 50 50 /* OF device instance */ 51 - struct of_device *ofdev; 51 + struct platform_device *ofdev; 52 52 }; 53 53 54 54 ··· 74 74 75 75 extern int tah_init(void); 76 76 extern void tah_exit(void); 77 - extern int tah_attach(struct of_device *ofdev, int channel); 78 - extern void tah_detach(struct of_device *ofdev, int channel); 79 - extern void tah_reset(struct of_device *ofdev); 80 - extern int tah_get_regs_len(struct of_device *ofdev); 81 - extern void *tah_dump_regs(struct of_device *ofdev, void *buf); 77 + extern int tah_attach(struct platform_device *ofdev, int channel); 78 + extern void tah_detach(struct platform_device *ofdev, int channel); 79 + extern void tah_reset(struct platform_device *ofdev); 80 + extern int tah_get_regs_len(struct platform_device *ofdev); 81 + extern void *tah_dump_regs(struct platform_device *ofdev, void *buf); 82 82 83 83 #else 84 84
+9 -9
drivers/net/ibm_newemac/zmii.c
··· 82 82 } 83 83 } 84 84 85 - int __devinit zmii_attach(struct of_device *ofdev, int input, int *mode) 85 + int __devinit zmii_attach(struct platform_device *ofdev, int input, int *mode) 86 86 { 87 87 struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); 88 88 struct zmii_regs __iomem *p = dev->base; ··· 148 148 return 0; 149 149 } 150 150 151 - void zmii_get_mdio(struct of_device *ofdev, int input) 151 + void zmii_get_mdio(struct platform_device *ofdev, int input) 152 152 { 153 153 struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); 154 154 u32 fer; ··· 161 161 out_be32(&dev->base->fer, fer | ZMII_FER_MDI(input)); 162 162 } 163 163 164 - void zmii_put_mdio(struct of_device *ofdev, int input) 164 + void zmii_put_mdio(struct platform_device *ofdev, int input) 165 165 { 166 166 struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); 167 167 ··· 170 170 } 171 171 172 172 173 - void zmii_set_speed(struct of_device *ofdev, int input, int speed) 173 + void zmii_set_speed(struct platform_device *ofdev, int input, int speed) 174 174 { 175 175 struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); 176 176 u32 ssr; ··· 191 191 mutex_unlock(&dev->lock); 192 192 } 193 193 194 - void zmii_detach(struct of_device *ofdev, int input) 194 + void zmii_detach(struct platform_device *ofdev, int input) 195 195 { 196 196 struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); 197 197 ··· 210 210 mutex_unlock(&dev->lock); 211 211 } 212 212 213 - int zmii_get_regs_len(struct of_device *ofdev) 213 + int zmii_get_regs_len(struct platform_device *ofdev) 214 214 { 215 215 return sizeof(struct emac_ethtool_regs_subhdr) + 216 216 sizeof(struct zmii_regs); 217 217 } 218 218 219 - void *zmii_dump_regs(struct of_device *ofdev, void *buf) 219 + void *zmii_dump_regs(struct platform_device *ofdev, void *buf) 220 220 { 221 221 struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); 222 222 struct emac_ethtool_regs_subhdr *hdr = buf; ··· 231 231 return regs + 1; 232 232 } 233 233 234 - static int __devinit zmii_probe(struct of_device *ofdev, 234 + static int __devinit zmii_probe(struct platform_device *ofdev, 235 235 const struct of_device_id *match) 236 236 { 237 237 struct device_node *np = ofdev->dev.of_node; ··· 286 286 return rc; 287 287 } 288 288 289 - static int __devexit zmii_remove(struct of_device *ofdev) 289 + static int __devexit zmii_remove(struct platform_device *ofdev) 290 290 { 291 291 struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); 292 292
+8 -8
drivers/net/ibm_newemac/zmii.h
··· 48 48 u32 fer_save; 49 49 50 50 /* OF device instance */ 51 - struct of_device *ofdev; 51 + struct platform_device *ofdev; 52 52 }; 53 53 54 54 #ifdef CONFIG_IBM_NEW_EMAC_ZMII 55 55 56 56 extern int zmii_init(void); 57 57 extern void zmii_exit(void); 58 - extern int zmii_attach(struct of_device *ofdev, int input, int *mode); 59 - extern void zmii_detach(struct of_device *ofdev, int input); 60 - extern void zmii_get_mdio(struct of_device *ofdev, int input); 61 - extern void zmii_put_mdio(struct of_device *ofdev, int input); 62 - extern void zmii_set_speed(struct of_device *ofdev, int input, int speed); 63 - extern int zmii_get_regs_len(struct of_device *ocpdev); 64 - extern void *zmii_dump_regs(struct of_device *ofdev, void *buf); 58 + extern int zmii_attach(struct platform_device *ofdev, int input, int *mode); 59 + extern void zmii_detach(struct platform_device *ofdev, int input); 60 + extern void zmii_get_mdio(struct platform_device *ofdev, int input); 61 + extern void zmii_put_mdio(struct platform_device *ofdev, int input); 62 + extern void zmii_set_speed(struct platform_device *ofdev, int input, int speed); 63 + extern int zmii_get_regs_len(struct platform_device *ocpdev); 64 + extern void *zmii_dump_regs(struct platform_device *ofdev, void *buf); 65 65 66 66 #else 67 67 # define zmii_init() 0
+4 -4
drivers/net/ll_temac_main.c
··· 159 159 * temac_dcr_setup - If the DMA is DCR based, then setup the address and 160 160 * I/O functions 161 161 */ 162 - static int temac_dcr_setup(struct temac_local *lp, struct of_device *op, 162 + static int temac_dcr_setup(struct temac_local *lp, struct platform_device *op, 163 163 struct device_node *np) 164 164 { 165 165 unsigned int dcrs; ··· 184 184 * temac_dcr_setup - This is a stub for when DCR is not supported, 185 185 * such as with MicroBlaze 186 186 */ 187 - static int temac_dcr_setup(struct temac_local *lp, struct of_device *op, 187 + static int temac_dcr_setup(struct temac_local *lp, struct platform_device *op, 188 188 struct device_node *np) 189 189 { 190 190 return -1; ··· 952 952 }; 953 953 954 954 static int __init 955 - temac_of_probe(struct of_device *op, const struct of_device_id *match) 955 + temac_of_probe(struct platform_device *op, const struct of_device_id *match) 956 956 { 957 957 struct device_node *np; 958 958 struct temac_local *lp; ··· 1094 1094 return rc; 1095 1095 } 1096 1096 1097 - static int __devexit temac_of_remove(struct of_device *op) 1097 + static int __devexit temac_of_remove(struct platform_device *op) 1098 1098 { 1099 1099 struct net_device *ndev = dev_get_drvdata(&op->dev); 1100 1100 struct temac_local *lp = netdev_priv(ndev);
+2 -2
drivers/net/myri_sbus.c
··· 926 926 .ndo_validate_addr = eth_validate_addr, 927 927 }; 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 platform_device *op, const struct of_device_id *match) 930 930 { 931 931 struct device_node *dp = op->dev.of_node; 932 932 static unsigned version_printed; ··· 1124 1124 return -ENODEV; 1125 1125 } 1126 1126 1127 - static int __devexit myri_sbus_remove(struct of_device *op) 1127 + static int __devexit myri_sbus_remove(struct platform_device *op) 1128 1128 { 1129 1129 struct myri_eth *mp = dev_get_drvdata(&op->dev); 1130 1130 struct net_device *net_dev = mp->dev;
+1 -1
drivers/net/myri_sbus.h
··· 288 288 struct myri_eeprom eeprom; /* Local copy of EEPROM. */ 289 289 unsigned int reg_size; /* Size of register space. */ 290 290 unsigned int shmem_base; /* Offset to shared ram. */ 291 - struct of_device *myri_op; /* Our OF device struct. */ 291 + struct platform_device *myri_op; /* Our OF device struct. */ 292 292 }; 293 293 294 294 /* We use this to acquire receive skb's that we can DMA directly into. */
+4 -4
drivers/net/niu.c
··· 9103 9103 static int __devinit niu_n2_irq_init(struct niu *np, u8 *ldg_num_map) 9104 9104 { 9105 9105 #ifdef CONFIG_SPARC64 9106 - struct of_device *op = np->op; 9106 + struct platform_device *op = np->op; 9107 9107 const u32 *int_prop; 9108 9108 int i; 9109 9109 ··· 9688 9688 9689 9689 static struct net_device * __devinit niu_alloc_and_init( 9690 9690 struct device *gen_dev, struct pci_dev *pdev, 9691 - struct of_device *op, const struct niu_ops *ops, 9691 + struct platform_device *op, const struct niu_ops *ops, 9692 9692 u8 port) 9693 9693 { 9694 9694 struct net_device *dev; ··· 10064 10064 .unmap_single = niu_phys_unmap_single, 10065 10065 }; 10066 10066 10067 - static int __devinit niu_of_probe(struct of_device *op, 10067 + static int __devinit niu_of_probe(struct platform_device *op, 10068 10068 const struct of_device_id *match) 10069 10069 { 10070 10070 union niu_parent_id parent_id; ··· 10179 10179 return err; 10180 10180 } 10181 10181 10182 - static int __devexit niu_of_remove(struct of_device *op) 10182 + static int __devexit niu_of_remove(struct platform_device *op) 10183 10183 { 10184 10184 struct net_device *dev = dev_get_drvdata(&op->dev); 10185 10185
+2 -2
drivers/net/phy/mdio-gpio.c
··· 188 188 189 189 #ifdef CONFIG_OF_GPIO 190 190 191 - static int __devinit mdio_ofgpio_probe(struct of_device *ofdev, 191 + static int __devinit mdio_ofgpio_probe(struct platform_device *ofdev, 192 192 const struct of_device_id *match) 193 193 { 194 194 struct mdio_gpio_platform_data *pdata; ··· 224 224 return -ENODEV; 225 225 } 226 226 227 - static int __devexit mdio_ofgpio_remove(struct of_device *ofdev) 227 + static int __devexit mdio_ofgpio_remove(struct platform_device *ofdev) 228 228 { 229 229 mdio_gpio_bus_destroy(&ofdev->dev); 230 230 kfree(ofdev->dev.platform_data);
+9 -9
drivers/net/sunbmac.c
··· 97 97 98 98 static void qec_init(struct bigmac *bp) 99 99 { 100 - struct of_device *qec_op = bp->qec_op; 100 + struct platform_device *qec_op = bp->qec_op; 101 101 void __iomem *gregs = bp->gregs; 102 102 u8 bsizes = bp->bigmac_bursts; 103 103 u32 regval; ··· 1083 1083 .ndo_validate_addr = eth_validate_addr, 1084 1084 }; 1085 1085 1086 - static int __devinit bigmac_ether_init(struct of_device *op, 1087 - struct of_device *qec_op) 1086 + static int __devinit bigmac_ether_init(struct platform_device *op, 1087 + struct platform_device *qec_op) 1088 1088 { 1089 1089 static int version_printed; 1090 1090 struct net_device *dev; ··· 1242 1242 /* QEC can be the parent of either QuadEthernet or a BigMAC. We want 1243 1243 * the latter. 1244 1244 */ 1245 - static int __devinit bigmac_sbus_probe(struct of_device *op, 1245 + static int __devinit bigmac_sbus_probe(struct platform_device *op, 1246 1246 const struct of_device_id *match) 1247 1247 { 1248 1248 struct device *parent = op->dev.parent; 1249 - struct of_device *qec_op; 1249 + struct platform_device *qec_op; 1250 1250 1251 - qec_op = to_of_device(parent); 1251 + qec_op = to_platform_device(parent); 1252 1252 1253 1253 return bigmac_ether_init(op, qec_op); 1254 1254 } 1255 1255 1256 - static int __devexit bigmac_sbus_remove(struct of_device *op) 1256 + static int __devexit bigmac_sbus_remove(struct platform_device *op) 1257 1257 { 1258 1258 struct bigmac *bp = dev_get_drvdata(&op->dev); 1259 1259 struct device *parent = op->dev.parent; 1260 1260 struct net_device *net_dev = bp->dev; 1261 - struct of_device *qec_op; 1261 + struct platform_device *qec_op; 1262 1262 1263 - qec_op = to_of_device(parent); 1263 + qec_op = to_platform_device(parent); 1264 1264 1265 1265 unregister_netdev(net_dev); 1266 1266
+2 -2
drivers/net/sunbmac.h
··· 329 329 unsigned int timer_ticks; 330 330 331 331 struct net_device_stats enet_stats; 332 - struct of_device *qec_op; 333 - struct of_device *bigmac_op; 332 + struct platform_device *qec_op; 333 + struct platform_device *bigmac_op; 334 334 struct net_device *dev; 335 335 }; 336 336
+11 -11
drivers/net/sunhme.c
··· 1591 1591 */ 1592 1592 #ifdef CONFIG_SBUS 1593 1593 if ((hp->happy_flags & HFLAG_PCI) == 0) { 1594 - struct of_device *op = hp->happy_dev; 1594 + struct platform_device *op = hp->happy_dev; 1595 1595 if (sbus_can_dma_64bit()) { 1596 1596 sbus_set_sbus64(&op->dev, 1597 1597 hp->happy_bursts); ··· 2480 2480 #ifdef CONFIG_SBUS 2481 2481 else { 2482 2482 const struct linux_prom_registers *regs; 2483 - struct of_device *op = hp->happy_dev; 2483 + struct platform_device *op = hp->happy_dev; 2484 2484 regs = of_get_property(op->dev.of_node, "regs", NULL); 2485 2485 if (regs) 2486 2486 sprintf(info->bus_info, "SBUS:%d", ··· 2515 2515 * 2516 2516 * Return NULL on failure. 2517 2517 */ 2518 - static struct quattro * __devinit quattro_sbus_find(struct of_device *child) 2518 + static struct quattro * __devinit quattro_sbus_find(struct platform_device *child) 2519 2519 { 2520 2520 struct device *parent = child->dev.parent; 2521 - struct of_device *op; 2521 + struct platform_device *op; 2522 2522 struct quattro *qp; 2523 2523 2524 - op = to_of_device(parent); 2524 + op = to_platform_device(parent); 2525 2525 qp = dev_get_drvdata(&op->dev); 2526 2526 if (qp) 2527 2527 return qp; ··· 2551 2551 struct quattro *qp; 2552 2552 2553 2553 for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) { 2554 - struct of_device *op = qp->quattro_dev; 2554 + struct platform_device *op = qp->quattro_dev; 2555 2555 int err, qfe_slot, skip = 0; 2556 2556 2557 2557 for (qfe_slot = 0; qfe_slot < 4; qfe_slot++) { ··· 2580 2580 struct quattro *qp; 2581 2581 2582 2582 for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) { 2583 - struct of_device *op = qp->quattro_dev; 2583 + struct platform_device *op = qp->quattro_dev; 2584 2584 int qfe_slot, skip = 0; 2585 2585 2586 2586 for (qfe_slot = 0; qfe_slot < 4; qfe_slot++) { ··· 2639 2639 }; 2640 2640 2641 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 platform_device *op, int is_qfe) 2643 2643 { 2644 2644 struct device_node *dp = op->dev.of_node, *sbus_dp; 2645 2645 struct quattro *qp = NULL; ··· 2648 2648 int i, qfe_slot = -1; 2649 2649 int err = -ENODEV; 2650 2650 2651 - sbus_dp = to_of_device(op->dev.parent)->dev.of_node; 2651 + sbus_dp = op->dev.parent->of_node; 2652 2652 2653 2653 /* We can match PCI devices too, do not accept those here. */ 2654 2654 if (strcmp(sbus_dp->name, "sbus")) ··· 3235 3235 #endif 3236 3236 3237 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 platform_device *op, const struct of_device_id *match) 3239 3239 { 3240 3240 struct device_node *dp = op->dev.of_node; 3241 3241 const char *model = of_get_property(dp, "model", NULL); ··· 3247 3247 return happy_meal_sbus_probe_one(op, is_qfe); 3248 3248 } 3249 3249 3250 - static int __devexit hme_sbus_remove(struct of_device *op) 3250 + static int __devexit hme_sbus_remove(struct platform_device *op) 3251 3251 { 3252 3252 struct happy_meal *hp = dev_get_drvdata(&op->dev); 3253 3253 struct net_device *net_dev = hp->dev;
+1 -1
drivers/net/sunhme.h
··· 407 407 void (*write_rxd)(struct happy_meal_rxd *, u32, u32); 408 408 #endif 409 409 410 - /* This is either an of_device or a pci_dev. */ 410 + /* This is either an platform_device or a pci_dev. */ 411 411 void *happy_dev; 412 412 struct device *dma_dev; 413 413
+10 -10
drivers/net/sunlance.c
··· 250 250 int rx_new, tx_new; 251 251 int rx_old, tx_old; 252 252 253 - struct of_device *ledma; /* If set this points to ledma */ 253 + struct platform_device *ledma; /* If set this points to ledma */ 254 254 char tpe; /* cable-selection is TPE */ 255 255 char auto_select; /* cable-selection by carrier */ 256 256 char burst_sizes; /* ledma SBus burst sizes */ ··· 265 265 char *name; 266 266 dma_addr_t init_block_dvma; 267 267 struct net_device *dev; /* Backpointer */ 268 - struct of_device *op; 269 - struct of_device *lebuffer; 268 + struct platform_device *op; 269 + struct platform_device *lebuffer; 270 270 struct timer_list multicast_timer; 271 271 }; 272 272 ··· 1272 1272 if (lp->lregs) 1273 1273 of_iounmap(&lp->op->resource[0], lp->lregs, LANCE_REG_SIZE); 1274 1274 if (lp->dregs) { 1275 - struct of_device *ledma = lp->ledma; 1275 + struct platform_device *ledma = lp->ledma; 1276 1276 1277 1277 of_iounmap(&ledma->resource[0], lp->dregs, 1278 1278 resource_size(&ledma->resource[0])); ··· 1319 1319 .ndo_validate_addr = eth_validate_addr, 1320 1320 }; 1321 1321 1322 - static int __devinit sparc_lance_probe_one(struct of_device *op, 1323 - struct of_device *ledma, 1324 - struct of_device *lebuffer) 1322 + static int __devinit sparc_lance_probe_one(struct platform_device *op, 1323 + struct platform_device *ledma, 1324 + struct platform_device *lebuffer) 1325 1325 { 1326 1326 struct device_node *dp = op->dev.of_node; 1327 1327 static unsigned version_printed; ··· 1503 1503 return -ENODEV; 1504 1504 } 1505 1505 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 platform_device *op, const struct of_device_id *match) 1507 1507 { 1508 - struct of_device *parent = to_of_device(op->dev.parent); 1508 + struct platform_device *parent = to_platform_device(op->dev.parent); 1509 1509 struct device_node *parent_dp = parent->dev.of_node; 1510 1510 int err; 1511 1511 ··· 1519 1519 return err; 1520 1520 } 1521 1521 1522 - static int __devexit sunlance_sbus_remove(struct of_device *op) 1522 + static int __devexit sunlance_sbus_remove(struct platform_device *op) 1523 1523 { 1524 1524 struct lance_private *lp = dev_get_drvdata(&op->dev); 1525 1525 struct net_device *net_dev = lp->dev;
+8 -8
drivers/net/sunqe.c
··· 689 689 { 690 690 const struct linux_prom_registers *regs; 691 691 struct sunqe *qep = netdev_priv(dev); 692 - struct of_device *op; 692 + struct platform_device *op; 693 693 694 694 strcpy(info->driver, "sunqe"); 695 695 strcpy(info->version, "3.0"); ··· 720 720 }; 721 721 722 722 /* This is only called once at boot time for each card probed. */ 723 - static void qec_init_once(struct sunqec *qecp, struct of_device *op) 723 + static void qec_init_once(struct sunqec *qecp, struct platform_device *op) 724 724 { 725 725 u8 bsizes = qecp->qec_bursts; 726 726 ··· 770 770 return bsizes; 771 771 } 772 772 773 - static struct sunqec * __devinit get_qec(struct of_device *child) 773 + static struct sunqec * __devinit get_qec(struct platform_device *child) 774 774 { 775 - struct of_device *op = to_of_device(child->dev.parent); 775 + struct platform_device *op = to_platform_device(child->dev.parent); 776 776 struct sunqec *qecp; 777 777 778 778 qecp = dev_get_drvdata(&op->dev); ··· 836 836 .ndo_validate_addr = eth_validate_addr, 837 837 }; 838 838 839 - static int __devinit qec_ether_init(struct of_device *op) 839 + static int __devinit qec_ether_init(struct platform_device *op) 840 840 { 841 841 static unsigned version_printed; 842 842 struct net_device *dev; ··· 941 941 return res; 942 942 } 943 943 944 - static int __devinit qec_sbus_probe(struct of_device *op, const struct of_device_id *match) 944 + static int __devinit qec_sbus_probe(struct platform_device *op, const struct of_device_id *match) 945 945 { 946 946 return qec_ether_init(op); 947 947 } 948 948 949 - static int __devexit qec_sbus_remove(struct of_device *op) 949 + static int __devexit qec_sbus_remove(struct platform_device *op) 950 950 { 951 951 struct sunqe *qp = dev_get_drvdata(&op->dev); 952 952 struct net_device *net_dev = qp->dev; ··· 997 997 998 998 while (root_qec_dev) { 999 999 struct sunqec *next = root_qec_dev->next_module; 1000 - struct of_device *op = root_qec_dev->op; 1000 + struct platform_device *op = root_qec_dev->op; 1001 1001 1002 1002 free_irq(op->archdata.irqs[0], (void *) root_qec_dev); 1003 1003 of_iounmap(&op->resource[0], root_qec_dev->gregs,
+2 -2
drivers/net/sunqe.h
··· 314 314 void __iomem *gregs; /* QEC Global Registers */ 315 315 struct sunqe *qes[4]; /* Each child MACE */ 316 316 unsigned int qec_bursts; /* Support burst sizes */ 317 - struct of_device *op; /* QEC's OF device */ 317 + struct platform_device *op; /* QEC's OF device */ 318 318 struct sunqec *next_module; /* List of all QECs in system */ 319 319 }; 320 320 ··· 342 342 __u32 buffers_dvma; /* DVMA visible address. */ 343 343 struct sunqec *parent; 344 344 u8 mconfig; /* Base MACE mconfig value */ 345 - struct of_device *op; /* QE's OF device struct */ 345 + struct platform_device *op; /* QE's OF device struct */ 346 346 struct net_device *dev; /* QE's netdevice struct */ 347 347 int channel; /* Who am I? */ 348 348 };
+4 -4
drivers/net/ucc_geth.c
··· 3601 3601 3602 3602 #ifdef CONFIG_PM 3603 3603 3604 - static int ucc_geth_suspend(struct of_device *ofdev, pm_message_t state) 3604 + static int ucc_geth_suspend(struct platform_device *ofdev, pm_message_t state) 3605 3605 { 3606 3606 struct net_device *ndev = dev_get_drvdata(&ofdev->dev); 3607 3607 struct ucc_geth_private *ugeth = netdev_priv(ndev); ··· 3629 3629 return 0; 3630 3630 } 3631 3631 3632 - static int ucc_geth_resume(struct of_device *ofdev) 3632 + static int ucc_geth_resume(struct platform_device *ofdev) 3633 3633 { 3634 3634 struct net_device *ndev = dev_get_drvdata(&ofdev->dev); 3635 3635 struct ucc_geth_private *ugeth = netdev_priv(ndev); ··· 3732 3732 #endif 3733 3733 }; 3734 3734 3735 - static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *match) 3735 + static int ucc_geth_probe(struct platform_device* ofdev, const struct of_device_id *match) 3736 3736 { 3737 3737 struct device *device = &ofdev->dev; 3738 3738 struct device_node *np = ofdev->dev.of_node; ··· 3954 3954 return 0; 3955 3955 } 3956 3956 3957 - static int ucc_geth_remove(struct of_device* ofdev) 3957 + static int ucc_geth_remove(struct platform_device* ofdev) 3958 3958 { 3959 3959 struct device *device = &ofdev->dev; 3960 3960 struct net_device *dev = dev_get_drvdata(device);
+3 -3
drivers/net/xilinx_emaclite.c
··· 1086 1086 * 1087 1087 * Return: Value of the parameter if the parameter is found, or 0 otherwise 1088 1088 */ 1089 - static bool get_bool(struct of_device *ofdev, const char *s) 1089 + static bool get_bool(struct platform_device *ofdev, const char *s) 1090 1090 { 1091 1091 u32 *p = (u32 *)of_get_property(ofdev->dev.of_node, s, NULL); 1092 1092 ··· 1115 1115 * Return: 0, if the driver is bound to the Emaclite device, or 1116 1116 * a negative error if there is failure. 1117 1117 */ 1118 - static int __devinit xemaclite_of_probe(struct of_device *ofdev, 1118 + static int __devinit xemaclite_of_probe(struct platform_device *ofdev, 1119 1119 const struct of_device_id *match) 1120 1120 { 1121 1121 struct resource r_irq; /* Interrupt resources */ ··· 1240 1240 * 1241 1241 * Return: 0, always. 1242 1242 */ 1243 - static int __devexit xemaclite_of_remove(struct of_device *of_dev) 1243 + static int __devexit xemaclite_of_remove(struct platform_device *of_dev) 1244 1244 { 1245 1245 struct device *dev = &of_dev->dev; 1246 1246 struct net_device *ndev = dev_get_drvdata(dev);
+1 -1
drivers/of/device.c
··· 14 14 * @ids: array of of device match structures to search in 15 15 * @dev: the of device structure to match against 16 16 * 17 - * Used by a driver to check whether an of_device present in the 17 + * Used by a driver to check whether an platform_device present in the 18 18 * system is in its list of supported devices. 19 19 */ 20 20 const struct of_device_id *of_match_device(const struct of_device_id *matches,
+2 -2
drivers/parport/parport_sunbpp.c
··· 286 286 .owner = THIS_MODULE, 287 287 }; 288 288 289 - static int __devinit bpp_probe(struct of_device *op, const struct of_device_id *match) 289 + static int __devinit bpp_probe(struct platform_device *op, const struct of_device_id *match) 290 290 { 291 291 struct parport_operations *ops; 292 292 struct bpp_regs __iomem *regs; ··· 351 351 return err; 352 352 } 353 353 354 - static int __devexit bpp_remove(struct of_device *op) 354 + static int __devexit bpp_remove(struct platform_device *op) 355 355 { 356 356 struct parport *p = dev_get_drvdata(&op->dev); 357 357 struct parport_operations *ops = p->ops;
+3 -3
drivers/pcmcia/electra_cf.c
··· 44 44 unsigned present:1; 45 45 unsigned active:1; 46 46 47 - struct of_device *ofdev; 47 + struct platform_device *ofdev; 48 48 unsigned long mem_phys; 49 49 void __iomem * mem_base; 50 50 unsigned long mem_size; ··· 181 181 .set_mem_map = electra_cf_set_mem_map, 182 182 }; 183 183 184 - static int __devinit electra_cf_probe(struct of_device *ofdev, 184 + static int __devinit electra_cf_probe(struct platform_device *ofdev, 185 185 const struct of_device_id *match) 186 186 { 187 187 struct device *device = &ofdev->dev; ··· 325 325 326 326 } 327 327 328 - static int __devexit electra_cf_remove(struct of_device *ofdev) 328 + static int __devexit electra_cf_remove(struct platform_device *ofdev) 329 329 { 330 330 struct device *device = &ofdev->dev; 331 331 struct electra_cf_socket *cf;
+2 -2
drivers/pcmcia/m8xx_pcmcia.c
··· 1149 1149 .set_mem_map = m8xx_set_mem_map, 1150 1150 }; 1151 1151 1152 - static int __init m8xx_probe(struct of_device *ofdev, 1152 + static int __init m8xx_probe(struct platform_device *ofdev, 1153 1153 const struct of_device_id *match) 1154 1154 { 1155 1155 struct pcmcia_win *w; ··· 1249 1249 return 0; 1250 1250 } 1251 1251 1252 - static int m8xx_remove(struct of_device *ofdev) 1252 + static int m8xx_remove(struct platform_device *ofdev) 1253 1253 { 1254 1254 u32 m, i; 1255 1255 struct pcmcia_win *w;
+2 -2
drivers/rtc/rtc-mpc5121.c
··· 268 268 .update_irq_enable = mpc5121_rtc_update_irq_enable, 269 269 }; 270 270 271 - static int __devinit mpc5121_rtc_probe(struct of_device *op, 271 + static int __devinit mpc5121_rtc_probe(struct platform_device *op, 272 272 const struct of_device_id *match) 273 273 { 274 274 struct mpc5121_rtc_data *rtc; ··· 338 338 return err; 339 339 } 340 340 341 - static int __devexit mpc5121_rtc_remove(struct of_device *op) 341 + static int __devexit mpc5121_rtc_remove(struct platform_device *op) 342 342 { 343 343 struct mpc5121_rtc_data *rtc = dev_get_drvdata(&op->dev); 344 344 struct mpc5121_rtc_regs __iomem *regs = rtc->regs;
+3 -3
drivers/sbus/char/bbc_envctrl.c
··· 443 443 return 0; 444 444 } 445 445 446 - static void attach_one_temp(struct bbc_i2c_bus *bp, struct of_device *op, 446 + static void attach_one_temp(struct bbc_i2c_bus *bp, struct platform_device *op, 447 447 int temp_idx) 448 448 { 449 449 struct bbc_cpu_temperature *tp; ··· 488 488 tp->fan_todo[FAN_CPU] = FAN_SAME; 489 489 } 490 490 491 - static void attach_one_fan(struct bbc_i2c_bus *bp, struct of_device *op, 491 + static void attach_one_fan(struct bbc_i2c_bus *bp, struct platform_device *op, 492 492 int fan_idx) 493 493 { 494 494 struct bbc_fan_control *fp; ··· 559 559 560 560 int bbc_envctrl_init(struct bbc_i2c_bus *bp) 561 561 { 562 - struct of_device *op; 562 + struct platform_device *op; 563 563 int temp_index = 0; 564 564 int fan_index = 0; 565 565 int devidx = 0;
+9 -9
drivers/sbus/char/bbc_i2c.c
··· 51 51 * The second controller also connects to the smartcard reader, if present. 52 52 */ 53 53 54 - static void set_device_claimage(struct bbc_i2c_bus *bp, struct of_device *op, int val) 54 + static void set_device_claimage(struct bbc_i2c_bus *bp, struct platform_device *op, int val) 55 55 { 56 56 int i; 57 57 ··· 66 66 #define claim_device(BP,ECHILD) set_device_claimage(BP,ECHILD,1) 67 67 #define release_device(BP,ECHILD) set_device_claimage(BP,ECHILD,0) 68 68 69 - struct of_device *bbc_i2c_getdev(struct bbc_i2c_bus *bp, int index) 69 + struct platform_device *bbc_i2c_getdev(struct bbc_i2c_bus *bp, int index) 70 70 { 71 - struct of_device *op = NULL; 71 + struct platform_device *op = NULL; 72 72 int curidx = 0, i; 73 73 74 74 for (i = 0; i < NUM_CHILDREN; i++) { ··· 86 86 return NULL; 87 87 } 88 88 89 - struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct of_device *op) 89 + struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct platform_device *op) 90 90 { 91 91 struct bbc_i2c_client *client; 92 92 const u32 *reg; ··· 114 114 void bbc_i2c_detach(struct bbc_i2c_client *client) 115 115 { 116 116 struct bbc_i2c_bus *bp = client->bp; 117 - struct of_device *op = client->op; 117 + struct platform_device *op = client->op; 118 118 119 119 release_device(bp, op); 120 120 kfree(client); ··· 297 297 writeb(I2C_PCF_IDLE, bp->i2c_control_regs + 0x0); 298 298 } 299 299 300 - static struct bbc_i2c_bus * __init attach_one_i2c(struct of_device *op, int index) 300 + static struct bbc_i2c_bus * __init attach_one_i2c(struct platform_device *op, int index) 301 301 { 302 302 struct bbc_i2c_bus *bp; 303 303 struct device_node *dp; ··· 330 330 for (dp = op->dev.of_node->child; 331 331 dp && entry < 8; 332 332 dp = dp->sibling, entry++) { 333 - struct of_device *child_op; 333 + struct platform_device *child_op; 334 334 335 335 child_op = of_find_device_by_node(dp); 336 336 bp->devs[entry].device = child_op; ··· 361 361 extern int bbc_envctrl_init(struct bbc_i2c_bus *bp); 362 362 extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp); 363 363 364 - static int __devinit bbc_i2c_probe(struct of_device *op, 364 + static int __devinit bbc_i2c_probe(struct platform_device *op, 365 365 const struct of_device_id *match) 366 366 { 367 367 struct bbc_i2c_bus *bp; ··· 386 386 return err; 387 387 } 388 388 389 - static int __devexit bbc_i2c_remove(struct of_device *op) 389 + static int __devexit bbc_i2c_remove(struct platform_device *op) 390 390 { 391 391 struct bbc_i2c_bus *bp = dev_get_drvdata(&op->dev); 392 392
+5 -5
drivers/sbus/char/bbc_i2c.h
··· 7 7 8 8 struct bbc_i2c_client { 9 9 struct bbc_i2c_bus *bp; 10 - struct of_device *op; 10 + struct platform_device *op; 11 11 int bus; 12 12 int address; 13 13 }; ··· 64 64 struct list_head temps; 65 65 struct list_head fans; 66 66 67 - struct of_device *op; 67 + struct platform_device *op; 68 68 struct { 69 - struct of_device *device; 69 + struct platform_device *device; 70 70 int client_claimed; 71 71 } devs[NUM_CHILDREN]; 72 72 }; 73 73 74 74 /* Probing and attachment. */ 75 - extern struct of_device *bbc_i2c_getdev(struct bbc_i2c_bus *, int); 76 - extern struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct of_device *); 75 + extern struct platform_device *bbc_i2c_getdev(struct bbc_i2c_bus *, int); 76 + extern struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct platform_device *); 77 77 extern void bbc_i2c_detach(struct bbc_i2c_client *); 78 78 79 79 /* Register read/write. NOTE: Blocking! */
+2 -2
drivers/sbus/char/display7seg.c
··· 170 170 .fops = &d7s_fops 171 171 }; 172 172 173 - static int __devinit d7s_probe(struct of_device *op, 173 + static int __devinit d7s_probe(struct platform_device *op, 174 174 const struct of_device_id *match) 175 175 { 176 176 struct device_node *opts; ··· 236 236 goto out; 237 237 } 238 238 239 - static int __devexit d7s_remove(struct of_device *op) 239 + static int __devexit d7s_remove(struct platform_device *op) 240 240 { 241 241 struct d7s *p = dev_get_drvdata(&op->dev); 242 242 u8 regs = readb(p->regs);
+2 -2
drivers/sbus/char/envctrl.c
··· 1027 1027 return 0; 1028 1028 } 1029 1029 1030 - static int __devinit envctrl_probe(struct of_device *op, 1030 + static int __devinit envctrl_probe(struct platform_device *op, 1031 1031 const struct of_device_id *match) 1032 1032 { 1033 1033 struct device_node *dp; ··· 1104 1104 return err; 1105 1105 } 1106 1106 1107 - static int __devexit envctrl_remove(struct of_device *op) 1107 + static int __devexit envctrl_remove(struct platform_device *op) 1108 1108 { 1109 1109 int index; 1110 1110
+2 -2
drivers/sbus/char/flash.c
··· 160 160 161 161 static struct miscdevice flash_dev = { FLASH_MINOR, "flash", &flash_fops }; 162 162 163 - static int __devinit flash_probe(struct of_device *op, 163 + static int __devinit flash_probe(struct platform_device *op, 164 164 const struct of_device_id *match) 165 165 { 166 166 struct device_node *dp = op->dev.of_node; ··· 192 192 return misc_register(&flash_dev); 193 193 } 194 194 195 - static int __devexit flash_remove(struct of_device *op) 195 + static int __devexit flash_remove(struct platform_device *op) 196 196 { 197 197 misc_deregister(&flash_dev); 198 198
+2 -2
drivers/sbus/char/uctrl.c
··· 348 348 349 349 } 350 350 351 - static int __devinit uctrl_probe(struct of_device *op, 351 + static int __devinit uctrl_probe(struct platform_device *op, 352 352 const struct of_device_id *match) 353 353 { 354 354 struct uctrl_driver *p; ··· 404 404 goto out; 405 405 } 406 406 407 - static int __devexit uctrl_remove(struct of_device *op) 407 + static int __devexit uctrl_remove(struct platform_device *op) 408 408 { 409 409 struct uctrl_driver *p = dev_get_drvdata(&op->dev); 410 410
+7 -7
drivers/scsi/qlogicpti.c
··· 704 704 705 705 static int __devinit qpti_map_regs(struct qlogicpti *qpti) 706 706 { 707 - struct of_device *op = qpti->op; 707 + struct platform_device *op = qpti->op; 708 708 709 709 qpti->qregs = of_ioremap(&op->resource[0], 0, 710 710 resource_size(&op->resource[0]), ··· 727 727 728 728 static int __devinit qpti_register_irq(struct qlogicpti *qpti) 729 729 { 730 - struct of_device *op = qpti->op; 730 + struct platform_device *op = qpti->op; 731 731 732 732 qpti->qhost->irq = qpti->irq = op->archdata.irqs[0]; 733 733 ··· 752 752 753 753 static void __devinit qpti_get_scsi_id(struct qlogicpti *qpti) 754 754 { 755 - struct of_device *op = qpti->op; 755 + struct platform_device *op = qpti->op; 756 756 struct device_node *dp; 757 757 758 758 dp = op->dev.of_node; ··· 773 773 774 774 static void qpti_get_bursts(struct qlogicpti *qpti) 775 775 { 776 - struct of_device *op = qpti->op; 776 + struct platform_device *op = qpti->op; 777 777 u8 bursts, bmask; 778 778 779 779 bursts = of_getintprop_default(op->dev.of_node, "burst-sizes", 0xff); ··· 806 806 */ 807 807 static int __devinit qpti_map_queues(struct qlogicpti *qpti) 808 808 { 809 - struct of_device *op = qpti->op; 809 + struct platform_device *op = qpti->op; 810 810 811 811 #define QSIZE(entries) (((entries) + 1) * QUEUE_ENTRY_LEN) 812 812 qpti->res_cpu = dma_alloc_coherent(&op->dev, ··· 1290 1290 .use_clustering = ENABLE_CLUSTERING, 1291 1291 }; 1292 1292 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 platform_device *op, const struct of_device_id *match) 1294 1294 { 1295 1295 struct scsi_host_template *tpnt = match->data; 1296 1296 struct device_node *dp = op->dev.of_node; ··· 1401 1401 return -ENODEV; 1402 1402 } 1403 1403 1404 - static int __devexit qpti_sbus_remove(struct of_device *op) 1404 + static int __devexit qpti_sbus_remove(struct platform_device *op) 1405 1405 { 1406 1406 struct qlogicpti *qpti = dev_get_drvdata(&op->dev); 1407 1407
+1 -1
drivers/scsi/qlogicpti.h
··· 342 342 u_int req_in_ptr; /* index of next request slot */ 343 343 u_int res_out_ptr; /* index of next result slot */ 344 344 long send_marker; /* must we send a marker? */ 345 - struct of_device *op; 345 + struct platform_device *op; 346 346 unsigned long __pad; 347 347 348 348 int cmd_count[MAX_TARGETS];
+22 -22
drivers/scsi/sun_esp.c
··· 44 44 }; 45 45 46 46 static int __devinit esp_sbus_setup_dma(struct esp *esp, 47 - struct of_device *dma_of) 47 + struct platform_device *dma_of) 48 48 { 49 49 esp->dma = dma_of; 50 50 ··· 81 81 82 82 static int __devinit esp_sbus_map_regs(struct esp *esp, int hme) 83 83 { 84 - struct of_device *op = esp->dev; 84 + struct platform_device *op = esp->dev; 85 85 struct resource *res; 86 86 87 87 /* On HME, two reg sets exist, first is DVMA, ··· 101 101 102 102 static int __devinit esp_sbus_map_command_block(struct esp *esp) 103 103 { 104 - struct of_device *op = esp->dev; 104 + struct platform_device *op = esp->dev; 105 105 106 106 esp->command_block = dma_alloc_coherent(&op->dev, 16, 107 107 &esp->command_block_dma, ··· 114 114 static int __devinit esp_sbus_register_irq(struct esp *esp) 115 115 { 116 116 struct Scsi_Host *host = esp->host; 117 - struct of_device *op = esp->dev; 117 + struct platform_device *op = esp->dev; 118 118 119 119 host->irq = op->archdata.irqs[0]; 120 120 return request_irq(host->irq, scsi_esp_intr, IRQF_SHARED, "ESP", esp); 121 121 } 122 122 123 - static void __devinit esp_get_scsi_id(struct esp *esp, struct of_device *espdma) 123 + static void __devinit esp_get_scsi_id(struct esp *esp, struct platform_device *espdma) 124 124 { 125 - struct of_device *op = esp->dev; 125 + struct platform_device *op = esp->dev; 126 126 struct device_node *dp; 127 127 128 128 dp = op->dev.of_node; ··· 144 144 145 145 static void __devinit esp_get_differential(struct esp *esp) 146 146 { 147 - struct of_device *op = esp->dev; 147 + struct platform_device *op = esp->dev; 148 148 struct device_node *dp; 149 149 150 150 dp = op->dev.of_node; ··· 156 156 157 157 static void __devinit esp_get_clock_params(struct esp *esp) 158 158 { 159 - struct of_device *op = esp->dev; 159 + struct platform_device *op = esp->dev; 160 160 struct device_node *bus_dp, *dp; 161 161 int fmhz; 162 162 ··· 170 170 esp->cfreq = fmhz; 171 171 } 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 platform_device *dma_of) 174 174 { 175 175 struct device_node *dma_dp = dma_of->dev.of_node; 176 - struct of_device *op = esp->dev; 176 + struct platform_device *op = esp->dev; 177 177 struct device_node *dp; 178 178 u8 bursts, val; 179 179 ··· 195 195 esp->bursts = bursts; 196 196 } 197 197 198 - static void __devinit esp_sbus_get_props(struct esp *esp, struct of_device *espdma) 198 + static void __devinit esp_sbus_get_props(struct esp *esp, struct platform_device *espdma) 199 199 { 200 200 esp_get_scsi_id(esp, espdma); 201 201 esp_get_differential(esp); ··· 216 216 static dma_addr_t sbus_esp_map_single(struct esp *esp, void *buf, 217 217 size_t sz, int dir) 218 218 { 219 - struct of_device *op = esp->dev; 219 + struct platform_device *op = esp->dev; 220 220 221 221 return dma_map_single(&op->dev, buf, sz, dir); 222 222 } ··· 224 224 static int sbus_esp_map_sg(struct esp *esp, struct scatterlist *sg, 225 225 int num_sg, int dir) 226 226 { 227 - struct of_device *op = esp->dev; 227 + struct platform_device *op = esp->dev; 228 228 229 229 return dma_map_sg(&op->dev, sg, num_sg, dir); 230 230 } ··· 232 232 static void sbus_esp_unmap_single(struct esp *esp, dma_addr_t addr, 233 233 size_t sz, int dir) 234 234 { 235 - struct of_device *op = esp->dev; 235 + struct platform_device *op = esp->dev; 236 236 237 237 dma_unmap_single(&op->dev, addr, sz, dir); 238 238 } ··· 240 240 static void sbus_esp_unmap_sg(struct esp *esp, struct scatterlist *sg, 241 241 int num_sg, int dir) 242 242 { 243 - struct of_device *op = esp->dev; 243 + struct platform_device *op = esp->dev; 244 244 245 245 dma_unmap_sg(&op->dev, sg, num_sg, dir); 246 246 } ··· 256 256 { 257 257 int can_do_burst16, can_do_burst32, can_do_burst64; 258 258 int can_do_sbus64, lim; 259 - struct of_device *op; 259 + struct platform_device *op; 260 260 u32 val; 261 261 262 262 can_do_burst16 = (esp->bursts & DMA_BURST16) != 0; ··· 487 487 .dma_error = sbus_esp_dma_error, 488 488 }; 489 489 490 - static int __devinit esp_sbus_probe_one(struct of_device *op, 491 - struct of_device *espdma, 490 + static int __devinit esp_sbus_probe_one(struct platform_device *op, 491 + struct platform_device *espdma, 492 492 int hme) 493 493 { 494 494 struct scsi_host_template *tpnt = &scsi_esp_template; ··· 562 562 return err; 563 563 } 564 564 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 platform_device *op, const struct of_device_id *match) 566 566 { 567 567 struct device_node *dma_node = NULL; 568 568 struct device_node *dp = op->dev.of_node; 569 - struct of_device *dma_of = NULL; 569 + struct platform_device *dma_of = NULL; 570 570 int hme = 0; 571 571 572 572 if (dp->parent && ··· 585 585 return esp_sbus_probe_one(op, dma_of, hme); 586 586 } 587 587 588 - static int __devexit esp_sbus_remove(struct of_device *op) 588 + static int __devexit esp_sbus_remove(struct platform_device *op) 589 589 { 590 590 struct esp *esp = dev_get_drvdata(&op->dev); 591 - struct of_device *dma_of = esp->dma; 591 + struct platform_device *dma_of = esp->dma; 592 592 unsigned int irq = esp->host->irq; 593 593 bool is_hme; 594 594 u32 val;
+1 -1
drivers/serial/apbuart.c
··· 551 551 /* OF Platform Driver */ 552 552 /* ======================================================================== */ 553 553 554 - static int __devinit apbuart_probe(struct of_device *op, 554 + static int __devinit apbuart_probe(struct platform_device *op, 555 555 const struct of_device_id *match) 556 556 { 557 557 int i = -1;
+2 -2
drivers/serial/cpm_uart/cpm_uart_core.c
··· 1340 1340 1341 1341 static int probe_index; 1342 1342 1343 - static int __devinit cpm_uart_probe(struct of_device *ofdev, 1343 + static int __devinit cpm_uart_probe(struct platform_device *ofdev, 1344 1344 const struct of_device_id *match) 1345 1345 { 1346 1346 int index = probe_index++; ··· 1364 1364 return uart_add_one_port(&cpm_reg, &pinfo->port); 1365 1365 } 1366 1366 1367 - static int __devexit cpm_uart_remove(struct of_device *ofdev) 1367 + static int __devexit cpm_uart_remove(struct platform_device *ofdev) 1368 1368 { 1369 1369 struct uart_cpm_port *pinfo = dev_get_drvdata(&ofdev->dev); 1370 1370 return uart_remove_one_port(&cpm_reg, &pinfo->port);
+4 -4
drivers/serial/mpc52xx_uart.c
··· 1298 1298 }; 1299 1299 1300 1300 static int __devinit 1301 - mpc52xx_uart_of_probe(struct of_device *op, const struct of_device_id *match) 1301 + mpc52xx_uart_of_probe(struct platform_device *op, const struct of_device_id *match) 1302 1302 { 1303 1303 int idx = -1; 1304 1304 unsigned int uartclk; ··· 1369 1369 } 1370 1370 1371 1371 static int 1372 - mpc52xx_uart_of_remove(struct of_device *op) 1372 + mpc52xx_uart_of_remove(struct platform_device *op) 1373 1373 { 1374 1374 struct uart_port *port = dev_get_drvdata(&op->dev); 1375 1375 dev_set_drvdata(&op->dev, NULL); ··· 1382 1382 1383 1383 #ifdef CONFIG_PM 1384 1384 static int 1385 - mpc52xx_uart_of_suspend(struct of_device *op, pm_message_t state) 1385 + mpc52xx_uart_of_suspend(struct platform_device *op, pm_message_t state) 1386 1386 { 1387 1387 struct uart_port *port = (struct uart_port *) dev_get_drvdata(&op->dev); 1388 1388 ··· 1393 1393 } 1394 1394 1395 1395 static int 1396 - mpc52xx_uart_of_resume(struct of_device *op) 1396 + mpc52xx_uart_of_resume(struct platform_device *op) 1397 1397 { 1398 1398 struct uart_port *port = (struct uart_port *) dev_get_drvdata(&op->dev); 1399 1399
+1 -1
drivers/serial/nwpserial.c
··· 344 344 345 345 mutex_lock(&nwpserial_mutex); 346 346 347 - dn = to_of_device(port->dev)->dev.of_node; 347 + dn = port->dev->of_node; 348 348 if (dn == NULL) 349 349 goto out; 350 350
+3 -3
drivers/serial/of_serial.c
··· 27 27 /* 28 28 * Fill a struct uart_port for a given device node 29 29 */ 30 - static int __devinit of_platform_serial_setup(struct of_device *ofdev, 30 + static int __devinit of_platform_serial_setup(struct platform_device *ofdev, 31 31 int type, struct uart_port *port) 32 32 { 33 33 struct resource resource; ··· 80 80 /* 81 81 * Try to register a serial port 82 82 */ 83 - static int __devinit of_platform_serial_probe(struct of_device *ofdev, 83 + static int __devinit of_platform_serial_probe(struct platform_device *ofdev, 84 84 const struct of_device_id *id) 85 85 { 86 86 struct of_serial_info *info; ··· 134 134 /* 135 135 * Release a line 136 136 */ 137 - static int of_platform_serial_remove(struct of_device *ofdev) 137 + static int of_platform_serial_remove(struct platform_device *ofdev) 138 138 { 139 139 struct of_serial_info *info = dev_get_drvdata(&ofdev->dev); 140 140 switch (info->type) {
+2 -2
drivers/serial/sunhv.c
··· 519 519 .data = &sunhv_reg, 520 520 }; 521 521 522 - static int __devinit hv_probe(struct of_device *op, const struct of_device_id *match) 522 + static int __devinit hv_probe(struct platform_device *op, const struct of_device_id *match) 523 523 { 524 524 struct uart_port *port; 525 525 unsigned long minor; ··· 598 598 return err; 599 599 } 600 600 601 - static int __devexit hv_remove(struct of_device *dev) 601 + static int __devexit hv_remove(struct platform_device *dev) 602 602 { 603 603 struct uart_port *port = dev_get_drvdata(&dev->dev); 604 604
+4 -4
drivers/serial/sunsab.c
··· 883 883 printk("Console: ttyS%d (SAB82532)\n", 884 884 (sunsab_reg.minor - 64) + con->index); 885 885 886 - sunserial_console_termios(con, to_of_device(up->port.dev)->dev.of_node); 886 + sunserial_console_termios(con, up->port.dev->of_node); 887 887 888 888 switch (con->cflag & CBAUD) { 889 889 case B150: baud = 150; break; ··· 954 954 #endif 955 955 956 956 static int __devinit sunsab_init_one(struct uart_sunsab_port *up, 957 - struct of_device *op, 957 + struct platform_device *op, 958 958 unsigned long offset, 959 959 int line) 960 960 { ··· 1006 1006 return 0; 1007 1007 } 1008 1008 1009 - static int __devinit sab_probe(struct of_device *op, const struct of_device_id *match) 1009 + static int __devinit sab_probe(struct platform_device *op, const struct of_device_id *match) 1010 1010 { 1011 1011 static int inst; 1012 1012 struct uart_sunsab_port *up; ··· 1062 1062 return err; 1063 1063 } 1064 1064 1065 - static int __devexit sab_remove(struct of_device *op) 1065 + static int __devexit sab_remove(struct platform_device *op) 1066 1066 { 1067 1067 struct uart_sunsab_port *up = dev_get_drvdata(&op->dev); 1068 1068
+4 -4
drivers/serial/sunsu.c
··· 1200 1200 return -ENODEV; 1201 1201 1202 1202 printk("%s: %s port at %llx, irq %u\n", 1203 - to_of_device(up->port.dev)->dev.of_node->full_name, 1203 + up->port.dev->of_node->full_name, 1204 1204 (up->su_type == SU_PORT_KBD) ? "Keyboard" : "Mouse", 1205 1205 (unsigned long long) up->port.mapbase, 1206 1206 up->port.irq); ··· 1352 1352 spin_lock_init(&port->lock); 1353 1353 1354 1354 /* Get firmware console settings. */ 1355 - sunserial_console_termios(co, to_of_device(port->dev)->dev.of_node); 1355 + sunserial_console_termios(co, port->dev->of_node); 1356 1356 1357 1357 memset(&termios, 0, sizeof(struct ktermios)); 1358 1358 termios.c_cflag = co->cflag; ··· 1406 1406 return SU_PORT_PORT; 1407 1407 } 1408 1408 1409 - static int __devinit su_probe(struct of_device *op, const struct of_device_id *match) 1409 + static int __devinit su_probe(struct platform_device *op, const struct of_device_id *match) 1410 1410 { 1411 1411 static int inst; 1412 1412 struct device_node *dp = op->dev.of_node; ··· 1497 1497 return err; 1498 1498 } 1499 1499 1500 - static int __devexit su_remove(struct of_device *op) 1500 + static int __devexit su_remove(struct platform_device *op) 1501 1501 { 1502 1502 struct uart_sunsu_port *up = dev_get_drvdata(&op->dev); 1503 1503 bool kbdms = false;
+3 -3
drivers/serial/sunzilog.c
··· 1230 1230 (sunzilog_reg.minor - 64) + con->index, con->index); 1231 1231 1232 1232 /* Get firmware console settings. */ 1233 - sunserial_console_termios(con, to_of_device(up->port.dev)->dev.of_node); 1233 + sunserial_console_termios(con, up->port.dev->of_node); 1234 1234 1235 1235 /* Firmware console speed is limited to 150-->38400 baud so 1236 1236 * this hackish cflag thing is OK. ··· 1399 1399 1400 1400 static int zilog_irq = -1; 1401 1401 1402 - static int __devinit zs_probe(struct of_device *op, const struct of_device_id *match) 1402 + static int __devinit zs_probe(struct platform_device *op, const struct of_device_id *match) 1403 1403 { 1404 1404 static int kbm_inst, uart_inst; 1405 1405 int inst; ··· 1516 1516 uart_remove_one_port(&sunzilog_reg, &up->port); 1517 1517 } 1518 1518 1519 - static int __devexit zs_remove(struct of_device *op) 1519 + static int __devexit zs_remove(struct platform_device *op) 1520 1520 { 1521 1521 struct uart_sunzilog_port *up = dev_get_drvdata(&op->dev); 1522 1522 struct zilog_layout __iomem *regs;
+2 -2
drivers/serial/uartlite.c
··· 584 584 */ 585 585 #if defined(CONFIG_OF) && (defined(CONFIG_PPC32) || defined(CONFIG_MICROBLAZE)) 586 586 static int __devinit 587 - ulite_of_probe(struct of_device *op, const struct of_device_id *match) 587 + ulite_of_probe(struct platform_device *op, const struct of_device_id *match) 588 588 { 589 589 struct resource res; 590 590 const unsigned int *id; ··· 605 605 return ulite_assign(&op->dev, id ? *id : -1, res.start, irq); 606 606 } 607 607 608 - static int __devexit ulite_of_remove(struct of_device *op) 608 + static int __devexit ulite_of_remove(struct platform_device *op) 609 609 { 610 610 return ulite_release(&op->dev); 611 611 }
+2 -2
drivers/serial/ucc_uart.c
··· 1194 1194 release_firmware(fw); 1195 1195 } 1196 1196 1197 - static int ucc_uart_probe(struct of_device *ofdev, 1197 + static int ucc_uart_probe(struct platform_device *ofdev, 1198 1198 const struct of_device_id *match) 1199 1199 { 1200 1200 struct device_node *np = ofdev->dev.of_node; ··· 1462 1462 return 0; 1463 1463 } 1464 1464 1465 - static int ucc_uart_remove(struct of_device *ofdev) 1465 + static int ucc_uart_remove(struct platform_device *ofdev) 1466 1466 { 1467 1467 struct uart_qe_port *qe_port = dev_get_drvdata(&ofdev->dev); 1468 1468
+2 -2
drivers/spi/mpc512x_psc_spi.c
··· 507 507 return 0; 508 508 } 509 509 510 - static int __init mpc512x_psc_spi_of_probe(struct of_device *op, 510 + static int __init mpc512x_psc_spi_of_probe(struct platform_device *op, 511 511 const struct of_device_id *match) 512 512 { 513 513 const u32 *regaddr_p; ··· 539 539 irq_of_parse_and_map(op->dev.of_node, 0), id); 540 540 } 541 541 542 - static int __exit mpc512x_psc_spi_of_remove(struct of_device *op) 542 + static int __exit mpc512x_psc_spi_of_remove(struct platform_device *op) 543 543 { 544 544 return mpc512x_psc_spi_do_remove(&op->dev); 545 545 }
+2 -2
drivers/spi/mpc52xx_psc_spi.c
··· 465 465 return 0; 466 466 } 467 467 468 - static int __init mpc52xx_psc_spi_of_probe(struct of_device *op, 468 + static int __init mpc52xx_psc_spi_of_probe(struct platform_device *op, 469 469 const struct of_device_id *match) 470 470 { 471 471 const u32 *regaddr_p; ··· 495 495 irq_of_parse_and_map(op->dev.of_node, 0), id); 496 496 } 497 497 498 - static int __exit mpc52xx_psc_spi_of_remove(struct of_device *op) 498 + static int __exit mpc52xx_psc_spi_of_remove(struct platform_device *op) 499 499 { 500 500 return mpc52xx_psc_spi_do_remove(&op->dev); 501 501 }
+2 -2
drivers/spi/mpc52xx_spi.c
··· 390 390 /* 391 391 * OF Platform Bus Binding 392 392 */ 393 - static int __devinit mpc52xx_spi_probe(struct of_device *op, 393 + static int __devinit mpc52xx_spi_probe(struct platform_device *op, 394 394 const struct of_device_id *match) 395 395 { 396 396 struct spi_master *master; ··· 530 530 return rc; 531 531 } 532 532 533 - static int __devexit mpc52xx_spi_remove(struct of_device *op) 533 + static int __devexit mpc52xx_spi_remove(struct platform_device *op) 534 534 { 535 535 struct spi_master *master = dev_get_drvdata(&op->dev); 536 536 struct mpc52xx_spi *ms = spi_master_get_devdata(master);
+2 -2
drivers/spi/spi_mpc8xxx.c
··· 1236 1236 return 0; 1237 1237 } 1238 1238 1239 - static int __devinit of_mpc8xxx_spi_probe(struct of_device *ofdev, 1239 + static int __devinit of_mpc8xxx_spi_probe(struct platform_device *ofdev, 1240 1240 const struct of_device_id *ofid) 1241 1241 { 1242 1242 struct device *dev = &ofdev->dev; ··· 1308 1308 return ret; 1309 1309 } 1310 1310 1311 - static int __devexit of_mpc8xxx_spi_remove(struct of_device *ofdev) 1311 + static int __devexit of_mpc8xxx_spi_remove(struct platform_device *ofdev) 1312 1312 { 1313 1313 int ret; 1314 1314
+3 -3
drivers/spi/spi_ppc4xx.c
··· 388 388 } 389 389 390 390 /* 391 - * of_device layer stuff... 391 + * platform_device layer stuff... 392 392 */ 393 - static int __init spi_ppc4xx_of_probe(struct of_device *op, 393 + static int __init spi_ppc4xx_of_probe(struct platform_device *op, 394 394 const struct of_device_id *match) 395 395 { 396 396 struct ppc4xx_spi *hw; ··· 565 565 return ret; 566 566 } 567 567 568 - static int __exit spi_ppc4xx_of_remove(struct of_device *op) 568 + static int __exit spi_ppc4xx_of_remove(struct platform_device *op) 569 569 { 570 570 struct spi_master *master = dev_get_drvdata(&op->dev); 571 571 struct ppc4xx_spi *hw = spi_master_get_devdata(master);
+3 -3
drivers/spi/xilinx_spi_of.c
··· 38 38 #include "xilinx_spi.h" 39 39 40 40 41 - static int __devinit xilinx_spi_of_probe(struct of_device *ofdev, 41 + static int __devinit xilinx_spi_of_probe(struct platform_device *ofdev, 42 42 const struct of_device_id *match) 43 43 { 44 44 struct spi_master *master; ··· 84 84 return 0; 85 85 } 86 86 87 - static int __devexit xilinx_spi_remove(struct of_device *ofdev) 87 + static int __devexit xilinx_spi_remove(struct platform_device *ofdev) 88 88 { 89 89 xilinx_spi_deinit(dev_get_drvdata(&ofdev->dev)); 90 90 dev_set_drvdata(&ofdev->dev, 0); ··· 93 93 return 0; 94 94 } 95 95 96 - static int __exit xilinx_spi_of_remove(struct of_device *op) 96 + static int __exit xilinx_spi_of_remove(struct platform_device *op) 97 97 { 98 98 return xilinx_spi_remove(op); 99 99 }
+5 -5
drivers/usb/gadget/fsl_qe_udc.c
··· 2398 2398 EXPORT_SYMBOL(usb_gadget_unregister_driver); 2399 2399 2400 2400 /* udc structure's alloc and setup, include ep-param alloc */ 2401 - static struct qe_udc __devinit *qe_udc_config(struct of_device *ofdev) 2401 + static struct qe_udc __devinit *qe_udc_config(struct platform_device *ofdev) 2402 2402 { 2403 2403 struct qe_udc *udc; 2404 2404 struct device_node *np = ofdev->dev.of_node; ··· 2523 2523 } 2524 2524 2525 2525 /* Driver probe functions */ 2526 - static int __devinit qe_udc_probe(struct of_device *ofdev, 2526 + static int __devinit qe_udc_probe(struct platform_device *ofdev, 2527 2527 const struct of_device_id *match) 2528 2528 { 2529 2529 struct device_node *np = ofdev->dev.of_node; ··· 2679 2679 } 2680 2680 2681 2681 #ifdef CONFIG_PM 2682 - static int qe_udc_suspend(struct of_device *dev, pm_message_t state) 2682 + static int qe_udc_suspend(struct platform_device *dev, pm_message_t state) 2683 2683 { 2684 2684 return -ENOTSUPP; 2685 2685 } 2686 2686 2687 - static int qe_udc_resume(struct of_device *dev) 2687 + static int qe_udc_resume(struct platform_device *dev) 2688 2688 { 2689 2689 return -ENOTSUPP; 2690 2690 } 2691 2691 #endif 2692 2692 2693 - static int __devexit qe_udc_remove(struct of_device *ofdev) 2693 + static int __devexit qe_udc_remove(struct platform_device *ofdev) 2694 2694 { 2695 2695 struct qe_ep *ep; 2696 2696 unsigned int size;
+3 -3
drivers/usb/host/ehci-ppc-of.c
··· 106 106 107 107 108 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 platform_device *op, const struct of_device_id *match) 110 110 { 111 111 struct device_node *dn = op->dev.of_node; 112 112 struct usb_hcd *hcd; ··· 210 210 } 211 211 212 212 213 - static int ehci_hcd_ppc_of_remove(struct of_device *op) 213 + static int ehci_hcd_ppc_of_remove(struct platform_device *op) 214 214 { 215 215 struct usb_hcd *hcd = dev_get_drvdata(&op->dev); 216 216 struct ehci_hcd *ehci = hcd_to_ehci(hcd); ··· 253 253 } 254 254 255 255 256 - static int ehci_hcd_ppc_of_shutdown(struct of_device *op) 256 + static int ehci_hcd_ppc_of_shutdown(struct platform_device *op) 257 257 { 258 258 struct usb_hcd *hcd = dev_get_drvdata(&op->dev); 259 259
+6 -6
drivers/usb/host/ehci-xilinx-of.c
··· 140 140 141 141 /** 142 142 * ehci_hcd_xilinx_of_probe - Probe method for the USB host controller 143 - * @op: pointer to the of_device to which the host controller bound 143 + * @op: pointer to the platform_device bound to the host controller 144 144 * @match: pointer to of_device_id structure, not used 145 145 * 146 146 * This function requests resources and sets up appropriate properties for the ··· 149 149 * entry, and sets an appropriate value for hcd->has_tt. 150 150 */ 151 151 static int __devinit 152 - ehci_hcd_xilinx_of_probe(struct of_device *op, const struct of_device_id *match) 152 + ehci_hcd_xilinx_of_probe(struct platform_device *op, const struct of_device_id *match) 153 153 { 154 154 struct device_node *dn = op->dev.of_node; 155 155 struct usb_hcd *hcd; ··· 242 242 243 243 /** 244 244 * ehci_hcd_xilinx_of_remove - shutdown hcd and release resources 245 - * @op: pointer to of_device structure that is to be removed 245 + * @op: pointer to platform_device structure that is to be removed 246 246 * 247 247 * Remove the hcd structure, and release resources that has been requested 248 248 * during probe. 249 249 */ 250 - static int ehci_hcd_xilinx_of_remove(struct of_device *op) 250 + static int ehci_hcd_xilinx_of_remove(struct platform_device *op) 251 251 { 252 252 struct usb_hcd *hcd = dev_get_drvdata(&op->dev); 253 253 dev_set_drvdata(&op->dev, NULL); ··· 266 266 267 267 /** 268 268 * ehci_hcd_xilinx_of_shutdown - shutdown the hcd 269 - * @op: pointer to of_device structure that is to be removed 269 + * @op: pointer to platform_device structure that is to be removed 270 270 * 271 271 * Properly shutdown the hcd, call driver's shutdown routine. 272 272 */ 273 - static int ehci_hcd_xilinx_of_shutdown(struct of_device *op) 273 + static int ehci_hcd_xilinx_of_shutdown(struct platform_device *op) 274 274 { 275 275 struct usb_hcd *hcd = dev_get_drvdata(&op->dev); 276 276
+2 -2
drivers/usb/host/fhci-hcd.c
··· 561 561 .hub_control = fhci_hub_control, 562 562 }; 563 563 564 - static int __devinit of_fhci_probe(struct of_device *ofdev, 564 + static int __devinit of_fhci_probe(struct platform_device *ofdev, 565 565 const struct of_device_id *ofid) 566 566 { 567 567 struct device *dev = &ofdev->dev; ··· 801 801 return 0; 802 802 } 803 803 804 - static int __devexit of_fhci_remove(struct of_device *ofdev) 804 + static int __devexit of_fhci_remove(struct platform_device *ofdev) 805 805 { 806 806 return fhci_remove(&ofdev->dev); 807 807 }
+2 -2
drivers/usb/host/isp1760-if.c
··· 27 27 #endif 28 28 29 29 #ifdef CONFIG_PPC_OF 30 - static int of_isp1760_probe(struct of_device *dev, 30 + static int of_isp1760_probe(struct platform_device *dev, 31 31 const struct of_device_id *match) 32 32 { 33 33 struct usb_hcd *hcd; ··· 95 95 return ret; 96 96 } 97 97 98 - static int of_isp1760_remove(struct of_device *dev) 98 + static int of_isp1760_remove(struct platform_device *dev) 99 99 { 100 100 struct usb_hcd *hcd = dev_get_drvdata(&dev->dev); 101 101
+3 -3
drivers/usb/host/ohci-ppc-of.c
··· 81 81 82 82 83 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 platform_device *op, const struct of_device_id *match) 85 85 { 86 86 struct device_node *dn = op->dev.of_node; 87 87 struct usb_hcd *hcd; ··· 183 183 return rv; 184 184 } 185 185 186 - static int ohci_hcd_ppc_of_remove(struct of_device *op) 186 + static int ohci_hcd_ppc_of_remove(struct platform_device *op) 187 187 { 188 188 struct usb_hcd *hcd = dev_get_drvdata(&op->dev); 189 189 dev_set_drvdata(&op->dev, NULL); ··· 201 201 return 0; 202 202 } 203 203 204 - static int ohci_hcd_ppc_of_shutdown(struct of_device *op) 204 + static int ohci_hcd_ppc_of_shutdown(struct platform_device *op) 205 205 { 206 206 struct usb_hcd *hcd = dev_get_drvdata(&op->dev); 207 207
+2 -2
drivers/video/bw2.c
··· 273 273 return 0; 274 274 } 275 275 276 - static int __devinit bw2_probe(struct of_device *op, const struct of_device_id *match) 276 + static int __devinit bw2_probe(struct platform_device *op, const struct of_device_id *match) 277 277 { 278 278 struct device_node *dp = op->dev.of_node; 279 279 struct fb_info *info; ··· 350 350 return err; 351 351 } 352 352 353 - static int __devexit bw2_remove(struct of_device *op) 353 + static int __devexit bw2_remove(struct platform_device *op) 354 354 { 355 355 struct fb_info *info = dev_get_drvdata(&op->dev); 356 356 struct bw2_par *par = info->par;
+3 -3
drivers/video/cg14.c
··· 446 446 { .size = 0 } 447 447 }; 448 448 449 - static void cg14_unmap_regs(struct of_device *op, struct fb_info *info, 449 + static void cg14_unmap_regs(struct platform_device *op, struct fb_info *info, 450 450 struct cg14_par *par) 451 451 { 452 452 if (par->regs) ··· 463 463 info->screen_base, info->fix.smem_len); 464 464 } 465 465 466 - static int __devinit cg14_probe(struct of_device *op, const struct of_device_id *match) 466 + static int __devinit cg14_probe(struct platform_device *op, const struct of_device_id *match) 467 467 { 468 468 struct device_node *dp = op->dev.of_node; 469 469 struct fb_info *info; ··· 570 570 return err; 571 571 } 572 572 573 - static int __devexit cg14_remove(struct of_device *op) 573 + static int __devexit cg14_remove(struct platform_device *op) 574 574 { 575 575 struct fb_info *info = dev_get_drvdata(&op->dev); 576 576 struct cg14_par *par = info->par;
+2 -2
drivers/video/cg3.c
··· 346 346 return 0; 347 347 } 348 348 349 - static int __devinit cg3_probe(struct of_device *op, 349 + static int __devinit cg3_probe(struct platform_device *op, 350 350 const struct of_device_id *match) 351 351 { 352 352 struct device_node *dp = op->dev.of_node; ··· 433 433 return err; 434 434 } 435 435 436 - static int __devexit cg3_remove(struct of_device *op) 436 + static int __devexit cg3_remove(struct platform_device *op) 437 437 { 438 438 struct fb_info *info = dev_get_drvdata(&op->dev); 439 439 struct cg3_par *par = info->par;
+3 -3
drivers/video/cg6.c
··· 718 718 sbus_writel(info->var.yres - 1, &fbc->clipmaxy); 719 719 } 720 720 721 - static void cg6_unmap_regs(struct of_device *op, struct fb_info *info, 721 + static void cg6_unmap_regs(struct platform_device *op, struct fb_info *info, 722 722 struct cg6_par *par) 723 723 { 724 724 if (par->fbc) ··· 737 737 info->fix.smem_len); 738 738 } 739 739 740 - static int __devinit cg6_probe(struct of_device *op, 740 + static int __devinit cg6_probe(struct platform_device *op, 741 741 const struct of_device_id *match) 742 742 { 743 743 struct device_node *dp = op->dev.of_node; ··· 827 827 return err; 828 828 } 829 829 830 - static int __devexit cg6_remove(struct of_device *op) 830 + static int __devexit cg6_remove(struct platform_device *op) 831 831 { 832 832 struct fb_info *info = dev_get_drvdata(&op->dev); 833 833 struct cg6_par *par = info->par;
+2 -2
drivers/video/ffb.c
··· 893 893 info->fix.accel = FB_ACCEL_SUN_CREATOR; 894 894 } 895 895 896 - static int __devinit ffb_probe(struct of_device *op, 896 + static int __devinit ffb_probe(struct platform_device *op, 897 897 const struct of_device_id *match) 898 898 { 899 899 struct device_node *dp = op->dev.of_node; ··· 1023 1023 return err; 1024 1024 } 1025 1025 1026 - static int __devexit ffb_remove(struct of_device *op) 1026 + static int __devexit ffb_remove(struct platform_device *op) 1027 1027 { 1028 1028 struct fb_info *info = dev_get_drvdata(&op->dev); 1029 1029 struct ffb_par *par = info->par;
+4 -4
drivers/video/fsl-diu-fb.c
··· 1393 1393 * Power management hooks. Note that we won't be called from IRQ context, 1394 1394 * unlike the blank functions above, so we may sleep. 1395 1395 */ 1396 - static int fsl_diu_suspend(struct of_device *ofdev, pm_message_t state) 1396 + static int fsl_diu_suspend(struct platform_device *ofdev, pm_message_t state) 1397 1397 { 1398 1398 struct fsl_diu_data *machine_data; 1399 1399 ··· 1403 1403 return 0; 1404 1404 } 1405 1405 1406 - static int fsl_diu_resume(struct of_device *ofdev) 1406 + static int fsl_diu_resume(struct platform_device *ofdev) 1407 1407 { 1408 1408 struct fsl_diu_data *machine_data; 1409 1409 ··· 1487 1487 return diu_ops.show_monitor_port(machine_data->monitor_port, buf); 1488 1488 } 1489 1489 1490 - static int __devinit fsl_diu_probe(struct of_device *ofdev, 1490 + static int __devinit fsl_diu_probe(struct platform_device *ofdev, 1491 1491 const struct of_device_id *match) 1492 1492 { 1493 1493 struct device_node *np = ofdev->dev.of_node; ··· 1667 1667 } 1668 1668 1669 1669 1670 - static int fsl_diu_remove(struct of_device *ofdev) 1670 + static int fsl_diu_remove(struct platform_device *ofdev) 1671 1671 { 1672 1672 struct fsl_diu_data *machine_data; 1673 1673 int i;
+3 -3
drivers/video/leo.c
··· 529 529 var->transp.length = 0; 530 530 } 531 531 532 - static void leo_unmap_regs(struct of_device *op, struct fb_info *info, 532 + static void leo_unmap_regs(struct platform_device *op, struct fb_info *info, 533 533 struct leo_par *par) 534 534 { 535 535 if (par->lc_ss0_usr) ··· 547 547 of_iounmap(&op->resource[0], info->screen_base, 0x800000); 548 548 } 549 549 550 - static int __devinit leo_probe(struct of_device *op, 550 + static int __devinit leo_probe(struct platform_device *op, 551 551 const struct of_device_id *match) 552 552 { 553 553 struct device_node *dp = op->dev.of_node; ··· 637 637 return err; 638 638 } 639 639 640 - static int __devexit leo_remove(struct of_device *op) 640 + static int __devexit leo_remove(struct platform_device *op) 641 641 { 642 642 struct fb_info *info = dev_get_drvdata(&op->dev); 643 643 struct leo_par *par = info->par;
+2 -2
drivers/video/mb862xx/mb862xxfb.c
··· 550 550 return 0; 551 551 } 552 552 553 - static int __devinit of_platform_mb862xx_probe(struct of_device *ofdev, 553 + static int __devinit of_platform_mb862xx_probe(struct platform_device *ofdev, 554 554 const struct of_device_id *id) 555 555 { 556 556 struct device_node *np = ofdev->dev.of_node; ··· 669 669 return ret; 670 670 } 671 671 672 - static int __devexit of_platform_mb862xx_remove(struct of_device *ofdev) 672 + static int __devexit of_platform_mb862xx_remove(struct platform_device *ofdev) 673 673 { 674 674 struct fb_info *fbi = dev_get_drvdata(&ofdev->dev); 675 675 struct mb862xxfb_par *par = fbi->par;
+2 -2
drivers/video/p9100.c
··· 249 249 info->fix.accel = FB_ACCEL_SUN_CGTHREE; 250 250 } 251 251 252 - static int __devinit p9100_probe(struct of_device *op, const struct of_device_id *match) 252 + static int __devinit p9100_probe(struct platform_device *op, const struct of_device_id *match) 253 253 { 254 254 struct device_node *dp = op->dev.of_node; 255 255 struct fb_info *info; ··· 326 326 return err; 327 327 } 328 328 329 - static int __devexit p9100_remove(struct of_device *op) 329 + static int __devexit p9100_remove(struct platform_device *op) 330 330 { 331 331 struct fb_info *info = dev_get_drvdata(&op->dev); 332 332 struct p9100_par *par = info->par;
+2 -2
drivers/video/platinumfb.c
··· 533 533 #define invalidate_cache(addr) 534 534 #endif 535 535 536 - static int __devinit platinumfb_probe(struct of_device* odev, 536 + static int __devinit platinumfb_probe(struct platform_device* odev, 537 537 const struct of_device_id *match) 538 538 { 539 539 struct device_node *dp = odev->dev.of_node; ··· 646 646 return rc; 647 647 } 648 648 649 - static int __devexit platinumfb_remove(struct of_device* odev) 649 + static int __devexit platinumfb_remove(struct platform_device* odev) 650 650 { 651 651 struct fb_info *info = dev_get_drvdata(&odev->dev); 652 652 struct fb_info_platinum *pinfo = info->par;
+2 -2
drivers/video/sunxvr1000.c
··· 111 111 return 0; 112 112 } 113 113 114 - static int __devinit gfb_probe(struct of_device *op, 114 + static int __devinit gfb_probe(struct platform_device *op, 115 115 const struct of_device_id *match) 116 116 { 117 117 struct device_node *dp = op->dev.of_node; ··· 172 172 return err; 173 173 } 174 174 175 - static int __devexit gfb_remove(struct of_device *op) 175 + static int __devexit gfb_remove(struct platform_device *op) 176 176 { 177 177 struct fb_info *info = dev_get_drvdata(&op->dev); 178 178 struct gfb_info *gp = info->par;
+3 -3
drivers/video/tcx.c
··· 342 342 info->fix.accel = FB_ACCEL_SUN_TCX; 343 343 } 344 344 345 - static void tcx_unmap_regs(struct of_device *op, struct fb_info *info, 345 + static void tcx_unmap_regs(struct platform_device *op, struct fb_info *info, 346 346 struct tcx_par *par) 347 347 { 348 348 if (par->tec) ··· 362 362 info->screen_base, info->fix.smem_len); 363 363 } 364 364 365 - static int __devinit tcx_probe(struct of_device *op, 365 + static int __devinit tcx_probe(struct platform_device *op, 366 366 const struct of_device_id *match) 367 367 { 368 368 struct device_node *dp = op->dev.of_node; ··· 486 486 return err; 487 487 } 488 488 489 - static int __devexit tcx_remove(struct of_device *op) 489 + static int __devexit tcx_remove(struct platform_device *op) 490 490 { 491 491 struct fb_info *info = dev_get_drvdata(&op->dev); 492 492 struct tcx_par *par = info->par;
+2 -2
drivers/video/xilinxfb.c
··· 397 397 */ 398 398 399 399 static int __devinit 400 - xilinxfb_of_probe(struct of_device *op, const struct of_device_id *match) 400 + xilinxfb_of_probe(struct platform_device *op, const struct of_device_id *match) 401 401 { 402 402 const u32 *prop; 403 403 u32 *p; ··· 477 477 return -ENODEV; 478 478 } 479 479 480 - static int __devexit xilinxfb_of_remove(struct of_device *op) 480 + static int __devexit xilinxfb_of_remove(struct platform_device *op) 481 481 { 482 482 return xilinxfb_release(&op->dev); 483 483 }
+2 -2
drivers/watchdog/cpwd.c
··· 526 526 .release = cpwd_release, 527 527 }; 528 528 529 - static int __devinit cpwd_probe(struct of_device *op, 529 + static int __devinit cpwd_probe(struct platform_device *op, 530 530 const struct of_device_id *match) 531 531 { 532 532 struct device_node *options; ··· 639 639 goto out; 640 640 } 641 641 642 - static int __devexit cpwd_remove(struct of_device *op) 642 + static int __devexit cpwd_remove(struct platform_device *op) 643 643 { 644 644 struct cpwd *p = dev_get_drvdata(&op->dev); 645 645 int i;
+1 -1
drivers/watchdog/gef_wdt.c
··· 260 260 }; 261 261 262 262 263 - static int __devinit gef_wdt_probe(struct of_device *dev, 263 + static int __devinit gef_wdt_probe(struct platform_device *dev, 264 264 const struct of_device_id *match) 265 265 { 266 266 int timeout = 10;
+2 -2
drivers/watchdog/mpc8xxx_wdt.c
··· 185 185 .fops = &mpc8xxx_wdt_fops, 186 186 }; 187 187 188 - static int __devinit mpc8xxx_wdt_probe(struct of_device *ofdev, 188 + static int __devinit mpc8xxx_wdt_probe(struct platform_device *ofdev, 189 189 const struct of_device_id *match) 190 190 { 191 191 int ret; ··· 238 238 return ret; 239 239 } 240 240 241 - static int __devexit mpc8xxx_wdt_remove(struct of_device *ofdev) 241 + static int __devexit mpc8xxx_wdt_remove(struct platform_device *ofdev) 242 242 { 243 243 mpc8xxx_wdt_pr_warn("watchdog removed"); 244 244 del_timer_sync(&wdt_timer);
+2 -2
drivers/watchdog/riowd.c
··· 172 172 .fops = &riowd_fops 173 173 }; 174 174 175 - static int __devinit riowd_probe(struct of_device *op, 175 + static int __devinit riowd_probe(struct platform_device *op, 176 176 const struct of_device_id *match) 177 177 { 178 178 struct riowd *p; ··· 219 219 return err; 220 220 } 221 221 222 - static int __devexit riowd_remove(struct of_device *op) 222 + static int __devexit riowd_remove(struct platform_device *op) 223 223 { 224 224 struct riowd *p = dev_get_drvdata(&op->dev); 225 225
-16
include/linux/of_device.h
··· 1 1 #ifndef _LINUX_OF_DEVICE_H 2 2 #define _LINUX_OF_DEVICE_H 3 3 4 - /* 5 - * The of_device *was* a kind of "base class" that was a superset of 6 - * struct device for use by devices attached to an OF node and probed 7 - * using OF properties. However, the important bit of OF-style 8 - * probing, namely the device node pointer, has been moved into the 9 - * common struct device when CONFIG_OF is set to make OF-style probing 10 - * available to all bus types. So now, just make of_device and 11 - * platform_device equivalent so that current of_platform bus users 12 - * can be transparently migrated over to using the platform bus. 13 - * 14 - * This line will go away once all references to of_device are removed 15 - * from the kernel. 16 - */ 17 - #define of_device platform_device 18 4 #include <linux/platform_device.h> 19 5 #include <linux/of_platform.h> /* temporary until merge */ 20 6 ··· 8 22 #include <linux/device.h> 9 23 #include <linux/of.h> 10 24 #include <linux/mod_devicetable.h> 11 - 12 - #define to_of_device(d) container_of(d, struct of_device, dev) 13 25 14 26 extern const struct of_device_id *of_match_device( 15 27 const struct of_device_id *matches, const struct device *dev);
+11 -3
include/linux/of_platform.h
··· 19 19 #include <linux/of_device.h> 20 20 #include <linux/platform_device.h> 21 21 22 - /* 23 - * An of_platform_driver driver is attached to a basic of_device on 24 - * the "platform bus" (platform_bus_type). 22 + /** 23 + * of_platform_driver - Legacy of-aware driver for platform devices. 24 + * 25 + * An of_platform_driver driver is attached to a basic platform_device on 26 + * ether the "platform bus" (platform_bus_type), or the ibm ebus 27 + * (ibmebus_bus_type). 28 + * 29 + * of_platform_driver is being phased out when used with the platform_bus_type, 30 + * and regular platform_drivers should be used instead. When the transition 31 + * is complete, only ibmebus will be using this structure, and the 32 + * platform_driver member of this structure will be removed. 25 33 */ 26 34 struct of_platform_driver 27 35 {
+1 -1
sound/aoa/soundbus/core.c
··· 59 59 static int soundbus_uevent(struct device *dev, struct kobj_uevent_env *env) 60 60 { 61 61 struct soundbus_dev * soundbus_dev; 62 - struct of_device * of; 62 + struct platform_device * of; 63 63 const char *compat; 64 64 int retval = 0; 65 65 int cplen, seen = 0;
+1 -1
sound/aoa/soundbus/soundbus.h
··· 141 141 struct list_head onbuslist; 142 142 143 143 /* the of device it represents */ 144 - struct of_device ofdev; 144 + struct platform_device ofdev; 145 145 146 146 /* what modules go by */ 147 147 char modalias[32];
+1 -1
sound/aoa/soundbus/sysfs.c
··· 16 16 char *buf) 17 17 { 18 18 struct soundbus_dev *sdev = to_soundbus_device(dev); 19 - struct of_device *of = &sdev->ofdev; 19 + struct platform_device *of = &sdev->ofdev; 20 20 int length; 21 21 22 22 if (*sdev->modalias) {
+2 -2
sound/soc/fsl/mpc5200_dma.c
··· 369 369 }; 370 370 EXPORT_SYMBOL_GPL(mpc5200_audio_dma_platform); 371 371 372 - int mpc5200_audio_dma_create(struct of_device *op) 372 + int mpc5200_audio_dma_create(struct platform_device *op) 373 373 { 374 374 phys_addr_t fifo; 375 375 struct psc_dma *psc_dma; ··· 488 488 } 489 489 EXPORT_SYMBOL_GPL(mpc5200_audio_dma_create); 490 490 491 - int mpc5200_audio_dma_destroy(struct of_device *op) 491 + int mpc5200_audio_dma_destroy(struct platform_device *op) 492 492 { 493 493 struct psc_dma *psc_dma = dev_get_drvdata(&op->dev); 494 494
+2 -2
sound/soc/fsl/mpc5200_dma.h
··· 81 81 return &psc_dma->playback; 82 82 } 83 83 84 - int mpc5200_audio_dma_create(struct of_device *op); 85 - int mpc5200_audio_dma_destroy(struct of_device *op); 84 + int mpc5200_audio_dma_create(struct platform_device *op); 85 + int mpc5200_audio_dma_destroy(struct platform_device *op); 86 86 87 87 extern struct snd_soc_platform mpc5200_audio_dma_platform; 88 88
+2 -2
sound/soc/fsl/mpc5200_psc_ac97.c
··· 277 277 * - Probe/remove operations 278 278 * - OF device match table 279 279 */ 280 - static int __devinit psc_ac97_of_probe(struct of_device *op, 280 + static int __devinit psc_ac97_of_probe(struct platform_device *op, 281 281 const struct of_device_id *match) 282 282 { 283 283 int rc, i; ··· 317 317 return 0; 318 318 } 319 319 320 - static int __devexit psc_ac97_of_remove(struct of_device *op) 320 + static int __devexit psc_ac97_of_remove(struct platform_device *op) 321 321 { 322 322 return mpc5200_audio_dma_destroy(op); 323 323 }
+2 -2
sound/soc/fsl/mpc5200_psc_i2s.c
··· 152 152 * - Probe/remove operations 153 153 * - OF device match table 154 154 */ 155 - static int __devinit psc_i2s_of_probe(struct of_device *op, 155 + static int __devinit psc_i2s_of_probe(struct platform_device *op, 156 156 const struct of_device_id *match) 157 157 { 158 158 int rc; ··· 205 205 206 206 } 207 207 208 - static int __devexit psc_i2s_of_remove(struct of_device *op) 208 + static int __devexit psc_i2s_of_remove(struct platform_device *op) 209 209 { 210 210 return mpc5200_audio_dma_destroy(op); 211 211 }
+2 -2
sound/soc/fsl/mpc8610_hpcd.c
··· 200 200 * SSI devices. We also probably aren't compatible with the generic Elo DMA 201 201 * device driver. 202 202 */ 203 - static int mpc8610_hpcd_probe(struct of_device *ofdev, 203 + static int mpc8610_hpcd_probe(struct platform_device *ofdev, 204 204 const struct of_device_id *match) 205 205 { 206 206 struct device_node *np = ofdev->dev.of_node; ··· 534 534 * 535 535 * This function is called when the OF device is removed. 536 536 */ 537 - static int mpc8610_hpcd_remove(struct of_device *ofdev) 537 + static int mpc8610_hpcd_remove(struct platform_device *ofdev) 538 538 { 539 539 struct platform_device *sound_device = dev_get_drvdata(&ofdev->dev); 540 540 struct mpc8610_hpcd_data *machine_data =
+4 -4
sound/sparc/amd7930.c
··· 336 336 int pgain; 337 337 int mgain; 338 338 339 - struct of_device *op; 339 + struct platform_device *op; 340 340 unsigned int irq; 341 341 struct snd_amd7930 *next; 342 342 }; ··· 906 906 907 907 static int snd_amd7930_free(struct snd_amd7930 *amd) 908 908 { 909 - struct of_device *op = amd->op; 909 + struct platform_device *op = amd->op; 910 910 911 911 amd7930_idle(amd); 912 912 ··· 934 934 }; 935 935 936 936 static int __devinit snd_amd7930_create(struct snd_card *card, 937 - struct of_device *op, 937 + struct platform_device *op, 938 938 int irq, int dev, 939 939 struct snd_amd7930 **ramd) 940 940 { ··· 1002 1002 return 0; 1003 1003 } 1004 1004 1005 - static int __devinit amd7930_sbus_probe(struct of_device *op, const struct of_device_id *match) 1005 + static int __devinit amd7930_sbus_probe(struct platform_device *op, const struct of_device_id *match) 1006 1006 { 1007 1007 struct resource *rp = &op->resource[0]; 1008 1008 static int dev_num;
+9 -9
sound/sparc/cs4231.c
··· 111 111 struct mutex mce_mutex; /* mutex for mce register */ 112 112 struct mutex open_mutex; /* mutex for ALSA open/close */ 113 113 114 - struct of_device *op; 114 + struct platform_device *op; 115 115 unsigned int irq[2]; 116 116 unsigned int regs_size; 117 117 struct snd_cs4231 *next; ··· 1771 1771 1772 1772 static int snd_cs4231_sbus_free(struct snd_cs4231 *chip) 1773 1773 { 1774 - struct of_device *op = chip->op; 1774 + struct platform_device *op = chip->op; 1775 1775 1776 1776 if (chip->irq[0]) 1777 1777 free_irq(chip->irq[0], chip); ··· 1794 1794 }; 1795 1795 1796 1796 static int __devinit snd_cs4231_sbus_create(struct snd_card *card, 1797 - struct of_device *op, 1797 + struct platform_device *op, 1798 1798 int dev) 1799 1799 { 1800 1800 struct snd_cs4231 *chip = card->private_data; ··· 1856 1856 return 0; 1857 1857 } 1858 1858 1859 - static int __devinit cs4231_sbus_probe(struct of_device *op, const struct of_device_id *match) 1859 + static int __devinit cs4231_sbus_probe(struct platform_device *op, const struct of_device_id *match) 1860 1860 { 1861 1861 struct resource *rp = &op->resource[0]; 1862 1862 struct snd_card *card; ··· 1931 1931 1932 1932 static int snd_cs4231_ebus_free(struct snd_cs4231 *chip) 1933 1933 { 1934 - struct of_device *op = chip->op; 1934 + struct platform_device *op = chip->op; 1935 1935 1936 1936 if (chip->c_dma.ebus_info.regs) { 1937 1937 ebus_dma_unregister(&chip->c_dma.ebus_info); ··· 1960 1960 }; 1961 1961 1962 1962 static int __devinit snd_cs4231_ebus_create(struct snd_card *card, 1963 - struct of_device *op, 1963 + struct platform_device *op, 1964 1964 int dev) 1965 1965 { 1966 1966 struct snd_cs4231 *chip = card->private_data; ··· 2048 2048 return 0; 2049 2049 } 2050 2050 2051 - static int __devinit cs4231_ebus_probe(struct of_device *op, const struct of_device_id *match) 2051 + static int __devinit cs4231_ebus_probe(struct platform_device *op, const struct of_device_id *match) 2052 2052 { 2053 2053 struct snd_card *card; 2054 2054 int err; ··· 2072 2072 } 2073 2073 #endif 2074 2074 2075 - static int __devinit cs4231_probe(struct of_device *op, const struct of_device_id *match) 2075 + static int __devinit cs4231_probe(struct platform_device *op, const struct of_device_id *match) 2076 2076 { 2077 2077 #ifdef EBUS_SUPPORT 2078 2078 if (!strcmp(op->dev.of_node->parent->name, "ebus")) ··· 2086 2086 return -ENODEV; 2087 2087 } 2088 2088 2089 - static int __devexit cs4231_remove(struct of_device *op) 2089 + static int __devexit cs4231_remove(struct platform_device *op) 2090 2090 { 2091 2091 struct snd_cs4231 *chip = dev_get_drvdata(&op->dev); 2092 2092
+4 -4
sound/sparc/dbri.c
··· 299 299 /* This structure holds the information for both chips (DBRI & CS4215) */ 300 300 struct snd_dbri { 301 301 int regs_size, irq; /* Needed for unload */ 302 - struct of_device *op; /* OF device info */ 302 + struct platform_device *op; /* OF device info */ 303 303 spinlock_t lock; 304 304 305 305 struct dbri_dma *dma; /* Pointer to our DMA block */ ··· 2523 2523 static void snd_dbri_free(struct snd_dbri *dbri); 2524 2524 2525 2525 static int __devinit snd_dbri_create(struct snd_card *card, 2526 - struct of_device *op, 2526 + struct platform_device *op, 2527 2527 int irq, int dev) 2528 2528 { 2529 2529 struct snd_dbri *dbri = card->private_data; ··· 2592 2592 (void *)dbri->dma, dbri->dma_dvma); 2593 2593 } 2594 2594 2595 - static int __devinit dbri_probe(struct of_device *op, const struct of_device_id *match) 2595 + static int __devinit dbri_probe(struct platform_device *op, const struct of_device_id *match) 2596 2596 { 2597 2597 struct snd_dbri *dbri; 2598 2598 struct resource *rp; ··· 2662 2662 return err; 2663 2663 } 2664 2664 2665 - static int __devexit dbri_remove(struct of_device *op) 2665 + static int __devexit dbri_remove(struct platform_device *op) 2666 2666 { 2667 2667 struct snd_card *card = dev_get_drvdata(&op->dev); 2668 2668