aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-12 12:11:31 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-12 12:11:31 -0400
commit58d4ea65b98f154f3326b038eecda32f90b46ea8 (patch)
tree636aed413349dece12c08a4bd3d1fea0254976d8 /drivers
parent26f0cf91813bdc8e61595f8ad6660251e2ee9cf6 (diff)
parentfbe0f8348fd6c3d016a3f48756eb729b41a67c22 (diff)
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
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ata/pata_mpc52xx.c8
-rw-r--r--drivers/ata/pata_of_platform.c4
-rw-r--r--drivers/ata/sata_fsl.c8
-rw-r--r--drivers/atm/fore200e.c26
-rw-r--r--drivers/block/xsysace.c4
-rw-r--r--drivers/char/hw_random/n2-drv.c4
-rw-r--r--drivers/char/hw_random/n2rng.h2
-rw-r--r--drivers/char/hw_random/pasemi-rng.c4
-rw-r--r--drivers/char/ipmi/ipmi_si_intf.c4
-rw-r--r--drivers/char/rtc.c2
-rw-r--r--drivers/char/xilinx_hwicap/xilinx_hwicap.c4
-rw-r--r--drivers/crypto/amcc/crypto4xx_core.c4
-rw-r--r--drivers/crypto/amcc/crypto4xx_core.h2
-rw-r--r--drivers/crypto/n2_core.c26
-rw-r--r--drivers/crypto/talitos.c6
-rw-r--r--drivers/dma/fsldma.c4
-rw-r--r--drivers/dma/mpc512x_dma.c4
-rw-r--r--drivers/dma/ppc4xx/adma.c8
-rw-r--r--drivers/edac/mpc85xx_edac.c12
-rw-r--r--drivers/edac/ppc4xx_edac.c12
-rw-r--r--drivers/hwmon/ams/ams.h2
-rw-r--r--drivers/hwmon/ultra45_env.c4
-rw-r--r--drivers/i2c/busses/i2c-cpm.c8
-rw-r--r--drivers/i2c/busses/i2c-ibm_iic.c6
-rw-r--r--drivers/i2c/busses/i2c-mpc.c4
-rw-r--r--drivers/infiniband/hw/ehca/ehca_classes.h2
-rw-r--r--drivers/infiniband/hw/ehca/ehca_main.c4
-rw-r--r--drivers/input/misc/sparcspkr.c10
-rw-r--r--drivers/input/serio/i8042-sparcio.h8
-rw-r--r--drivers/input/serio/xilinx_ps2.c4
-rw-r--r--drivers/leds/leds-gpio.c4
-rw-r--r--drivers/macintosh/macio_sysfs.c6
-rw-r--r--drivers/macintosh/smu.c6
-rw-r--r--drivers/macintosh/therm_adt746x.c2
-rw-r--r--drivers/macintosh/therm_pm72.c6
-rw-r--r--drivers/macintosh/therm_windtunnel.c6
-rw-r--r--drivers/media/video/fsl-viu.c8
-rw-r--r--drivers/mmc/host/mmc_spi.c1
-rw-r--r--drivers/mmc/host/sdhci-of-core.c8
-rw-r--r--drivers/mtd/maps/physmap_of.c8
-rw-r--r--drivers/mtd/maps/sun_uflash.c6
-rw-r--r--drivers/mtd/nand/fsl_elbc_nand.c4
-rw-r--r--drivers/mtd/nand/fsl_upm.c4
-rw-r--r--drivers/mtd/nand/mpc5121_nfc.c4
-rw-r--r--drivers/mtd/nand/ndfc.c6
-rw-r--r--drivers/mtd/nand/pasemi_nand.c4
-rw-r--r--drivers/mtd/nand/socrates_nand.c4
-rw-r--r--drivers/net/can/mscan/mpc5xxx_can.c18
-rw-r--r--drivers/net/can/sja1000/sja1000_of_platform.c4
-rw-r--r--drivers/net/ehea/ehea.h4
-rw-r--r--drivers/net/ehea/ehea_main.c12
-rw-r--r--drivers/net/fec_mpc52xx.c8
-rw-r--r--drivers/net/fec_mpc52xx_phy.c4
-rw-r--r--drivers/net/fs_enet/fs_enet-main.c4
-rw-r--r--drivers/net/fs_enet/mac-fcc.c2
-rw-r--r--drivers/net/fs_enet/mac-fec.c2
-rw-r--r--drivers/net/fs_enet/mac-scc.c2
-rw-r--r--drivers/net/fs_enet/mii-bitbang.c4
-rw-r--r--drivers/net/fs_enet/mii-fec.c4
-rw-r--r--drivers/net/fsl_pq_mdio.c4
-rw-r--r--drivers/net/gianfar.c10
-rw-r--r--drivers/net/gianfar.h2
-rw-r--r--drivers/net/greth.c6
-rw-r--r--drivers/net/greth.h2
-rw-r--r--drivers/net/ibm_newemac/core.c6
-rw-r--r--drivers/net/ibm_newemac/core.h12
-rw-r--r--drivers/net/ibm_newemac/mal.c4
-rw-r--r--drivers/net/ibm_newemac/mal.h2
-rw-r--r--drivers/net/ibm_newemac/rgmii.c18
-rw-r--r--drivers/net/ibm_newemac/rgmii.h16
-rw-r--r--drivers/net/ibm_newemac/tah.c14
-rw-r--r--drivers/net/ibm_newemac/tah.h12
-rw-r--r--drivers/net/ibm_newemac/zmii.c18
-rw-r--r--drivers/net/ibm_newemac/zmii.h16
-rw-r--r--drivers/net/ll_temac_main.c8
-rw-r--r--drivers/net/myri_sbus.c4
-rw-r--r--drivers/net/myri_sbus.h2
-rw-r--r--drivers/net/niu.c8
-rw-r--r--drivers/net/phy/mdio-gpio.c4
-rw-r--r--drivers/net/sunbmac.c18
-rw-r--r--drivers/net/sunbmac.h4
-rw-r--r--drivers/net/sunhme.c22
-rw-r--r--drivers/net/sunhme.h2
-rw-r--r--drivers/net/sunlance.c20
-rw-r--r--drivers/net/sunqe.c16
-rw-r--r--drivers/net/sunqe.h4
-rw-r--r--drivers/net/ucc_geth.c8
-rw-r--r--drivers/net/xilinx_emaclite.c6
-rw-r--r--drivers/of/device.c2
-rw-r--r--drivers/parport/parport_sunbpp.c4
-rw-r--r--drivers/pcmcia/electra_cf.c6
-rw-r--r--drivers/pcmcia/m8xx_pcmcia.c4
-rw-r--r--drivers/rtc/rtc-mpc5121.c4
-rw-r--r--drivers/sbus/char/bbc_envctrl.c6
-rw-r--r--drivers/sbus/char/bbc_i2c.c18
-rw-r--r--drivers/sbus/char/bbc_i2c.h10
-rw-r--r--drivers/sbus/char/display7seg.c4
-rw-r--r--drivers/sbus/char/envctrl.c4
-rw-r--r--drivers/sbus/char/flash.c4
-rw-r--r--drivers/sbus/char/uctrl.c4
-rw-r--r--drivers/scsi/qlogicpti.c14
-rw-r--r--drivers/scsi/qlogicpti.h2
-rw-r--r--drivers/scsi/sun_esp.c44
-rw-r--r--drivers/serial/apbuart.c2
-rw-r--r--drivers/serial/cpm_uart/cpm_uart_core.c4
-rw-r--r--drivers/serial/mpc52xx_uart.c8
-rw-r--r--drivers/serial/nwpserial.c2
-rw-r--r--drivers/serial/of_serial.c6
-rw-r--r--drivers/serial/sunhv.c4
-rw-r--r--drivers/serial/sunsab.c8
-rw-r--r--drivers/serial/sunsu.c8
-rw-r--r--drivers/serial/sunzilog.c6
-rw-r--r--drivers/serial/uartlite.c4
-rw-r--r--drivers/serial/ucc_uart.c4
-rw-r--r--drivers/spi/mpc512x_psc_spi.c4
-rw-r--r--drivers/spi/mpc52xx_psc_spi.c4
-rw-r--r--drivers/spi/mpc52xx_spi.c4
-rw-r--r--drivers/spi/spi_mpc8xxx.c4
-rw-r--r--drivers/spi/spi_ppc4xx.c6
-rw-r--r--drivers/spi/xilinx_spi_of.c6
-rw-r--r--drivers/usb/gadget/fsl_qe_udc.c10
-rw-r--r--drivers/usb/host/ehci-ppc-of.c6
-rw-r--r--drivers/usb/host/ehci-xilinx-of.c12
-rw-r--r--drivers/usb/host/fhci-hcd.c4
-rw-r--r--drivers/usb/host/isp1760-if.c4
-rw-r--r--drivers/usb/host/ohci-ppc-of.c6
-rw-r--r--drivers/video/bw2.c4
-rw-r--r--drivers/video/cg14.c6
-rw-r--r--drivers/video/cg3.c4
-rw-r--r--drivers/video/cg6.c6
-rw-r--r--drivers/video/ffb.c4
-rw-r--r--drivers/video/fsl-diu-fb.c8
-rw-r--r--drivers/video/leo.c6
-rw-r--r--drivers/video/mb862xx/mb862xxfb.c4
-rw-r--r--drivers/video/p9100.c4
-rw-r--r--drivers/video/platinumfb.c4
-rw-r--r--drivers/video/sunxvr1000.c4
-rw-r--r--drivers/video/tcx.c6
-rw-r--r--drivers/video/xilinxfb.c4
-rw-r--r--drivers/watchdog/cpwd.c4
-rw-r--r--drivers/watchdog/gef_wdt.c2
-rw-r--r--drivers/watchdog/mpc8xxx_wdt.c4
-rw-r--r--drivers/watchdog/riowd.c4
143 files changed, 479 insertions, 478 deletions
diff --git a/drivers/ata/pata_mpc52xx.c b/drivers/ata/pata_mpc52xx.c
index f087ab55b1df..8cc536e49a0a 100644
--- a/drivers/ata/pata_mpc52xx.c
+++ b/drivers/ata/pata_mpc52xx.c
@@ -680,7 +680,7 @@ mpc52xx_ata_remove_one(struct device *dev)
680/* ======================================================================== */ 680/* ======================================================================== */
681 681
682static int __devinit 682static int __devinit
683mpc52xx_ata_probe(struct of_device *op, const struct of_device_id *match) 683mpc52xx_ata_probe(struct platform_device *op, const struct of_device_id *match)
684{ 684{
685 unsigned int ipb_freq; 685 unsigned int ipb_freq;
686 struct resource res_mem; 686 struct resource res_mem;
@@ -821,7 +821,7 @@ mpc52xx_ata_probe(struct of_device *op, const struct of_device_id *match)
821} 821}
822 822
823static int 823static int
824mpc52xx_ata_remove(struct of_device *op) 824mpc52xx_ata_remove(struct platform_device *op)
825{ 825{
826 struct mpc52xx_ata_priv *priv; 826 struct mpc52xx_ata_priv *priv;
827 int task_irq; 827 int task_irq;
@@ -848,7 +848,7 @@ mpc52xx_ata_remove(struct of_device *op)
848#ifdef CONFIG_PM 848#ifdef CONFIG_PM
849 849
850static int 850static int
851mpc52xx_ata_suspend(struct of_device *op, pm_message_t state) 851mpc52xx_ata_suspend(struct platform_device *op, pm_message_t state)
852{ 852{
853 struct ata_host *host = dev_get_drvdata(&op->dev); 853 struct ata_host *host = dev_get_drvdata(&op->dev);
854 854
@@ -856,7 +856,7 @@ mpc52xx_ata_suspend(struct of_device *op, pm_message_t state)
856} 856}
857 857
858static int 858static int
859mpc52xx_ata_resume(struct of_device *op) 859mpc52xx_ata_resume(struct platform_device *op)
860{ 860{
861 struct ata_host *host = dev_get_drvdata(&op->dev); 861 struct ata_host *host = dev_get_drvdata(&op->dev);
862 struct mpc52xx_ata_priv *priv = host->private_data; 862 struct mpc52xx_ata_priv *priv = host->private_data;
diff --git a/drivers/ata/pata_of_platform.c b/drivers/ata/pata_of_platform.c
index 5a1b82c08be9..480e043ce6b8 100644
--- a/drivers/ata/pata_of_platform.c
+++ b/drivers/ata/pata_of_platform.c
@@ -14,7 +14,7 @@
14#include <linux/of_platform.h> 14#include <linux/of_platform.h>
15#include <linux/ata_platform.h> 15#include <linux/ata_platform.h>
16 16
17static int __devinit pata_of_platform_probe(struct of_device *ofdev, 17static int __devinit pata_of_platform_probe(struct platform_device *ofdev,
18 const struct of_device_id *match) 18 const struct of_device_id *match)
19{ 19{
20 int ret; 20 int ret;
@@ -78,7 +78,7 @@ static int __devinit pata_of_platform_probe(struct of_device *ofdev,
78 reg_shift, pio_mask); 78 reg_shift, pio_mask);
79} 79}
80 80
81static int __devexit pata_of_platform_remove(struct of_device *ofdev) 81static int __devexit pata_of_platform_remove(struct platform_device *ofdev)
82{ 82{
83 return __pata_platform_remove(&ofdev->dev); 83 return __pata_platform_remove(&ofdev->dev);
84} 84}
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index 18c986dbb7f1..7325f77480dc 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -1296,7 +1296,7 @@ static const struct ata_port_info sata_fsl_port_info[] = {
1296 }, 1296 },
1297}; 1297};
1298 1298
1299static int sata_fsl_probe(struct of_device *ofdev, 1299static int sata_fsl_probe(struct platform_device *ofdev,
1300 const struct of_device_id *match) 1300 const struct of_device_id *match)
1301{ 1301{
1302 int retval = -ENXIO; 1302 int retval = -ENXIO;
@@ -1370,7 +1370,7 @@ error_exit_with_cleanup:
1370 return retval; 1370 return retval;
1371} 1371}
1372 1372
1373static int sata_fsl_remove(struct of_device *ofdev) 1373static int sata_fsl_remove(struct platform_device *ofdev)
1374{ 1374{
1375 struct ata_host *host = dev_get_drvdata(&ofdev->dev); 1375 struct ata_host *host = dev_get_drvdata(&ofdev->dev);
1376 struct sata_fsl_host_priv *host_priv = host->private_data; 1376 struct sata_fsl_host_priv *host_priv = host->private_data;
@@ -1387,13 +1387,13 @@ static int sata_fsl_remove(struct of_device *ofdev)
1387} 1387}
1388 1388
1389#ifdef CONFIG_PM 1389#ifdef CONFIG_PM
1390static int sata_fsl_suspend(struct of_device *op, pm_message_t state) 1390static int sata_fsl_suspend(struct platform_device *op, pm_message_t state)
1391{ 1391{
1392 struct ata_host *host = dev_get_drvdata(&op->dev); 1392 struct ata_host *host = dev_get_drvdata(&op->dev);
1393 return ata_host_suspend(host, state); 1393 return ata_host_suspend(host, state);
1394} 1394}
1395 1395
1396static int sata_fsl_resume(struct of_device *op) 1396static int sata_fsl_resume(struct platform_device *op)
1397{ 1397{
1398 struct ata_host *host = dev_get_drvdata(&op->dev); 1398 struct ata_host *host = dev_get_drvdata(&op->dev);
1399 struct sata_fsl_host_priv *host_priv = host->private_data; 1399 struct sata_fsl_host_priv *host_priv = host->private_data;
diff --git a/drivers/atm/fore200e.c b/drivers/atm/fore200e.c
index b7385e077717..c8fc69c85a06 100644
--- a/drivers/atm/fore200e.c
+++ b/drivers/atm/fore200e.c
@@ -674,7 +674,7 @@ static void fore200e_sba_write(u32 val, volatile u32 __iomem *addr)
674 674
675static u32 fore200e_sba_dma_map(struct fore200e *fore200e, void* virt_addr, int size, int direction) 675static 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 u32 dma_addr; 678 u32 dma_addr;
679 679
680 dma_addr = dma_map_single(&op->dev, virt_addr, size, direction); 680 dma_addr = dma_map_single(&op->dev, virt_addr, size, direction);
@@ -687,7 +687,7 @@ static u32 fore200e_sba_dma_map(struct fore200e *fore200e, void* virt_addr, int
687 687
688static void fore200e_sba_dma_unmap(struct fore200e *fore200e, u32 dma_addr, int size, int direction) 688static 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 DPRINTK(3, "SBUS DVMA unmapping: dma_addr = 0x%08x, size = %d, direction = %d,\n", 692 DPRINTK(3, "SBUS DVMA unmapping: dma_addr = 0x%08x, size = %d, direction = %d,\n",
693 dma_addr, size, direction); 693 dma_addr, size, direction);
@@ -697,7 +697,7 @@ static void fore200e_sba_dma_unmap(struct fore200e *fore200e, u32 dma_addr, int
697 697
698static void fore200e_sba_dma_sync_for_cpu(struct fore200e *fore200e, u32 dma_addr, int size, int direction) 698static 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 DPRINTK(3, "SBUS DVMA sync: dma_addr = 0x%08x, size = %d, direction = %d\n", dma_addr, size, direction); 702 DPRINTK(3, "SBUS DVMA sync: dma_addr = 0x%08x, size = %d, direction = %d\n", dma_addr, size, direction);
703 703
@@ -706,7 +706,7 @@ static void fore200e_sba_dma_sync_for_cpu(struct fore200e *fore200e, u32 dma_add
706 706
707static void fore200e_sba_dma_sync_for_device(struct fore200e *fore200e, u32 dma_addr, int size, int direction) 707static 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 DPRINTK(3, "SBUS DVMA sync: dma_addr = 0x%08x, size = %d, direction = %d\n", dma_addr, size, direction); 711 DPRINTK(3, "SBUS DVMA sync: dma_addr = 0x%08x, size = %d, direction = %d\n", dma_addr, size, direction);
712 712
@@ -719,7 +719,7 @@ static void fore200e_sba_dma_sync_for_device(struct fore200e *fore200e, u32 dma_
719static int fore200e_sba_dma_chunk_alloc(struct fore200e *fore200e, struct chunk *chunk, 719static int fore200e_sba_dma_chunk_alloc(struct fore200e *fore200e, struct chunk *chunk,
720 int size, int nbr, int alignment) 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 chunk->alloc_size = chunk->align_size = size * nbr; 724 chunk->alloc_size = chunk->align_size = size * nbr;
725 725
@@ -738,7 +738,7 @@ static int fore200e_sba_dma_chunk_alloc(struct fore200e *fore200e, struct chunk
738/* free a DVMA consistent chunk of memory */ 738/* free a DVMA consistent chunk of memory */
739static void fore200e_sba_dma_chunk_free(struct fore200e *fore200e, struct chunk *chunk) 739static 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 dma_free_coherent(&op->dev, chunk->alloc_size, 743 dma_free_coherent(&op->dev, chunk->alloc_size,
744 chunk->alloc_addr, chunk->dma_addr); 744 chunk->alloc_addr, chunk->dma_addr);
@@ -770,7 +770,7 @@ static void fore200e_sba_reset(struct fore200e *fore200e)
770 770
771static int __init fore200e_sba_map(struct fore200e *fore200e) 771static 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 unsigned int bursts; 774 unsigned int bursts;
775 775
776 /* gain access to the SBA specific registers */ 776 /* gain access to the SBA specific registers */
@@ -800,7 +800,7 @@ static int __init fore200e_sba_map(struct fore200e *fore200e)
800 800
801static void fore200e_sba_unmap(struct fore200e *fore200e) 801static 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 of_iounmap(&op->resource[0], fore200e->regs.sba.hcr, SBA200E_HCR_LENGTH); 805 of_iounmap(&op->resource[0], fore200e->regs.sba.hcr, SBA200E_HCR_LENGTH);
806 of_iounmap(&op->resource[1], fore200e->regs.sba.bsr, SBA200E_BSR_LENGTH); 806 of_iounmap(&op->resource[1], fore200e->regs.sba.bsr, SBA200E_BSR_LENGTH);
@@ -816,7 +816,7 @@ static int __init fore200e_sba_configure(struct fore200e *fore200e)
816 816
817static int __init fore200e_sba_prom_read(struct fore200e *fore200e, struct prom_data *prom) 817static 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 const u8 *prop; 820 const u8 *prop;
821 int len; 821 int len;
822 822
@@ -840,7 +840,7 @@ static int __init fore200e_sba_prom_read(struct fore200e *fore200e, struct prom_
840 840
841static int fore200e_sba_proc_read(struct fore200e *fore200e, char *page) 841static 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 const struct linux_prom_registers *regs; 844 const struct linux_prom_registers *regs;
845 845
846 regs = of_get_property(op->dev.of_node, "reg", NULL); 846 regs = of_get_property(op->dev.of_node, "reg", NULL);
@@ -2513,7 +2513,7 @@ fore200e_load_and_start_fw(struct fore200e* fore200e)
2513 device = &((struct pci_dev *) fore200e->bus_dev)->dev; 2513 device = &((struct pci_dev *) fore200e->bus_dev)->dev;
2514#ifdef CONFIG_SBUS 2514#ifdef CONFIG_SBUS
2515 else if (strcmp(fore200e->bus->model_name, "SBA-200E") == 0) 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#endif 2517#endif
2518 else 2518 else
2519 return err; 2519 return err;
@@ -2643,7 +2643,7 @@ fore200e_init(struct fore200e* fore200e)
2643} 2643}
2644 2644
2645#ifdef CONFIG_SBUS 2645#ifdef CONFIG_SBUS
2646static int __devinit fore200e_sba_probe(struct of_device *op, 2646static int __devinit fore200e_sba_probe(struct platform_device *op,
2647 const struct of_device_id *match) 2647 const struct of_device_id *match)
2648{ 2648{
2649 const struct fore200e_bus *bus = match->data; 2649 const struct fore200e_bus *bus = match->data;
@@ -2675,7 +2675,7 @@ static int __devinit fore200e_sba_probe(struct of_device *op,
2675 return 0; 2675 return 0;
2676} 2676}
2677 2677
2678static int __devexit fore200e_sba_remove(struct of_device *op) 2678static int __devexit fore200e_sba_remove(struct platform_device *op)
2679{ 2679{
2680 struct fore200e *fore200e = dev_get_drvdata(&op->dev); 2680 struct fore200e *fore200e = dev_get_drvdata(&op->dev);
2681 2681
diff --git a/drivers/block/xsysace.c b/drivers/block/xsysace.c
index b71888b909a0..2982b3ee9465 100644
--- a/drivers/block/xsysace.c
+++ b/drivers/block/xsysace.c
@@ -1194,7 +1194,7 @@ static struct platform_driver ace_platform_driver = {
1194 1194
1195#if defined(CONFIG_OF) 1195#if defined(CONFIG_OF)
1196static int __devinit 1196static int __devinit
1197ace_of_probe(struct of_device *op, const struct of_device_id *match) 1197ace_of_probe(struct platform_device *op, const struct of_device_id *match)
1198{ 1198{
1199 struct resource res; 1199 struct resource res;
1200 resource_size_t physaddr; 1200 resource_size_t physaddr;
@@ -1226,7 +1226,7 @@ ace_of_probe(struct of_device *op, const struct of_device_id *match)
1226 return ace_alloc(&op->dev, id ? *id : 0, physaddr, irq, bus_width); 1226 return ace_alloc(&op->dev, id ? *id : 0, physaddr, irq, bus_width);
1227} 1227}
1228 1228
1229static int __devexit ace_of_remove(struct of_device *op) 1229static int __devexit ace_of_remove(struct platform_device *op)
1230{ 1230{
1231 ace_free(&op->dev); 1231 ace_free(&op->dev);
1232 return 0; 1232 return 0;
diff --git a/drivers/char/hw_random/n2-drv.c b/drivers/char/hw_random/n2-drv.c
index 7a4f080f8356..1acdb2509511 100644
--- a/drivers/char/hw_random/n2-drv.c
+++ b/drivers/char/hw_random/n2-drv.c
@@ -619,7 +619,7 @@ static void __devinit n2rng_driver_version(void)
619 pr_info("%s", version); 619 pr_info("%s", version);
620} 620}
621 621
622static int __devinit n2rng_probe(struct of_device *op, 622static int __devinit n2rng_probe(struct platform_device *op,
623 const struct of_device_id *match) 623 const struct of_device_id *match)
624{ 624{
625 int victoria_falls = (match->data != NULL); 625 int victoria_falls = (match->data != NULL);
@@ -714,7 +714,7 @@ out:
714 return err; 714 return err;
715} 715}
716 716
717static int __devexit n2rng_remove(struct of_device *op) 717static int __devexit n2rng_remove(struct platform_device *op)
718{ 718{
719 struct n2rng *np = dev_get_drvdata(&op->dev); 719 struct n2rng *np = dev_get_drvdata(&op->dev);
720 720
diff --git a/drivers/char/hw_random/n2rng.h b/drivers/char/hw_random/n2rng.h
index a2b81e7bfc18..4bea07f30978 100644
--- a/drivers/char/hw_random/n2rng.h
+++ b/drivers/char/hw_random/n2rng.h
@@ -65,7 +65,7 @@ struct n2rng_unit {
65}; 65};
66 66
67struct n2rng { 67struct n2rng {
68 struct of_device *op; 68 struct platform_device *op;
69 69
70 unsigned long flags; 70 unsigned long flags;
71#define N2RNG_FLAG_VF 0x00000001 /* Victoria Falls RNG, else N2 */ 71#define N2RNG_FLAG_VF 0x00000001 /* Victoria Falls RNG, else N2 */
diff --git a/drivers/char/hw_random/pasemi-rng.c b/drivers/char/hw_random/pasemi-rng.c
index 261ba8f22b8b..a31c830ca8cd 100644
--- a/drivers/char/hw_random/pasemi-rng.c
+++ b/drivers/char/hw_random/pasemi-rng.c
@@ -94,7 +94,7 @@ static struct hwrng pasemi_rng = {
94 .data_read = pasemi_rng_data_read, 94 .data_read = pasemi_rng_data_read,
95}; 95};
96 96
97static int __devinit rng_probe(struct of_device *ofdev, 97static int __devinit rng_probe(struct platform_device *ofdev,
98 const struct of_device_id *match) 98 const struct of_device_id *match)
99{ 99{
100 void __iomem *rng_regs; 100 void __iomem *rng_regs;
@@ -123,7 +123,7 @@ static int __devinit rng_probe(struct of_device *ofdev,
123 return err; 123 return err;
124} 124}
125 125
126static int __devexit rng_remove(struct of_device *dev) 126static int __devexit rng_remove(struct platform_device *dev)
127{ 127{
128 void __iomem *rng_regs = (void __iomem *)pasemi_rng.priv; 128 void __iomem *rng_regs = (void __iomem *)pasemi_rng.priv;
129 129
diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
index 48330e0fd488..3822b4f49c84 100644
--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -2528,7 +2528,7 @@ static struct pci_driver ipmi_pci_driver = {
2528 2528
2529 2529
2530#ifdef CONFIG_PPC_OF 2530#ifdef CONFIG_PPC_OF
2531static int __devinit ipmi_of_probe(struct of_device *dev, 2531static int __devinit ipmi_of_probe(struct platform_device *dev,
2532 const struct of_device_id *match) 2532 const struct of_device_id *match)
2533{ 2533{
2534 struct smi_info *info; 2534 struct smi_info *info;
@@ -2607,7 +2607,7 @@ static int __devinit ipmi_of_probe(struct of_device *dev,
2607 return 0; 2607 return 0;
2608} 2608}
2609 2609
2610static int __devexit ipmi_of_remove(struct of_device *dev) 2610static int __devexit ipmi_of_remove(struct platform_device *dev)
2611{ 2611{
2612 cleanup_one_si(dev_get_drvdata(&dev->dev)); 2612 cleanup_one_si(dev_get_drvdata(&dev->dev));
2613 return 0; 2613 return 0;
diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c
index 95acb8c880f4..dfa8b3062fda 100644
--- a/drivers/char/rtc.c
+++ b/drivers/char/rtc.c
@@ -961,7 +961,7 @@ static int __init rtc_init(void)
961#endif 961#endif
962#ifdef CONFIG_SPARC32 962#ifdef CONFIG_SPARC32
963 struct device_node *ebus_dp; 963 struct device_node *ebus_dp;
964 struct of_device *op; 964 struct platform_device *op;
965#else 965#else
966 void *r; 966 void *r;
967#ifdef RTC_IRQ 967#ifdef RTC_IRQ
diff --git a/drivers/char/xilinx_hwicap/xilinx_hwicap.c b/drivers/char/xilinx_hwicap/xilinx_hwicap.c
index ed8a9cec2a05..0ed763cd2e77 100644
--- a/drivers/char/xilinx_hwicap/xilinx_hwicap.c
+++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.c
@@ -761,7 +761,7 @@ static struct platform_driver hwicap_platform_driver = {
761 761
762#if defined(CONFIG_OF) 762#if defined(CONFIG_OF)
763static int __devinit 763static int __devinit
764hwicap_of_probe(struct of_device *op, const struct of_device_id *match) 764hwicap_of_probe(struct platform_device *op, const struct of_device_id *match)
765{ 765{
766 struct resource res; 766 struct resource res;
767 const unsigned int *id; 767 const unsigned int *id;
@@ -798,7 +798,7 @@ hwicap_of_probe(struct of_device *op, const struct of_device_id *match)
798 regs); 798 regs);
799} 799}
800 800
801static int __devexit hwicap_of_remove(struct of_device *op) 801static int __devexit hwicap_of_remove(struct platform_device *op)
802{ 802{
803 return hwicap_remove(&op->dev); 803 return hwicap_remove(&op->dev);
804} 804}
diff --git a/drivers/crypto/amcc/crypto4xx_core.c b/drivers/crypto/amcc/crypto4xx_core.c
index 983530ba04a7..2b1baee525bc 100644
--- a/drivers/crypto/amcc/crypto4xx_core.c
+++ b/drivers/crypto/amcc/crypto4xx_core.c
@@ -1150,7 +1150,7 @@ struct crypto4xx_alg_common crypto4xx_alg[] = {
1150/** 1150/**
1151 * Module Initialization Routine 1151 * Module Initialization Routine
1152 */ 1152 */
1153static int __init crypto4xx_probe(struct of_device *ofdev, 1153static int __init crypto4xx_probe(struct platform_device *ofdev,
1154 const struct of_device_id *match) 1154 const struct of_device_id *match)
1155{ 1155{
1156 int rc; 1156 int rc;
@@ -1258,7 +1258,7 @@ err_alloc_dev:
1258 return rc; 1258 return rc;
1259} 1259}
1260 1260
1261static int __exit crypto4xx_remove(struct of_device *ofdev) 1261static int __exit crypto4xx_remove(struct platform_device *ofdev)
1262{ 1262{
1263 struct device *dev = &ofdev->dev; 1263 struct device *dev = &ofdev->dev;
1264 struct crypto4xx_core_device *core_dev = dev_get_drvdata(dev); 1264 struct crypto4xx_core_device *core_dev = dev_get_drvdata(dev);
diff --git a/drivers/crypto/amcc/crypto4xx_core.h b/drivers/crypto/amcc/crypto4xx_core.h
index da9cbe3b9fc3..bac0bdeb4b5f 100644
--- a/drivers/crypto/amcc/crypto4xx_core.h
+++ b/drivers/crypto/amcc/crypto4xx_core.h
@@ -104,7 +104,7 @@ struct crypto4xx_device {
104 104
105struct crypto4xx_core_device { 105struct crypto4xx_core_device {
106 struct device *device; 106 struct device *device;
107 struct of_device *ofdev; 107 struct platform_device *ofdev;
108 struct crypto4xx_device *dev; 108 struct crypto4xx_device *dev;
109 u32 int_status; 109 u32 int_status;
110 u32 irq; 110 u32 irq;
diff --git a/drivers/crypto/n2_core.c b/drivers/crypto/n2_core.c
index 26af2dd5d831..88ee01510ec0 100644
--- a/drivers/crypto/n2_core.c
+++ b/drivers/crypto/n2_core.c
@@ -1552,7 +1552,7 @@ static void __exit n2_unregister_algs(void)
1552 1552
1553/* To map CWQ queues to interrupt sources, the hypervisor API provides 1553/* To map CWQ queues to interrupt sources, the hypervisor API provides
1554 * a devino. This isn't very useful to us because all of the 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 * Linux virtual IRQ cookie numbers. 1556 * Linux virtual IRQ cookie numbers.
1557 * 1557 *
1558 * So we have to back-translate, going through the 'intr' and 'ino' 1558 * So we have to back-translate, going through the 'intr' and 'ino'
@@ -1560,7 +1560,7 @@ static void __exit n2_unregister_algs(void)
1560 * 'interrupts' property entries, in order to to figure out which 1560 * 'interrupts' property entries, in order to to figure out which
1561 * devino goes to which already-translated IRQ. 1561 * devino goes to which already-translated IRQ.
1562 */ 1562 */
1563static int find_devino_index(struct of_device *dev, struct spu_mdesc_info *ip, 1563static int find_devino_index(struct platform_device *dev, struct spu_mdesc_info *ip,
1564 unsigned long dev_ino) 1564 unsigned long dev_ino)
1565{ 1565{
1566 const unsigned int *dev_intrs; 1566 const unsigned int *dev_intrs;
@@ -1580,7 +1580,7 @@ static int find_devino_index(struct of_device *dev, struct spu_mdesc_info *ip,
1580 if (!dev_intrs) 1580 if (!dev_intrs)
1581 return -ENODEV; 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 if (dev_intrs[i] == intr) 1584 if (dev_intrs[i] == intr)
1585 return i; 1585 return i;
1586 } 1586 }
@@ -1588,7 +1588,7 @@ static int find_devino_index(struct of_device *dev, struct spu_mdesc_info *ip,
1588 return -ENODEV; 1588 return -ENODEV;
1589} 1589}
1590 1590
1591static int spu_map_ino(struct of_device *dev, struct spu_mdesc_info *ip, 1591static int spu_map_ino(struct platform_device *dev, struct spu_mdesc_info *ip,
1592 const char *irq_name, struct spu_queue *p, 1592 const char *irq_name, struct spu_queue *p,
1593 irq_handler_t handler) 1593 irq_handler_t handler)
1594{ 1594{
@@ -1603,7 +1603,7 @@ static int spu_map_ino(struct of_device *dev, struct spu_mdesc_info *ip,
1603 if (index < 0) 1603 if (index < 0)
1604 return index; 1604 return index;
1605 1605
1606 p->irq = dev->irqs[index]; 1606 p->irq = dev->archdata.irqs[index];
1607 1607
1608 sprintf(p->irq_name, "%s-%d", irq_name, index); 1608 sprintf(p->irq_name, "%s-%d", irq_name, index);
1609 1609
@@ -1736,7 +1736,7 @@ static void spu_list_destroy(struct list_head *list)
1736 * gathering cpu membership information. 1736 * gathering cpu membership information.
1737 */ 1737 */
1738static int spu_mdesc_walk_arcs(struct mdesc_handle *mdesc, 1738static int spu_mdesc_walk_arcs(struct mdesc_handle *mdesc,
1739 struct of_device *dev, 1739 struct platform_device *dev,
1740 u64 node, struct spu_queue *p, 1740 u64 node, struct spu_queue *p,
1741 struct spu_queue **table) 1741 struct spu_queue **table)
1742{ 1742{
@@ -1763,7 +1763,7 @@ static int spu_mdesc_walk_arcs(struct mdesc_handle *mdesc,
1763 1763
1764/* Process an 'exec-unit' MDESC node of type 'cwq'. */ 1764/* Process an 'exec-unit' MDESC node of type 'cwq'. */
1765static int handle_exec_unit(struct spu_mdesc_info *ip, struct list_head *list, 1765static 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 u64 node, const char *iname, unsigned long q_type, 1767 u64 node, const char *iname, unsigned long q_type,
1768 irq_handler_t handler, struct spu_queue **table) 1768 irq_handler_t handler, struct spu_queue **table)
1769{ 1769{
@@ -1794,7 +1794,7 @@ static int handle_exec_unit(struct spu_mdesc_info *ip, struct list_head *list,
1794 return spu_map_ino(dev, ip, iname, p, handler); 1794 return spu_map_ino(dev, ip, iname, p, handler);
1795} 1795}
1796 1796
1797static int spu_mdesc_scan(struct mdesc_handle *mdesc, struct of_device *dev, 1797static int spu_mdesc_scan(struct mdesc_handle *mdesc, struct platform_device *dev,
1798 struct spu_mdesc_info *ip, struct list_head *list, 1798 struct spu_mdesc_info *ip, struct list_head *list,
1799 const char *exec_name, unsigned long q_type, 1799 const char *exec_name, unsigned long q_type,
1800 irq_handler_t handler, struct spu_queue **table) 1800 irq_handler_t handler, struct spu_queue **table)
@@ -1855,7 +1855,7 @@ static int __devinit get_irq_props(struct mdesc_handle *mdesc, u64 node,
1855} 1855}
1856 1856
1857static int __devinit grab_mdesc_irq_props(struct mdesc_handle *mdesc, 1857static int __devinit grab_mdesc_irq_props(struct mdesc_handle *mdesc,
1858 struct of_device *dev, 1858 struct platform_device *dev,
1859 struct spu_mdesc_info *ip, 1859 struct spu_mdesc_info *ip,
1860 const char *node_name) 1860 const char *node_name)
1861{ 1861{
@@ -2004,7 +2004,7 @@ static void __devinit n2_spu_driver_version(void)
2004 pr_info("%s", version); 2004 pr_info("%s", version);
2005} 2005}
2006 2006
2007static int __devinit n2_crypto_probe(struct of_device *dev, 2007static int __devinit n2_crypto_probe(struct platform_device *dev,
2008 const struct of_device_id *match) 2008 const struct of_device_id *match)
2009{ 2009{
2010 struct mdesc_handle *mdesc; 2010 struct mdesc_handle *mdesc;
@@ -2081,7 +2081,7 @@ out_free_n2cp:
2081 return err; 2081 return err;
2082} 2082}
2083 2083
2084static int __devexit n2_crypto_remove(struct of_device *dev) 2084static int __devexit n2_crypto_remove(struct platform_device *dev)
2085{ 2085{
2086 struct n2_crypto *np = dev_get_drvdata(&dev->dev); 2086 struct n2_crypto *np = dev_get_drvdata(&dev->dev);
2087 2087
@@ -2116,7 +2116,7 @@ static void free_ncp(struct n2_mau *mp)
2116 kfree(mp); 2116 kfree(mp);
2117} 2117}
2118 2118
2119static int __devinit n2_mau_probe(struct of_device *dev, 2119static int __devinit n2_mau_probe(struct platform_device *dev,
2120 const struct of_device_id *match) 2120 const struct of_device_id *match)
2121{ 2121{
2122 struct mdesc_handle *mdesc; 2122 struct mdesc_handle *mdesc;
@@ -2184,7 +2184,7 @@ out_free_ncp:
2184 return err; 2184 return err;
2185} 2185}
2186 2186
2187static int __devexit n2_mau_remove(struct of_device *dev) 2187static int __devexit n2_mau_remove(struct platform_device *dev)
2188{ 2188{
2189 struct n2_mau *mp = dev_get_drvdata(&dev->dev); 2189 struct n2_mau *mp = dev_get_drvdata(&dev->dev);
2190 2190
diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
index 97f4af1d8a64..4bcd825b5739 100644
--- a/drivers/crypto/talitos.c
+++ b/drivers/crypto/talitos.c
@@ -118,7 +118,7 @@ struct talitos_channel {
118 118
119struct talitos_private { 119struct talitos_private {
120 struct device *dev; 120 struct device *dev;
121 struct of_device *ofdev; 121 struct platform_device *ofdev;
122 void __iomem *reg; 122 void __iomem *reg;
123 int irq; 123 int irq;
124 124
@@ -2308,7 +2308,7 @@ static int hw_supports(struct device *dev, __be32 desc_hdr_template)
2308 return ret; 2308 return ret;
2309} 2309}
2310 2310
2311static int talitos_remove(struct of_device *ofdev) 2311static int talitos_remove(struct platform_device *ofdev)
2312{ 2312{
2313 struct device *dev = &ofdev->dev; 2313 struct device *dev = &ofdev->dev;
2314 struct talitos_private *priv = dev_get_drvdata(dev); 2314 struct talitos_private *priv = dev_get_drvdata(dev);
@@ -2401,7 +2401,7 @@ static struct talitos_crypto_alg *talitos_alg_alloc(struct device *dev,
2401 return t_alg; 2401 return t_alg;
2402} 2402}
2403 2403
2404static int talitos_probe(struct of_device *ofdev, 2404static int talitos_probe(struct platform_device *ofdev,
2405 const struct of_device_id *match) 2405 const struct of_device_id *match)
2406{ 2406{
2407 struct device *dev = &ofdev->dev; 2407 struct device *dev = &ofdev->dev;
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
index f0fd6db6063c..cea08bed9cf9 100644
--- a/drivers/dma/fsldma.c
+++ b/drivers/dma/fsldma.c
@@ -1297,7 +1297,7 @@ static void fsl_dma_chan_remove(struct fsldma_chan *chan)
1297 kfree(chan); 1297 kfree(chan);
1298} 1298}
1299 1299
1300static int __devinit fsldma_of_probe(struct of_device *op, 1300static int __devinit fsldma_of_probe(struct platform_device *op,
1301 const struct of_device_id *match) 1301 const struct of_device_id *match)
1302{ 1302{
1303 struct fsldma_device *fdev; 1303 struct fsldma_device *fdev;
@@ -1382,7 +1382,7 @@ out_return:
1382 return err; 1382 return err;
1383} 1383}
1384 1384
1385static int fsldma_of_remove(struct of_device *op) 1385static int fsldma_of_remove(struct platform_device *op)
1386{ 1386{
1387 struct fsldma_device *fdev; 1387 struct fsldma_device *fdev;
1388 unsigned int i; 1388 unsigned int i;
diff --git a/drivers/dma/mpc512x_dma.c b/drivers/dma/mpc512x_dma.c
index 14a8c0f1698e..4e9cbf300594 100644
--- a/drivers/dma/mpc512x_dma.c
+++ b/drivers/dma/mpc512x_dma.c
@@ -627,7 +627,7 @@ mpc_dma_prep_memcpy(struct dma_chan *chan, dma_addr_t dst, dma_addr_t src,
627 return &mdesc->desc; 627 return &mdesc->desc;
628} 628}
629 629
630static int __devinit mpc_dma_probe(struct of_device *op, 630static int __devinit mpc_dma_probe(struct platform_device *op,
631 const struct of_device_id *match) 631 const struct of_device_id *match)
632{ 632{
633 struct device_node *dn = op->dev.of_node; 633 struct device_node *dn = op->dev.of_node;
@@ -753,7 +753,7 @@ static int __devinit mpc_dma_probe(struct of_device *op,
753 return retval; 753 return retval;
754} 754}
755 755
756static int __devexit mpc_dma_remove(struct of_device *op) 756static int __devexit mpc_dma_remove(struct platform_device *op)
757{ 757{
758 struct device *dev = &op->dev; 758 struct device *dev = &op->dev;
759 struct mpc_dma *mdma = dev_get_drvdata(dev); 759 struct mpc_dma *mdma = dev_get_drvdata(dev);
diff --git a/drivers/dma/ppc4xx/adma.c b/drivers/dma/ppc4xx/adma.c
index 7c3747902a37..0d58a4a4487f 100644
--- a/drivers/dma/ppc4xx/adma.c
+++ b/drivers/dma/ppc4xx/adma.c
@@ -4257,11 +4257,11 @@ static int ppc440spe_adma_setup_irqs(struct ppc440spe_adma_device *adev,
4257 struct ppc440spe_adma_chan *chan, 4257 struct ppc440spe_adma_chan *chan,
4258 int *initcode) 4258 int *initcode)
4259{ 4259{
4260 struct of_device *ofdev; 4260 struct platform_device *ofdev;
4261 struct device_node *np; 4261 struct device_node *np;
4262 int ret; 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 np = ofdev->dev.of_node; 4265 np = ofdev->dev.of_node;
4266 if (adev->id != PPC440SPE_XOR_ID) { 4266 if (adev->id != PPC440SPE_XOR_ID) {
4267 adev->err_irq = irq_of_parse_and_map(np, 1); 4267 adev->err_irq = irq_of_parse_and_map(np, 1);
@@ -4393,7 +4393,7 @@ static void ppc440spe_adma_release_irqs(struct ppc440spe_adma_device *adev,
4393/** 4393/**
4394 * ppc440spe_adma_probe - probe the asynch device 4394 * ppc440spe_adma_probe - probe the asynch device
4395 */ 4395 */
4396static int __devinit ppc440spe_adma_probe(struct of_device *ofdev, 4396static int __devinit ppc440spe_adma_probe(struct platform_device *ofdev,
4397 const struct of_device_id *match) 4397 const struct of_device_id *match)
4398{ 4398{
4399 struct device_node *np = ofdev->dev.of_node; 4399 struct device_node *np = ofdev->dev.of_node;
@@ -4625,7 +4625,7 @@ out:
4625/** 4625/**
4626 * ppc440spe_adma_remove - remove the asynch device 4626 * ppc440spe_adma_remove - remove the asynch device
4627 */ 4627 */
4628static int __devexit ppc440spe_adma_remove(struct of_device *ofdev) 4628static int __devexit ppc440spe_adma_remove(struct platform_device *ofdev)
4629{ 4629{
4630 struct ppc440spe_adma_device *adev = dev_get_drvdata(&ofdev->dev); 4630 struct ppc440spe_adma_device *adev = dev_get_drvdata(&ofdev->dev);
4631 struct device_node *np = ofdev->dev.of_node; 4631 struct device_node *np = ofdev->dev.of_node;
diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c
index af75e27f5224..b123bb308a4a 100644
--- a/drivers/edac/mpc85xx_edac.c
+++ b/drivers/edac/mpc85xx_edac.c
@@ -200,7 +200,7 @@ static irqreturn_t mpc85xx_pci_isr(int irq, void *dev_id)
200 return IRQ_HANDLED; 200 return IRQ_HANDLED;
201} 201}
202 202
203static int __devinit mpc85xx_pci_err_probe(struct of_device *op, 203static int __devinit mpc85xx_pci_err_probe(struct platform_device *op,
204 const struct of_device_id *match) 204 const struct of_device_id *match)
205{ 205{
206 struct edac_pci_ctl_info *pci; 206 struct edac_pci_ctl_info *pci;
@@ -305,7 +305,7 @@ err:
305 return res; 305 return res;
306} 306}
307 307
308static int mpc85xx_pci_err_remove(struct of_device *op) 308static int mpc85xx_pci_err_remove(struct platform_device *op)
309{ 309{
310 struct edac_pci_ctl_info *pci = dev_get_drvdata(&op->dev); 310 struct edac_pci_ctl_info *pci = dev_get_drvdata(&op->dev);
311 struct mpc85xx_pci_pdata *pdata = pci->pvt_info; 311 struct mpc85xx_pci_pdata *pdata = pci->pvt_info;
@@ -503,7 +503,7 @@ static irqreturn_t mpc85xx_l2_isr(int irq, void *dev_id)
503 return IRQ_HANDLED; 503 return IRQ_HANDLED;
504} 504}
505 505
506static int __devinit mpc85xx_l2_err_probe(struct of_device *op, 506static int __devinit mpc85xx_l2_err_probe(struct platform_device *op,
507 const struct of_device_id *match) 507 const struct of_device_id *match)
508{ 508{
509 struct edac_device_ctl_info *edac_dev; 509 struct edac_device_ctl_info *edac_dev;
@@ -613,7 +613,7 @@ err:
613 return res; 613 return res;
614} 614}
615 615
616static int mpc85xx_l2_err_remove(struct of_device *op) 616static int mpc85xx_l2_err_remove(struct platform_device *op)
617{ 617{
618 struct edac_device_ctl_info *edac_dev = dev_get_drvdata(&op->dev); 618 struct edac_device_ctl_info *edac_dev = dev_get_drvdata(&op->dev);
619 struct mpc85xx_l2_pdata *pdata = edac_dev->pvt_info; 619 struct mpc85xx_l2_pdata *pdata = edac_dev->pvt_info;
@@ -956,7 +956,7 @@ static void __devinit mpc85xx_init_csrows(struct mem_ctl_info *mci)
956 } 956 }
957} 957}
958 958
959static int __devinit mpc85xx_mc_err_probe(struct of_device *op, 959static int __devinit mpc85xx_mc_err_probe(struct platform_device *op,
960 const struct of_device_id *match) 960 const struct of_device_id *match)
961{ 961{
962 struct mem_ctl_info *mci; 962 struct mem_ctl_info *mci;
@@ -1088,7 +1088,7 @@ err:
1088 return res; 1088 return res;
1089} 1089}
1090 1090
1091static int mpc85xx_mc_err_remove(struct of_device *op) 1091static int mpc85xx_mc_err_remove(struct platform_device *op)
1092{ 1092{
1093 struct mem_ctl_info *mci = dev_get_drvdata(&op->dev); 1093 struct mem_ctl_info *mci = dev_get_drvdata(&op->dev);
1094 struct mpc85xx_mc_pdata *pdata = mci->pvt_info; 1094 struct mpc85xx_mc_pdata *pdata = mci->pvt_info;
diff --git a/drivers/edac/ppc4xx_edac.c b/drivers/edac/ppc4xx_edac.c
index e78839e89a06..070cea41b661 100644
--- a/drivers/edac/ppc4xx_edac.c
+++ b/drivers/edac/ppc4xx_edac.c
@@ -184,9 +184,9 @@ struct ppc4xx_ecc_status {
184 184
185/* Function Prototypes */ 185/* Function Prototypes */
186 186
187static int ppc4xx_edac_probe(struct of_device *device, 187static int ppc4xx_edac_probe(struct platform_device *device,
188 const struct of_device_id *device_id); 188 const struct of_device_id *device_id);
189static int ppc4xx_edac_remove(struct of_device *device); 189static int ppc4xx_edac_remove(struct platform_device *device);
190 190
191/* Global Variables */ 191/* Global Variables */
192 192
@@ -1014,7 +1014,7 @@ ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1)
1014 */ 1014 */
1015static int __devinit 1015static int __devinit
1016ppc4xx_edac_mc_init(struct mem_ctl_info *mci, 1016ppc4xx_edac_mc_init(struct mem_ctl_info *mci,
1017 struct of_device *op, 1017 struct platform_device *op,
1018 const struct of_device_id *match, 1018 const struct of_device_id *match,
1019 const dcr_host_t *dcr_host, 1019 const dcr_host_t *dcr_host,
1020 u32 mcopt1) 1020 u32 mcopt1)
@@ -1108,7 +1108,7 @@ ppc4xx_edac_mc_init(struct mem_ctl_info *mci,
1108 * mapped and assigned. 1108 * mapped and assigned.
1109 */ 1109 */
1110static int __devinit 1110static int __devinit
1111ppc4xx_edac_register_irq(struct of_device *op, struct mem_ctl_info *mci) 1111ppc4xx_edac_register_irq(struct platform_device *op, struct mem_ctl_info *mci)
1112{ 1112{
1113 int status = 0; 1113 int status = 0;
1114 int ded_irq, sec_irq; 1114 int ded_irq, sec_irq;
@@ -1238,7 +1238,7 @@ ppc4xx_edac_map_dcrs(const struct device_node *np, dcr_host_t *dcr_host)
1238 * driver; otherwise, < 0 on error. 1238 * driver; otherwise, < 0 on error.
1239 */ 1239 */
1240static int __devinit 1240static int __devinit
1241ppc4xx_edac_probe(struct of_device *op, const struct of_device_id *match) 1241ppc4xx_edac_probe(struct platform_device *op, const struct of_device_id *match)
1242{ 1242{
1243 int status = 0; 1243 int status = 0;
1244 u32 mcopt1, memcheck; 1244 u32 mcopt1, memcheck;
@@ -1359,7 +1359,7 @@ ppc4xx_edac_probe(struct of_device *op, const struct of_device_id *match)
1359 * Unconditionally returns 0. 1359 * Unconditionally returns 0.
1360 */ 1360 */
1361static int 1361static int
1362ppc4xx_edac_remove(struct of_device *op) 1362ppc4xx_edac_remove(struct platform_device *op)
1363{ 1363{
1364 struct mem_ctl_info *mci = dev_get_drvdata(&op->dev); 1364 struct mem_ctl_info *mci = dev_get_drvdata(&op->dev);
1365 struct ppc4xx_edac_pdata *pdata = mci->pvt_info; 1365 struct ppc4xx_edac_pdata *pdata = mci->pvt_info;
diff --git a/drivers/hwmon/ams/ams.h b/drivers/hwmon/ams/ams.h
index b28d7e27a031..90f094d45450 100644
--- a/drivers/hwmon/ams/ams.h
+++ b/drivers/hwmon/ams/ams.h
@@ -23,7 +23,7 @@ struct ams {
23 23
24 /* General properties */ 24 /* General properties */
25 struct device_node *of_node; 25 struct device_node *of_node;
26 struct of_device *of_dev; 26 struct platform_device *of_dev;
27 char has_device; 27 char has_device;
28 char vflag; 28 char vflag;
29 u32 orient1; 29 u32 orient1;
diff --git a/drivers/hwmon/ultra45_env.c b/drivers/hwmon/ultra45_env.c
index 89643261ccdb..d863e13a50b8 100644
--- a/drivers/hwmon/ultra45_env.c
+++ b/drivers/hwmon/ultra45_env.c
@@ -234,7 +234,7 @@ static const struct attribute_group env_group = {
234 .attrs = env_attributes, 234 .attrs = env_attributes,
235}; 235};
236 236
237static int __devinit env_probe(struct of_device *op, 237static int __devinit env_probe(struct platform_device *op,
238 const struct of_device_id *match) 238 const struct of_device_id *match)
239{ 239{
240 struct env *p = kzalloc(sizeof(*p), GFP_KERNEL); 240 struct env *p = kzalloc(sizeof(*p), GFP_KERNEL);
@@ -276,7 +276,7 @@ out_free:
276 goto out; 276 goto out;
277} 277}
278 278
279static int __devexit env_remove(struct of_device *op) 279static int __devexit env_remove(struct platform_device *op)
280{ 280{
281 struct env *p = dev_get_drvdata(&op->dev); 281 struct env *p = dev_get_drvdata(&op->dev);
282 282
diff --git a/drivers/i2c/busses/i2c-cpm.c b/drivers/i2c/busses/i2c-cpm.c
index e591de1bc704..f7bd2613cecc 100644
--- a/drivers/i2c/busses/i2c-cpm.c
+++ b/drivers/i2c/busses/i2c-cpm.c
@@ -105,7 +105,7 @@ struct i2c_reg {
105 105
106struct cpm_i2c { 106struct cpm_i2c {
107 char *base; 107 char *base;
108 struct of_device *ofdev; 108 struct platform_device *ofdev;
109 struct i2c_adapter adap; 109 struct i2c_adapter adap;
110 uint dp_addr; 110 uint dp_addr;
111 int version; /* CPM1=1, CPM2=2 */ 111 int version; /* CPM1=1, CPM2=2 */
@@ -428,7 +428,7 @@ static const struct i2c_adapter cpm_ops = {
428 428
429static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm) 429static 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 const u32 *data; 432 const u32 *data;
433 int len, ret, i; 433 int len, ret, i;
434 void __iomem *i2c_base; 434 void __iomem *i2c_base;
@@ -634,7 +634,7 @@ static void cpm_i2c_shutdown(struct cpm_i2c *cpm)
634 cpm_muram_free(cpm->i2c_addr); 634 cpm_muram_free(cpm->i2c_addr);
635} 635}
636 636
637static int __devinit cpm_i2c_probe(struct of_device *ofdev, 637static int __devinit cpm_i2c_probe(struct platform_device *ofdev,
638 const struct of_device_id *match) 638 const struct of_device_id *match)
639{ 639{
640 int result, len; 640 int result, len;
@@ -687,7 +687,7 @@ out_free:
687 return result; 687 return result;
688} 688}
689 689
690static int __devexit cpm_i2c_remove(struct of_device *ofdev) 690static int __devexit cpm_i2c_remove(struct platform_device *ofdev)
691{ 691{
692 struct cpm_i2c *cpm = dev_get_drvdata(&ofdev->dev); 692 struct cpm_i2c *cpm = dev_get_drvdata(&ofdev->dev);
693 693
diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c
index 1168d61418c9..43ca32fddde2 100644
--- a/drivers/i2c/busses/i2c-ibm_iic.c
+++ b/drivers/i2c/busses/i2c-ibm_iic.c
@@ -661,7 +661,7 @@ static inline u8 iic_clckdiv(unsigned int opb)
661 return (u8)((opb + 9) / 10 - 1); 661 return (u8)((opb + 9) / 10 - 1);
662} 662}
663 663
664static int __devinit iic_request_irq(struct of_device *ofdev, 664static int __devinit iic_request_irq(struct platform_device *ofdev,
665 struct ibm_iic_private *dev) 665 struct ibm_iic_private *dev)
666{ 666{
667 struct device_node *np = ofdev->dev.of_node; 667 struct device_node *np = ofdev->dev.of_node;
@@ -692,7 +692,7 @@ static int __devinit iic_request_irq(struct of_device *ofdev,
692/* 692/*
693 * Register single IIC interface 693 * Register single IIC interface
694 */ 694 */
695static int __devinit iic_probe(struct of_device *ofdev, 695static int __devinit iic_probe(struct platform_device *ofdev,
696 const struct of_device_id *match) 696 const struct of_device_id *match)
697{ 697{
698 struct device_node *np = ofdev->dev.of_node; 698 struct device_node *np = ofdev->dev.of_node;
@@ -780,7 +780,7 @@ error_cleanup:
780/* 780/*
781 * Cleanup initialized IIC interface 781 * Cleanup initialized IIC interface
782 */ 782 */
783static int __devexit iic_remove(struct of_device *ofdev) 783static int __devexit iic_remove(struct platform_device *ofdev)
784{ 784{
785 struct ibm_iic_private *dev = dev_get_drvdata(&ofdev->dev); 785 struct ibm_iic_private *dev = dev_get_drvdata(&ofdev->dev);
786 786
diff --git a/drivers/i2c/busses/i2c-mpc.c b/drivers/i2c/busses/i2c-mpc.c
index 6545d1c99b61..a1c419a716af 100644
--- a/drivers/i2c/busses/i2c-mpc.c
+++ b/drivers/i2c/busses/i2c-mpc.c
@@ -560,7 +560,7 @@ static struct i2c_adapter mpc_ops = {
560 .timeout = HZ, 560 .timeout = HZ,
561}; 561};
562 562
563static int __devinit fsl_i2c_probe(struct of_device *op, 563static int __devinit fsl_i2c_probe(struct platform_device *op,
564 const struct of_device_id *match) 564 const struct of_device_id *match)
565{ 565{
566 struct mpc_i2c *i2c; 566 struct mpc_i2c *i2c;
@@ -646,7 +646,7 @@ static int __devinit fsl_i2c_probe(struct of_device *op,
646 return result; 646 return result;
647}; 647};
648 648
649static int __devexit fsl_i2c_remove(struct of_device *op) 649static int __devexit fsl_i2c_remove(struct platform_device *op)
650{ 650{
651 struct mpc_i2c *i2c = dev_get_drvdata(&op->dev); 651 struct mpc_i2c *i2c = dev_get_drvdata(&op->dev);
652 652
diff --git a/drivers/infiniband/hw/ehca/ehca_classes.h b/drivers/infiniband/hw/ehca/ehca_classes.h
index 0136abd50dd4..aaf6023a4835 100644
--- a/drivers/infiniband/hw/ehca/ehca_classes.h
+++ b/drivers/infiniband/hw/ehca/ehca_classes.h
@@ -112,7 +112,7 @@ struct ehca_sport {
112 112
113struct ehca_shca { 113struct ehca_shca {
114 struct ib_device ib_device; 114 struct ib_device ib_device;
115 struct of_device *ofdev; 115 struct platform_device *ofdev;
116 u8 num_ports; 116 u8 num_ports;
117 int hw_level; 117 int hw_level;
118 struct list_head shca_list; 118 struct list_head shca_list;
diff --git a/drivers/infiniband/hw/ehca/ehca_main.c b/drivers/infiniband/hw/ehca/ehca_main.c
index cfc4de7a5da4..c240e9972cb0 100644
--- a/drivers/infiniband/hw/ehca/ehca_main.c
+++ b/drivers/infiniband/hw/ehca/ehca_main.c
@@ -713,7 +713,7 @@ static struct attribute_group ehca_dev_attr_grp = {
713 .attrs = ehca_dev_attrs 713 .attrs = ehca_dev_attrs
714}; 714};
715 715
716static int __devinit ehca_probe(struct of_device *dev, 716static int __devinit ehca_probe(struct platform_device *dev,
717 const struct of_device_id *id) 717 const struct of_device_id *id)
718{ 718{
719 struct ehca_shca *shca; 719 struct ehca_shca *shca;
@@ -879,7 +879,7 @@ probe1:
879 return -EINVAL; 879 return -EINVAL;
880} 880}
881 881
882static int __devexit ehca_remove(struct of_device *dev) 882static int __devexit ehca_remove(struct platform_device *dev)
883{ 883{
884 struct ehca_shca *shca = dev_get_drvdata(&dev->dev); 884 struct ehca_shca *shca = dev_get_drvdata(&dev->dev);
885 unsigned long flags; 885 unsigned long flags;
diff --git a/drivers/input/misc/sparcspkr.c b/drivers/input/misc/sparcspkr.c
index f3bb92e9755f..8e130bf7d32b 100644
--- a/drivers/input/misc/sparcspkr.c
+++ b/drivers/input/misc/sparcspkr.c
@@ -173,7 +173,7 @@ static int __devinit sparcspkr_probe(struct device *dev)
173 return 0; 173 return 0;
174} 174}
175 175
176static int sparcspkr_shutdown(struct of_device *dev) 176static int sparcspkr_shutdown(struct platform_device *dev)
177{ 177{
178 struct sparcspkr_state *state = dev_get_drvdata(&dev->dev); 178 struct sparcspkr_state *state = dev_get_drvdata(&dev->dev);
179 struct input_dev *input_dev = state->input_dev; 179 struct input_dev *input_dev = state->input_dev;
@@ -184,7 +184,7 @@ static int sparcspkr_shutdown(struct of_device *dev)
184 return 0; 184 return 0;
185} 185}
186 186
187static int __devinit bbc_beep_probe(struct of_device *op, const struct of_device_id *match) 187static int __devinit bbc_beep_probe(struct platform_device *op, const struct of_device_id *match)
188{ 188{
189 struct sparcspkr_state *state; 189 struct sparcspkr_state *state;
190 struct bbc_beep_info *info; 190 struct bbc_beep_info *info;
@@ -231,7 +231,7 @@ out_err:
231 return err; 231 return err;
232} 232}
233 233
234static int __devexit bbc_remove(struct of_device *op) 234static int __devexit bbc_remove(struct platform_device *op)
235{ 235{
236 struct sparcspkr_state *state = dev_get_drvdata(&op->dev); 236 struct sparcspkr_state *state = dev_get_drvdata(&op->dev);
237 struct input_dev *input_dev = state->input_dev; 237 struct input_dev *input_dev = state->input_dev;
@@ -269,7 +269,7 @@ static struct of_platform_driver bbc_beep_driver = {
269 .shutdown = sparcspkr_shutdown, 269 .shutdown = sparcspkr_shutdown,
270}; 270};
271 271
272static int __devinit grover_beep_probe(struct of_device *op, const struct of_device_id *match) 272static int __devinit grover_beep_probe(struct platform_device *op, const struct of_device_id *match)
273{ 273{
274 struct sparcspkr_state *state; 274 struct sparcspkr_state *state;
275 struct grover_beep_info *info; 275 struct grover_beep_info *info;
@@ -312,7 +312,7 @@ out_err:
312 return err; 312 return err;
313} 313}
314 314
315static int __devexit grover_remove(struct of_device *op) 315static int __devexit grover_remove(struct platform_device *op)
316{ 316{
317 struct sparcspkr_state *state = dev_get_drvdata(&op->dev); 317 struct sparcspkr_state *state = dev_get_drvdata(&op->dev);
318 struct grover_beep_info *info = &state->u.grover; 318 struct grover_beep_info *info = &state->u.grover;
diff --git a/drivers/input/serio/i8042-sparcio.h b/drivers/input/serio/i8042-sparcio.h
index cb2a24b94746..c5cc4508d6df 100644
--- a/drivers/input/serio/i8042-sparcio.h
+++ b/drivers/input/serio/i8042-sparcio.h
@@ -49,7 +49,7 @@ static inline void i8042_write_command(int val)
49#define OBP_PS2MS_NAME1 "kdmouse" 49#define OBP_PS2MS_NAME1 "kdmouse"
50#define OBP_PS2MS_NAME2 "mouse" 50#define OBP_PS2MS_NAME2 "mouse"
51 51
52static int __devinit sparc_i8042_probe(struct of_device *op, const struct of_device_id *match) 52static int __devinit sparc_i8042_probe(struct platform_device *op, const struct of_device_id *match)
53{ 53{
54 struct device_node *dp = op->dev.of_node; 54 struct device_node *dp = op->dev.of_node;
55 55
@@ -57,7 +57,7 @@ static int __devinit sparc_i8042_probe(struct of_device *op, const struct of_dev
57 while (dp) { 57 while (dp) {
58 if (!strcmp(dp->name, OBP_PS2KBD_NAME1) || 58 if (!strcmp(dp->name, OBP_PS2KBD_NAME1) ||
59 !strcmp(dp->name, OBP_PS2KBD_NAME2)) { 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 unsigned int irq = kbd->archdata.irqs[0]; 61 unsigned int irq = kbd->archdata.irqs[0];
62 if (irq == 0xffffffff) 62 if (irq == 0xffffffff)
63 irq = op->archdata.irqs[0]; 63 irq = op->archdata.irqs[0];
@@ -67,7 +67,7 @@ static int __devinit sparc_i8042_probe(struct of_device *op, const struct of_dev
67 kbd_res = &kbd->resource[0]; 67 kbd_res = &kbd->resource[0];
68 } else if (!strcmp(dp->name, OBP_PS2MS_NAME1) || 68 } else if (!strcmp(dp->name, OBP_PS2MS_NAME1) ||
69 !strcmp(dp->name, OBP_PS2MS_NAME2)) { 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 unsigned int irq = ms->archdata.irqs[0]; 71 unsigned int irq = ms->archdata.irqs[0];
72 if (irq == 0xffffffff) 72 if (irq == 0xffffffff)
73 irq = op->archdata.irqs[0]; 73 irq = op->archdata.irqs[0];
@@ -80,7 +80,7 @@ static int __devinit sparc_i8042_probe(struct of_device *op, const struct of_dev
80 return 0; 80 return 0;
81} 81}
82 82
83static int __devexit sparc_i8042_remove(struct of_device *op) 83static int __devexit sparc_i8042_remove(struct platform_device *op)
84{ 84{
85 of_iounmap(kbd_res, kbd_iobase, 8); 85 of_iounmap(kbd_res, kbd_iobase, 8);
86 86
diff --git a/drivers/input/serio/xilinx_ps2.c b/drivers/input/serio/xilinx_ps2.c
index e2c028d2638f..bb14449fb022 100644
--- a/drivers/input/serio/xilinx_ps2.c
+++ b/drivers/input/serio/xilinx_ps2.c
@@ -232,7 +232,7 @@ static void sxps2_close(struct serio *pserio)
232 * It returns 0, if the driver is bound to the PS/2 device, or a negative 232 * It returns 0, if the driver is bound to the PS/2 device, or a negative
233 * value if there is an error. 233 * value if there is an error.
234 */ 234 */
235static int __devinit xps2_of_probe(struct of_device *ofdev, 235static int __devinit xps2_of_probe(struct platform_device *ofdev,
236 const struct of_device_id *match) 236 const struct of_device_id *match)
237{ 237{
238 struct resource r_irq; /* Interrupt resources */ 238 struct resource r_irq; /* Interrupt resources */
@@ -332,7 +332,7 @@ failed1:
332 * if the driver module is being unloaded. It frees any resources allocated to 332 * if the driver module is being unloaded. It frees any resources allocated to
333 * the device. 333 * the device.
334 */ 334 */
335static int __devexit xps2_of_remove(struct of_device *of_dev) 335static int __devexit xps2_of_remove(struct platform_device *of_dev)
336{ 336{
337 struct device *dev = &of_dev->dev; 337 struct device *dev = &of_dev->dev;
338 struct xps2data *drvdata = dev_get_drvdata(dev); 338 struct xps2data *drvdata = dev_get_drvdata(dev);
diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
index cc22eeefa10b..ea57e05d08f3 100644
--- a/drivers/leds/leds-gpio.c
+++ b/drivers/leds/leds-gpio.c
@@ -224,7 +224,7 @@ struct gpio_led_of_platform_data {
224 struct gpio_led_data led_data[]; 224 struct gpio_led_data led_data[];
225}; 225};
226 226
227static int __devinit of_gpio_leds_probe(struct of_device *ofdev, 227static int __devinit of_gpio_leds_probe(struct platform_device *ofdev,
228 const struct of_device_id *match) 228 const struct of_device_id *match)
229{ 229{
230 struct device_node *np = ofdev->dev.of_node, *child; 230 struct device_node *np = ofdev->dev.of_node, *child;
@@ -283,7 +283,7 @@ err:
283 return ret; 283 return ret;
284} 284}
285 285
286static int __devexit of_gpio_leds_remove(struct of_device *ofdev) 286static int __devexit of_gpio_leds_remove(struct platform_device *ofdev)
287{ 287{
288 struct gpio_led_of_platform_data *pdata = dev_get_drvdata(&ofdev->dev); 288 struct gpio_led_of_platform_data *pdata = dev_get_drvdata(&ofdev->dev);
289 int i; 289 int i;
diff --git a/drivers/macintosh/macio_sysfs.c b/drivers/macintosh/macio_sysfs.c
index 6024038a5b9d..8eb40afbd0f5 100644
--- a/drivers/macintosh/macio_sysfs.c
+++ b/drivers/macintosh/macio_sysfs.c
@@ -15,7 +15,7 @@ field##_show (struct device *dev, struct device_attribute *attr, \
15static ssize_t 15static ssize_t
16compatible_show (struct device *dev, struct device_attribute *attr, char *buf) 16compatible_show (struct device *dev, struct device_attribute *attr, char *buf)
17{ 17{
18 struct of_device *of; 18 struct platform_device *of;
19 const char *compat; 19 const char *compat;
20 int cplen; 20 int cplen;
21 int length = 0; 21 int length = 0;
@@ -52,9 +52,9 @@ static ssize_t modalias_show (struct device *dev, struct device_attribute *attr,
52static ssize_t devspec_show(struct device *dev, 52static ssize_t devspec_show(struct device *dev,
53 struct device_attribute *attr, char *buf) 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 return sprintf(buf, "%s\n", ofdev->dev.of_node->full_name); 58 return sprintf(buf, "%s\n", ofdev->dev.of_node->full_name);
59} 59}
60 60
diff --git a/drivers/macintosh/smu.c b/drivers/macintosh/smu.c
index 2506c957712e..e58c3d33e035 100644
--- a/drivers/macintosh/smu.c
+++ b/drivers/macintosh/smu.c
@@ -75,7 +75,7 @@ struct smu_cmd_buf {
75struct smu_device { 75struct smu_device {
76 spinlock_t lock; 76 spinlock_t lock;
77 struct device_node *of_node; 77 struct device_node *of_node;
78 struct of_device *of_dev; 78 struct platform_device *of_dev;
79 int doorbell; /* doorbell gpio */ 79 int doorbell; /* doorbell gpio */
80 u32 __iomem *db_buf; /* doorbell buffer */ 80 u32 __iomem *db_buf; /* doorbell buffer */
81 struct device_node *db_node; 81 struct device_node *db_node;
@@ -645,7 +645,7 @@ static void smu_expose_childs(struct work_struct *unused)
645 645
646static DECLARE_WORK(smu_expose_childs_work, smu_expose_childs); 646static DECLARE_WORK(smu_expose_childs_work, smu_expose_childs);
647 647
648static int smu_platform_probe(struct of_device* dev, 648static int smu_platform_probe(struct platform_device* dev,
649 const struct of_device_id *match) 649 const struct of_device_id *match)
650{ 650{
651 if (!smu) 651 if (!smu)
@@ -695,7 +695,7 @@ static int __init smu_init_sysfs(void)
695 695
696device_initcall(smu_init_sysfs); 696device_initcall(smu_init_sysfs);
697 697
698struct of_device *smu_get_ofdev(void) 698struct platform_device *smu_get_ofdev(void)
699{ 699{
700 if (!smu) 700 if (!smu)
701 return NULL; 701 return NULL;
diff --git a/drivers/macintosh/therm_adt746x.c b/drivers/macintosh/therm_adt746x.c
index c42eeb43042d..d0d221332db0 100644
--- a/drivers/macintosh/therm_adt746x.c
+++ b/drivers/macintosh/therm_adt746x.c
@@ -84,7 +84,7 @@ struct thermostat {
84 84
85static enum {ADT7460, ADT7467} therm_type; 85static enum {ADT7460, ADT7467} therm_type;
86static int therm_bus, therm_address; 86static int therm_bus, therm_address;
87static struct of_device * of_dev; 87static struct platform_device * of_dev;
88static struct thermostat* thermostat; 88static struct thermostat* thermostat;
89static struct task_struct *thread_therm = NULL; 89static struct task_struct *thread_therm = NULL;
90 90
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c
index e60605bd0ea9..44549272333c 100644
--- a/drivers/macintosh/therm_pm72.c
+++ b/drivers/macintosh/therm_pm72.c
@@ -148,7 +148,7 @@
148 * Driver statics 148 * Driver statics
149 */ 149 */
150 150
151static struct of_device * of_dev; 151static struct platform_device * of_dev;
152static struct i2c_adapter * u3_0; 152static struct i2c_adapter * u3_0;
153static struct i2c_adapter * u3_1; 153static struct i2c_adapter * u3_1;
154static struct i2c_adapter * k2; 154static struct i2c_adapter * k2;
@@ -2210,7 +2210,7 @@ static void fcu_lookup_fans(struct device_node *fcu_node)
2210 } 2210 }
2211} 2211}
2212 2212
2213static int fcu_of_probe(struct of_device* dev, const struct of_device_id *match) 2213static int fcu_of_probe(struct platform_device* dev, const struct of_device_id *match)
2214{ 2214{
2215 state = state_detached; 2215 state = state_detached;
2216 2216
@@ -2221,7 +2221,7 @@ static int fcu_of_probe(struct of_device* dev, const struct of_device_id *match)
2221 return i2c_add_driver(&therm_pm72_driver); 2221 return i2c_add_driver(&therm_pm72_driver);
2222} 2222}
2223 2223
2224static int fcu_of_remove(struct of_device* dev) 2224static int fcu_of_remove(struct platform_device* dev)
2225{ 2225{
2226 i2c_del_driver(&therm_pm72_driver); 2226 i2c_del_driver(&therm_pm72_driver);
2227 2227
diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c
index 5c9367acf0cf..133f195de1fd 100644
--- a/drivers/macintosh/therm_windtunnel.c
+++ b/drivers/macintosh/therm_windtunnel.c
@@ -52,7 +52,7 @@ static struct {
52 struct task_struct *poll_task; 52 struct task_struct *poll_task;
53 53
54 struct mutex lock; 54 struct mutex lock;
55 struct of_device *of_dev; 55 struct platform_device *of_dev;
56 56
57 struct i2c_client *thermostat; 57 struct i2c_client *thermostat;
58 struct i2c_client *fan; 58 struct i2c_client *fan;
@@ -444,13 +444,13 @@ static struct i2c_driver g4fan_driver = {
444/************************************************************************/ 444/************************************************************************/
445 445
446static int 446static int
447therm_of_probe( struct of_device *dev, const struct of_device_id *match ) 447therm_of_probe( struct platform_device *dev, const struct of_device_id *match )
448{ 448{
449 return i2c_add_driver( &g4fan_driver ); 449 return i2c_add_driver( &g4fan_driver );
450} 450}
451 451
452static int 452static int
453therm_of_remove( struct of_device *dev ) 453therm_of_remove( struct platform_device *dev )
454{ 454{
455 i2c_del_driver( &g4fan_driver ); 455 i2c_del_driver( &g4fan_driver );
456 return 0; 456 return 0;
diff --git a/drivers/media/video/fsl-viu.c b/drivers/media/video/fsl-viu.c
index 8f1c94f7e00c..43d208f1f586 100644
--- a/drivers/media/video/fsl-viu.c
+++ b/drivers/media/video/fsl-viu.c
@@ -1418,7 +1418,7 @@ static struct video_device viu_template = {
1418 .current_norm = V4L2_STD_NTSC_M, 1418 .current_norm = V4L2_STD_NTSC_M,
1419}; 1419};
1420 1420
1421static int __devinit viu_of_probe(struct of_device *op, 1421static int __devinit viu_of_probe(struct platform_device *op,
1422 const struct of_device_id *match) 1422 const struct of_device_id *match)
1423{ 1423{
1424 struct viu_dev *viu_dev; 1424 struct viu_dev *viu_dev;
@@ -1549,7 +1549,7 @@ err:
1549 return ret; 1549 return ret;
1550} 1550}
1551 1551
1552static int __devexit viu_of_remove(struct of_device *op) 1552static int __devexit viu_of_remove(struct platform_device *op)
1553{ 1553{
1554 struct v4l2_device *v4l2_dev = dev_get_drvdata(&op->dev); 1554 struct v4l2_device *v4l2_dev = dev_get_drvdata(&op->dev);
1555 struct viu_dev *dev = container_of(v4l2_dev, struct viu_dev, v4l2_dev); 1555 struct viu_dev *dev = container_of(v4l2_dev, struct viu_dev, v4l2_dev);
@@ -1570,7 +1570,7 @@ static int __devexit viu_of_remove(struct of_device *op)
1570} 1570}
1571 1571
1572#ifdef CONFIG_PM 1572#ifdef CONFIG_PM
1573static int viu_suspend(struct of_device *op, pm_message_t state) 1573static int viu_suspend(struct platform_device *op, pm_message_t state)
1574{ 1574{
1575 struct v4l2_device *v4l2_dev = dev_get_drvdata(&op->dev); 1575 struct v4l2_device *v4l2_dev = dev_get_drvdata(&op->dev);
1576 struct viu_dev *dev = container_of(v4l2_dev, struct viu_dev, v4l2_dev); 1576 struct viu_dev *dev = container_of(v4l2_dev, struct viu_dev, v4l2_dev);
@@ -1579,7 +1579,7 @@ static int viu_suspend(struct of_device *op, pm_message_t state)
1579 return 0; 1579 return 0;
1580} 1580}
1581 1581
1582static int viu_resume(struct of_device *op) 1582static int viu_resume(struct platform_device *op)
1583{ 1583{
1584 struct v4l2_device *v4l2_dev = dev_get_drvdata(&op->dev); 1584 struct v4l2_device *v4l2_dev = dev_get_drvdata(&op->dev);
1585 struct viu_dev *dev = container_of(v4l2_dev, struct viu_dev, v4l2_dev); 1585 struct viu_dev *dev = container_of(v4l2_dev, struct viu_dev, v4l2_dev);
diff --git a/drivers/mmc/host/mmc_spi.c b/drivers/mmc/host/mmc_spi.c
index 7b0f3ef50f96..1145ea0792e6 100644
--- a/drivers/mmc/host/mmc_spi.c
+++ b/drivers/mmc/host/mmc_spi.c
@@ -1536,6 +1536,7 @@ static int __devexit mmc_spi_remove(struct spi_device *spi)
1536#if defined(CONFIG_OF) 1536#if defined(CONFIG_OF)
1537static struct of_device_id mmc_spi_of_match_table[] __devinitdata = { 1537static struct of_device_id mmc_spi_of_match_table[] __devinitdata = {
1538 { .compatible = "mmc-spi-slot", }, 1538 { .compatible = "mmc-spi-slot", },
1539 {},
1539}; 1540};
1540#endif 1541#endif
1541 1542
diff --git a/drivers/mmc/host/sdhci-of-core.c b/drivers/mmc/host/sdhci-of-core.c
index dd1bdd168e66..c51b71174c1d 100644
--- a/drivers/mmc/host/sdhci-of-core.c
+++ b/drivers/mmc/host/sdhci-of-core.c
@@ -85,14 +85,14 @@ void sdhci_be32bs_writeb(struct sdhci_host *host, u8 val, int reg)
85 85
86#ifdef CONFIG_PM 86#ifdef CONFIG_PM
87 87
88static int sdhci_of_suspend(struct of_device *ofdev, pm_message_t state) 88static int sdhci_of_suspend(struct platform_device *ofdev, pm_message_t state)
89{ 89{
90 struct sdhci_host *host = dev_get_drvdata(&ofdev->dev); 90 struct sdhci_host *host = dev_get_drvdata(&ofdev->dev);
91 91
92 return mmc_suspend_host(host->mmc); 92 return mmc_suspend_host(host->mmc);
93} 93}
94 94
95static int sdhci_of_resume(struct of_device *ofdev) 95static int sdhci_of_resume(struct platform_device *ofdev)
96{ 96{
97 struct sdhci_host *host = dev_get_drvdata(&ofdev->dev); 97 struct sdhci_host *host = dev_get_drvdata(&ofdev->dev);
98 98
@@ -115,7 +115,7 @@ static bool __devinit sdhci_of_wp_inverted(struct device_node *np)
115 return machine_is(mpc837x_rdb) || machine_is(mpc837x_mds); 115 return machine_is(mpc837x_rdb) || machine_is(mpc837x_mds);
116} 116}
117 117
118static int __devinit sdhci_of_probe(struct of_device *ofdev, 118static int __devinit sdhci_of_probe(struct platform_device *ofdev,
119 const struct of_device_id *match) 119 const struct of_device_id *match)
120{ 120{
121 struct device_node *np = ofdev->dev.of_node; 121 struct device_node *np = ofdev->dev.of_node;
@@ -183,7 +183,7 @@ err_addr_map:
183 return ret; 183 return ret;
184} 184}
185 185
186static int __devexit sdhci_of_remove(struct of_device *ofdev) 186static int __devexit sdhci_of_remove(struct platform_device *ofdev)
187{ 187{
188 struct sdhci_host *host = dev_get_drvdata(&ofdev->dev); 188 struct sdhci_host *host = dev_get_drvdata(&ofdev->dev);
189 189
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c
index 6ac5f9f28ac3..00af55d7afba 100644
--- a/drivers/mtd/maps/physmap_of.c
+++ b/drivers/mtd/maps/physmap_of.c
@@ -43,7 +43,7 @@ struct of_flash {
43#ifdef CONFIG_MTD_PARTITIONS 43#ifdef CONFIG_MTD_PARTITIONS
44#define OF_FLASH_PARTS(info) ((info)->parts) 44#define OF_FLASH_PARTS(info) ((info)->parts)
45 45
46static int parse_obsolete_partitions(struct of_device *dev, 46static int parse_obsolete_partitions(struct platform_device *dev,
47 struct of_flash *info, 47 struct of_flash *info,
48 struct device_node *dp) 48 struct device_node *dp)
49{ 49{
@@ -93,7 +93,7 @@ static int parse_obsolete_partitions(struct of_device *dev,
93#define parse_partitions(info, dev) (0) 93#define parse_partitions(info, dev) (0)
94#endif /* MTD_PARTITIONS */ 94#endif /* MTD_PARTITIONS */
95 95
96static int of_flash_remove(struct of_device *dev) 96static int of_flash_remove(struct platform_device *dev)
97{ 97{
98 struct of_flash *info; 98 struct of_flash *info;
99 int i; 99 int i;
@@ -140,7 +140,7 @@ static int of_flash_remove(struct of_device *dev)
140/* Helper function to handle probing of the obsolete "direct-mapped" 140/* Helper function to handle probing of the obsolete "direct-mapped"
141 * compatible binding, which has an extra "probe-type" property 141 * compatible binding, which has an extra "probe-type" property
142 * describing the type of flash probe necessary. */ 142 * describing the type of flash probe necessary. */
143static struct mtd_info * __devinit obsolete_probe(struct of_device *dev, 143static struct mtd_info * __devinit obsolete_probe(struct platform_device *dev,
144 struct map_info *map) 144 struct map_info *map)
145{ 145{
146 struct device_node *dp = dev->dev.of_node; 146 struct device_node *dp = dev->dev.of_node;
@@ -215,7 +215,7 @@ static void __devinit of_free_probes(const char **probes)
215} 215}
216#endif 216#endif
217 217
218static int __devinit of_flash_probe(struct of_device *dev, 218static int __devinit of_flash_probe(struct platform_device *dev,
219 const struct of_device_id *match) 219 const struct of_device_id *match)
220{ 220{
221#ifdef CONFIG_MTD_PARTITIONS 221#ifdef CONFIG_MTD_PARTITIONS
diff --git a/drivers/mtd/maps/sun_uflash.c b/drivers/mtd/maps/sun_uflash.c
index 8984236a8d0a..3582ba1f9b09 100644
--- a/drivers/mtd/maps/sun_uflash.c
+++ b/drivers/mtd/maps/sun_uflash.c
@@ -48,7 +48,7 @@ struct map_info uflash_map_templ = {
48 .bankwidth = UFLASH_BUSWIDTH, 48 .bankwidth = UFLASH_BUSWIDTH,
49}; 49};
50 50
51int uflash_devinit(struct of_device *op, struct device_node *dp) 51int uflash_devinit(struct platform_device *op, struct device_node *dp)
52{ 52{
53 struct uflash_dev *up; 53 struct uflash_dev *up;
54 54
@@ -108,7 +108,7 @@ int uflash_devinit(struct of_device *op, struct device_node *dp)
108 return 0; 108 return 0;
109} 109}
110 110
111static int __devinit uflash_probe(struct of_device *op, const struct of_device_id *match) 111static int __devinit uflash_probe(struct platform_device *op, const struct of_device_id *match)
112{ 112{
113 struct device_node *dp = op->dev.of_node; 113 struct device_node *dp = op->dev.of_node;
114 114
@@ -121,7 +121,7 @@ static int __devinit uflash_probe(struct of_device *op, const struct of_device_i
121 return uflash_devinit(op, dp); 121 return uflash_devinit(op, dp);
122} 122}
123 123
124static int __devexit uflash_remove(struct of_device *op) 124static int __devexit uflash_remove(struct platform_device *op)
125{ 125{
126 struct uflash_dev *up = dev_get_drvdata(&op->dev); 126 struct uflash_dev *up = dev_get_drvdata(&op->dev);
127 127
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c
index 5084cc517944..80de0bff6c3a 100644
--- a/drivers/mtd/nand/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/fsl_elbc_nand.c
@@ -958,7 +958,7 @@ static int __devinit fsl_elbc_ctrl_init(struct fsl_elbc_ctrl *ctrl)
958 return 0; 958 return 0;
959} 959}
960 960
961static int fsl_elbc_ctrl_remove(struct of_device *ofdev) 961static int fsl_elbc_ctrl_remove(struct platform_device *ofdev)
962{ 962{
963 struct fsl_elbc_ctrl *ctrl = dev_get_drvdata(&ofdev->dev); 963 struct fsl_elbc_ctrl *ctrl = dev_get_drvdata(&ofdev->dev);
964 int i; 964 int i;
@@ -1013,7 +1013,7 @@ static irqreturn_t fsl_elbc_ctrl_irq(int irqno, void *data)
1013 * in the chip probe function. 1013 * in the chip probe function.
1014*/ 1014*/
1015 1015
1016static int __devinit fsl_elbc_ctrl_probe(struct of_device *ofdev, 1016static int __devinit fsl_elbc_ctrl_probe(struct platform_device *ofdev,
1017 const struct of_device_id *match) 1017 const struct of_device_id *match)
1018{ 1018{
1019 struct device_node *child; 1019 struct device_node *child;
diff --git a/drivers/mtd/nand/fsl_upm.c b/drivers/mtd/nand/fsl_upm.c
index 1312eda57ba6..4eff8b25e5af 100644
--- a/drivers/mtd/nand/fsl_upm.c
+++ b/drivers/mtd/nand/fsl_upm.c
@@ -217,7 +217,7 @@ err:
217 return ret; 217 return ret;
218} 218}
219 219
220static int __devinit fun_probe(struct of_device *ofdev, 220static int __devinit fun_probe(struct platform_device *ofdev,
221 const struct of_device_id *ofid) 221 const struct of_device_id *ofid)
222{ 222{
223 struct fsl_upm_nand *fun; 223 struct fsl_upm_nand *fun;
@@ -335,7 +335,7 @@ err1:
335 return ret; 335 return ret;
336} 336}
337 337
338static int __devexit fun_remove(struct of_device *ofdev) 338static int __devexit fun_remove(struct platform_device *ofdev)
339{ 339{
340 struct fsl_upm_nand *fun = dev_get_drvdata(&ofdev->dev); 340 struct fsl_upm_nand *fun = dev_get_drvdata(&ofdev->dev);
341 int i; 341 int i;
diff --git a/drivers/mtd/nand/mpc5121_nfc.c b/drivers/mtd/nand/mpc5121_nfc.c
index 0a130dcaa129..df0c1da4ff49 100644
--- a/drivers/mtd/nand/mpc5121_nfc.c
+++ b/drivers/mtd/nand/mpc5121_nfc.c
@@ -647,7 +647,7 @@ static void mpc5121_nfc_free(struct device *dev, struct mtd_info *mtd)
647 iounmap(prv->csreg); 647 iounmap(prv->csreg);
648} 648}
649 649
650static int __devinit mpc5121_nfc_probe(struct of_device *op, 650static int __devinit mpc5121_nfc_probe(struct platform_device *op,
651 const struct of_device_id *match) 651 const struct of_device_id *match)
652{ 652{
653 struct device_node *rootnode, *dn = op->dev.of_node; 653 struct device_node *rootnode, *dn = op->dev.of_node;
@@ -869,7 +869,7 @@ error:
869 return retval; 869 return retval;
870} 870}
871 871
872static int __devexit mpc5121_nfc_remove(struct of_device *op) 872static int __devexit mpc5121_nfc_remove(struct platform_device *op)
873{ 873{
874 struct device *dev = &op->dev; 874 struct device *dev = &op->dev;
875 struct mtd_info *mtd = dev_get_drvdata(dev); 875 struct mtd_info *mtd = dev_get_drvdata(dev);
diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c
index 98fd2bdf8be1..510554e6c115 100644
--- a/drivers/mtd/nand/ndfc.c
+++ b/drivers/mtd/nand/ndfc.c
@@ -35,7 +35,7 @@
35 35
36 36
37struct ndfc_controller { 37struct ndfc_controller {
38 struct of_device *ofdev; 38 struct platform_device *ofdev;
39 void __iomem *ndfcbase; 39 void __iomem *ndfcbase;
40 struct mtd_info mtd; 40 struct mtd_info mtd;
41 struct nand_chip chip; 41 struct nand_chip chip;
@@ -225,7 +225,7 @@ err:
225 return ret; 225 return ret;
226} 226}
227 227
228static int __devinit ndfc_probe(struct of_device *ofdev, 228static int __devinit ndfc_probe(struct platform_device *ofdev,
229 const struct of_device_id *match) 229 const struct of_device_id *match)
230{ 230{
231 struct ndfc_controller *ndfc = &ndfc_ctrl; 231 struct ndfc_controller *ndfc = &ndfc_ctrl;
@@ -277,7 +277,7 @@ static int __devinit ndfc_probe(struct of_device *ofdev,
277 return 0; 277 return 0;
278} 278}
279 279
280static int __devexit ndfc_remove(struct of_device *ofdev) 280static int __devexit ndfc_remove(struct platform_device *ofdev)
281{ 281{
282 struct ndfc_controller *ndfc = dev_get_drvdata(&ofdev->dev); 282 struct ndfc_controller *ndfc = dev_get_drvdata(&ofdev->dev);
283 283
diff --git a/drivers/mtd/nand/pasemi_nand.c b/drivers/mtd/nand/pasemi_nand.c
index f02af24d033a..6ddb2461d740 100644
--- a/drivers/mtd/nand/pasemi_nand.c
+++ b/drivers/mtd/nand/pasemi_nand.c
@@ -89,7 +89,7 @@ int pasemi_device_ready(struct mtd_info *mtd)
89 return !!(inl(lpcctl) & LBICTRL_LPCCTL_NR); 89 return !!(inl(lpcctl) & LBICTRL_LPCCTL_NR);
90} 90}
91 91
92static int __devinit pasemi_nand_probe(struct of_device *ofdev, 92static int __devinit pasemi_nand_probe(struct platform_device *ofdev,
93 const struct of_device_id *match) 93 const struct of_device_id *match)
94{ 94{
95 struct pci_dev *pdev; 95 struct pci_dev *pdev;
@@ -185,7 +185,7 @@ static int __devinit pasemi_nand_probe(struct of_device *ofdev,
185 return err; 185 return err;
186} 186}
187 187
188static int __devexit pasemi_nand_remove(struct of_device *ofdev) 188static int __devexit pasemi_nand_remove(struct platform_device *ofdev)
189{ 189{
190 struct nand_chip *chip; 190 struct nand_chip *chip;
191 191
diff --git a/drivers/mtd/nand/socrates_nand.c b/drivers/mtd/nand/socrates_nand.c
index cc728b12de82..a8e403eebedb 100644
--- a/drivers/mtd/nand/socrates_nand.c
+++ b/drivers/mtd/nand/socrates_nand.c
@@ -162,7 +162,7 @@ static const char *part_probes[] = { "cmdlinepart", NULL };
162/* 162/*
163 * Probe for the NAND device. 163 * Probe for the NAND device.
164 */ 164 */
165static int __devinit socrates_nand_probe(struct of_device *ofdev, 165static int __devinit socrates_nand_probe(struct platform_device *ofdev,
166 const struct of_device_id *ofid) 166 const struct of_device_id *ofid)
167{ 167{
168 struct socrates_nand_host *host; 168 struct socrates_nand_host *host;
@@ -276,7 +276,7 @@ out:
276/* 276/*
277 * Remove a NAND device. 277 * Remove a NAND device.
278 */ 278 */
279static int __devexit socrates_nand_remove(struct of_device *ofdev) 279static int __devexit socrates_nand_remove(struct platform_device *ofdev)
280{ 280{
281 struct socrates_nand_host *host = dev_get_drvdata(&ofdev->dev); 281 struct socrates_nand_host *host = dev_get_drvdata(&ofdev->dev);
282 struct mtd_info *mtd = &host->mtd; 282 struct mtd_info *mtd = &host->mtd;
diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c
index af753936e835..b1bdc909090f 100644
--- a/drivers/net/can/mscan/mpc5xxx_can.c
+++ b/drivers/net/can/mscan/mpc5xxx_can.c
@@ -38,7 +38,7 @@
38 38
39struct mpc5xxx_can_data { 39struct mpc5xxx_can_data {
40 unsigned int type; 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 int *mscan_clksrc); 42 int *mscan_clksrc);
43}; 43};
44 44
@@ -48,7 +48,7 @@ static struct of_device_id __devinitdata mpc52xx_cdm_ids[] = {
48 {} 48 {}
49}; 49};
50 50
51static u32 __devinit mpc52xx_can_get_clock(struct of_device *ofdev, 51static u32 __devinit mpc52xx_can_get_clock(struct platform_device *ofdev,
52 const char *clock_name, 52 const char *clock_name,
53 int *mscan_clksrc) 53 int *mscan_clksrc)
54{ 54{
@@ -101,7 +101,7 @@ static u32 __devinit mpc52xx_can_get_clock(struct of_device *ofdev,
101 return freq; 101 return freq;
102} 102}
103#else /* !CONFIG_PPC_MPC52xx */ 103#else /* !CONFIG_PPC_MPC52xx */
104static u32 __devinit mpc52xx_can_get_clock(struct of_device *ofdev, 104static u32 __devinit mpc52xx_can_get_clock(struct platform_device *ofdev,
105 const char *clock_name, 105 const char *clock_name,
106 int *mscan_clksrc) 106 int *mscan_clksrc)
107{ 107{
@@ -129,7 +129,7 @@ static struct of_device_id __devinitdata mpc512x_clock_ids[] = {
129 {} 129 {}
130}; 130};
131 131
132static u32 __devinit mpc512x_can_get_clock(struct of_device *ofdev, 132static u32 __devinit mpc512x_can_get_clock(struct platform_device *ofdev,
133 const char *clock_name, 133 const char *clock_name,
134 int *mscan_clksrc) 134 int *mscan_clksrc)
135{ 135{
@@ -239,7 +239,7 @@ exit_unmap:
239 return freq; 239 return freq;
240} 240}
241#else /* !CONFIG_PPC_MPC512x */ 241#else /* !CONFIG_PPC_MPC512x */
242static u32 __devinit mpc512x_can_get_clock(struct of_device *ofdev, 242static u32 __devinit mpc512x_can_get_clock(struct platform_device *ofdev,
243 const char *clock_name, 243 const char *clock_name,
244 int *mscan_clksrc) 244 int *mscan_clksrc)
245{ 245{
@@ -247,7 +247,7 @@ static u32 __devinit mpc512x_can_get_clock(struct of_device *ofdev,
247} 247}
248#endif /* CONFIG_PPC_MPC512x */ 248#endif /* CONFIG_PPC_MPC512x */
249 249
250static int __devinit mpc5xxx_can_probe(struct of_device *ofdev, 250static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev,
251 const struct of_device_id *id) 251 const struct of_device_id *id)
252{ 252{
253 struct mpc5xxx_can_data *data = (struct mpc5xxx_can_data *)id->data; 253 struct mpc5xxx_can_data *data = (struct mpc5xxx_can_data *)id->data;
@@ -317,7 +317,7 @@ exit_unmap_mem:
317 return err; 317 return err;
318} 318}
319 319
320static int __devexit mpc5xxx_can_remove(struct of_device *ofdev) 320static int __devexit mpc5xxx_can_remove(struct platform_device *ofdev)
321{ 321{
322 struct net_device *dev = dev_get_drvdata(&ofdev->dev); 322 struct net_device *dev = dev_get_drvdata(&ofdev->dev);
323 struct mscan_priv *priv = netdev_priv(dev); 323 struct mscan_priv *priv = netdev_priv(dev);
@@ -334,7 +334,7 @@ static int __devexit mpc5xxx_can_remove(struct of_device *ofdev)
334 334
335#ifdef CONFIG_PM 335#ifdef CONFIG_PM
336static struct mscan_regs saved_regs; 336static struct mscan_regs saved_regs;
337static int mpc5xxx_can_suspend(struct of_device *ofdev, pm_message_t state) 337static int mpc5xxx_can_suspend(struct platform_device *ofdev, pm_message_t state)
338{ 338{
339 struct net_device *dev = dev_get_drvdata(&ofdev->dev); 339 struct net_device *dev = dev_get_drvdata(&ofdev->dev);
340 struct mscan_priv *priv = netdev_priv(dev); 340 struct mscan_priv *priv = netdev_priv(dev);
@@ -345,7 +345,7 @@ static int mpc5xxx_can_suspend(struct of_device *ofdev, pm_message_t state)
345 return 0; 345 return 0;
346} 346}
347 347
348static int mpc5xxx_can_resume(struct of_device *ofdev) 348static int mpc5xxx_can_resume(struct platform_device *ofdev)
349{ 349{
350 struct net_device *dev = dev_get_drvdata(&ofdev->dev); 350 struct net_device *dev = dev_get_drvdata(&ofdev->dev);
351 struct mscan_priv *priv = netdev_priv(dev); 351 struct mscan_priv *priv = netdev_priv(dev);
diff --git a/drivers/net/can/sja1000/sja1000_of_platform.c b/drivers/net/can/sja1000/sja1000_of_platform.c
index ac1a83d7c204..5bfccfdf3bbb 100644
--- a/drivers/net/can/sja1000/sja1000_of_platform.c
+++ b/drivers/net/can/sja1000/sja1000_of_platform.c
@@ -67,7 +67,7 @@ static void sja1000_ofp_write_reg(const struct sja1000_priv *priv,
67 out_8(priv->reg_base + reg, val); 67 out_8(priv->reg_base + reg, val);
68} 68}
69 69
70static int __devexit sja1000_ofp_remove(struct of_device *ofdev) 70static int __devexit sja1000_ofp_remove(struct platform_device *ofdev)
71{ 71{
72 struct net_device *dev = dev_get_drvdata(&ofdev->dev); 72 struct net_device *dev = dev_get_drvdata(&ofdev->dev);
73 struct sja1000_priv *priv = netdev_priv(dev); 73 struct sja1000_priv *priv = netdev_priv(dev);
@@ -87,7 +87,7 @@ static int __devexit sja1000_ofp_remove(struct of_device *ofdev)
87 return 0; 87 return 0;
88} 88}
89 89
90static int __devinit sja1000_ofp_probe(struct of_device *ofdev, 90static int __devinit sja1000_ofp_probe(struct platform_device *ofdev,
91 const struct of_device_id *id) 91 const struct of_device_id *id)
92{ 92{
93 struct device_node *np = ofdev->dev.of_node; 93 struct device_node *np = ofdev->dev.of_node;
diff --git a/drivers/net/ehea/ehea.h b/drivers/net/ehea/ehea.h
index 0060e422f171..99a929964e3c 100644
--- a/drivers/net/ehea/ehea.h
+++ b/drivers/net/ehea/ehea.h
@@ -413,7 +413,7 @@ struct ehea_port_res {
413 413
414struct ehea_adapter { 414struct ehea_adapter {
415 u64 handle; 415 u64 handle;
416 struct of_device *ofdev; 416 struct platform_device *ofdev;
417 struct ehea_port *port[EHEA_MAX_PORTS]; 417 struct ehea_port *port[EHEA_MAX_PORTS];
418 struct ehea_eq *neq; /* notification event queue */ 418 struct ehea_eq *neq; /* notification event queue */
419 struct tasklet_struct neq_tasklet; 419 struct tasklet_struct neq_tasklet;
@@ -465,7 +465,7 @@ struct ehea_port {
465 struct net_device *netdev; 465 struct net_device *netdev;
466 struct net_device_stats stats; 466 struct net_device_stats stats;
467 struct ehea_port_res port_res[EHEA_MAX_PORT_RES]; 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 struct ehea_mc_list *mc_list; /* Multicast MAC addresses */ 469 struct ehea_mc_list *mc_list; /* Multicast MAC addresses */
470 struct vlan_group *vgrp; 470 struct vlan_group *vgrp;
471 struct ehea_eq *qp_eq; 471 struct ehea_eq *qp_eq;
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index 3beba70b7dea..897719b49f96 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -107,10 +107,10 @@ struct ehea_fw_handle_array ehea_fw_handles;
107struct ehea_bcmc_reg_array ehea_bcmc_regs; 107struct ehea_bcmc_reg_array ehea_bcmc_regs;
108 108
109 109
110static int __devinit ehea_probe_adapter(struct of_device *dev, 110static int __devinit ehea_probe_adapter(struct platform_device *dev,
111 const struct of_device_id *id); 111 const struct of_device_id *id);
112 112
113static int __devexit ehea_remove(struct of_device *dev); 113static int __devexit ehea_remove(struct platform_device *dev);
114 114
115static struct of_device_id ehea_device_table[] = { 115static struct of_device_id ehea_device_table[] = {
116 { 116 {
@@ -3376,7 +3376,7 @@ static ssize_t ehea_remove_port(struct device *dev,
3376static DEVICE_ATTR(probe_port, S_IWUSR, NULL, ehea_probe_port); 3376static DEVICE_ATTR(probe_port, S_IWUSR, NULL, ehea_probe_port);
3377static DEVICE_ATTR(remove_port, S_IWUSR, NULL, ehea_remove_port); 3377static DEVICE_ATTR(remove_port, S_IWUSR, NULL, ehea_remove_port);
3378 3378
3379int ehea_create_device_sysfs(struct of_device *dev) 3379int ehea_create_device_sysfs(struct platform_device *dev)
3380{ 3380{
3381 int ret = device_create_file(&dev->dev, &dev_attr_probe_port); 3381 int ret = device_create_file(&dev->dev, &dev_attr_probe_port);
3382 if (ret) 3382 if (ret)
@@ -3387,13 +3387,13 @@ out:
3387 return ret; 3387 return ret;
3388} 3388}
3389 3389
3390void ehea_remove_device_sysfs(struct of_device *dev) 3390void ehea_remove_device_sysfs(struct platform_device *dev)
3391{ 3391{
3392 device_remove_file(&dev->dev, &dev_attr_probe_port); 3392 device_remove_file(&dev->dev, &dev_attr_probe_port);
3393 device_remove_file(&dev->dev, &dev_attr_remove_port); 3393 device_remove_file(&dev->dev, &dev_attr_remove_port);
3394} 3394}
3395 3395
3396static int __devinit ehea_probe_adapter(struct of_device *dev, 3396static int __devinit ehea_probe_adapter(struct platform_device *dev,
3397 const struct of_device_id *id) 3397 const struct of_device_id *id)
3398{ 3398{
3399 struct ehea_adapter *adapter; 3399 struct ehea_adapter *adapter;
@@ -3492,7 +3492,7 @@ out:
3492 return ret; 3492 return ret;
3493} 3493}
3494 3494
3495static int __devexit ehea_remove(struct of_device *dev) 3495static int __devexit ehea_remove(struct platform_device *dev)
3496{ 3496{
3497 struct ehea_adapter *adapter = dev_get_drvdata(&dev->dev); 3497 struct ehea_adapter *adapter = dev_get_drvdata(&dev->dev);
3498 int i; 3498 int i;
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c
index d1a5b17b2a95..e3e10b4add9c 100644
--- a/drivers/net/fec_mpc52xx.c
+++ b/drivers/net/fec_mpc52xx.c
@@ -850,7 +850,7 @@ static const struct net_device_ops mpc52xx_fec_netdev_ops = {
850/* ======================================================================== */ 850/* ======================================================================== */
851 851
852static int __devinit 852static int __devinit
853mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match) 853mpc52xx_fec_probe(struct platform_device *op, const struct of_device_id *match)
854{ 854{
855 int rv; 855 int rv;
856 struct net_device *ndev; 856 struct net_device *ndev;
@@ -995,7 +995,7 @@ err_netdev:
995} 995}
996 996
997static int 997static int
998mpc52xx_fec_remove(struct of_device *op) 998mpc52xx_fec_remove(struct platform_device *op)
999{ 999{
1000 struct net_device *ndev; 1000 struct net_device *ndev;
1001 struct mpc52xx_fec_priv *priv; 1001 struct mpc52xx_fec_priv *priv;
@@ -1025,7 +1025,7 @@ mpc52xx_fec_remove(struct of_device *op)
1025} 1025}
1026 1026
1027#ifdef CONFIG_PM 1027#ifdef CONFIG_PM
1028static int mpc52xx_fec_of_suspend(struct of_device *op, pm_message_t state) 1028static int mpc52xx_fec_of_suspend(struct platform_device *op, pm_message_t state)
1029{ 1029{
1030 struct net_device *dev = dev_get_drvdata(&op->dev); 1030 struct net_device *dev = dev_get_drvdata(&op->dev);
1031 1031
@@ -1035,7 +1035,7 @@ static int mpc52xx_fec_of_suspend(struct of_device *op, pm_message_t state)
1035 return 0; 1035 return 0;
1036} 1036}
1037 1037
1038static int mpc52xx_fec_of_resume(struct of_device *op) 1038static int mpc52xx_fec_of_resume(struct platform_device *op)
1039{ 1039{
1040 struct net_device *dev = dev_get_drvdata(&op->dev); 1040 struct net_device *dev = dev_get_drvdata(&op->dev);
1041 1041
diff --git a/drivers/net/fec_mpc52xx_phy.c b/drivers/net/fec_mpc52xx_phy.c
index dbaf72cbb233..0b4cb6f15984 100644
--- a/drivers/net/fec_mpc52xx_phy.c
+++ b/drivers/net/fec_mpc52xx_phy.c
@@ -61,7 +61,7 @@ static int mpc52xx_fec_mdio_write(struct mii_bus *bus, int phy_id, int reg,
61 data | FEC_MII_WRITE_FRAME); 61 data | FEC_MII_WRITE_FRAME);
62} 62}
63 63
64static int mpc52xx_fec_mdio_probe(struct of_device *of, 64static int mpc52xx_fec_mdio_probe(struct platform_device *of,
65 const struct of_device_id *match) 65 const struct of_device_id *match)
66{ 66{
67 struct device *dev = &of->dev; 67 struct device *dev = &of->dev;
@@ -122,7 +122,7 @@ static int mpc52xx_fec_mdio_probe(struct of_device *of,
122 return err; 122 return err;
123} 123}
124 124
125static int mpc52xx_fec_mdio_remove(struct of_device *of) 125static int mpc52xx_fec_mdio_remove(struct platform_device *of)
126{ 126{
127 struct device *dev = &of->dev; 127 struct device *dev = &of->dev;
128 struct mii_bus *bus = dev_get_drvdata(dev); 128 struct mii_bus *bus = dev_get_drvdata(dev);
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c
index f08cff9020bd..d6e3111959ab 100644
--- a/drivers/net/fs_enet/fs_enet-main.c
+++ b/drivers/net/fs_enet/fs_enet-main.c
@@ -997,7 +997,7 @@ static const struct net_device_ops fs_enet_netdev_ops = {
997#endif 997#endif
998}; 998};
999 999
1000static int __devinit fs_enet_probe(struct of_device *ofdev, 1000static int __devinit fs_enet_probe(struct platform_device *ofdev,
1001 const struct of_device_id *match) 1001 const struct of_device_id *match)
1002{ 1002{
1003 struct net_device *ndev; 1003 struct net_device *ndev;
@@ -1105,7 +1105,7 @@ out_free_fpi:
1105 return ret; 1105 return ret;
1106} 1106}
1107 1107
1108static int fs_enet_remove(struct of_device *ofdev) 1108static int fs_enet_remove(struct platform_device *ofdev)
1109{ 1109{
1110 struct net_device *ndev = dev_get_drvdata(&ofdev->dev); 1110 struct net_device *ndev = dev_get_drvdata(&ofdev->dev);
1111 struct fs_enet_private *fep = netdev_priv(ndev); 1111 struct fs_enet_private *fep = netdev_priv(ndev);
diff --git a/drivers/net/fs_enet/mac-fcc.c b/drivers/net/fs_enet/mac-fcc.c
index 48e91b6242ce..7a84e45487e8 100644
--- a/drivers/net/fs_enet/mac-fcc.c
+++ b/drivers/net/fs_enet/mac-fcc.c
@@ -84,7 +84,7 @@ static inline int fcc_cr_cmd(struct fs_enet_private *fep, u32 op)
84 84
85static int do_pd_setup(struct fs_enet_private *fep) 85static 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 struct fs_platform_info *fpi = fep->fpi; 88 struct fs_platform_info *fpi = fep->fpi;
89 int ret = -EINVAL; 89 int ret = -EINVAL;
90 90
diff --git a/drivers/net/fs_enet/mac-fec.c b/drivers/net/fs_enet/mac-fec.c
index 7ca1642276d0..61035fc5599b 100644
--- a/drivers/net/fs_enet/mac-fec.c
+++ b/drivers/net/fs_enet/mac-fec.c
@@ -96,7 +96,7 @@ static int whack_reset(struct fec __iomem *fecp)
96 96
97static int do_pd_setup(struct fs_enet_private *fep) 97static 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 fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL); 101 fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL);
102 if (fep->interrupt == NO_IRQ) 102 if (fep->interrupt == NO_IRQ)
diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c
index a3c44544846d..22a02a767069 100644
--- a/drivers/net/fs_enet/mac-scc.c
+++ b/drivers/net/fs_enet/mac-scc.c
@@ -96,7 +96,7 @@ static inline int scc_cr_cmd(struct fs_enet_private *fep, u32 op)
96 96
97static int do_pd_setup(struct fs_enet_private *fep) 97static 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 fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL); 101 fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL);
102 if (fep->interrupt == NO_IRQ) 102 if (fep->interrupt == NO_IRQ)
diff --git a/drivers/net/fs_enet/mii-bitbang.c b/drivers/net/fs_enet/mii-bitbang.c
index 3607340f3da7..3cda2b515471 100644
--- a/drivers/net/fs_enet/mii-bitbang.c
+++ b/drivers/net/fs_enet/mii-bitbang.c
@@ -150,7 +150,7 @@ static int __devinit fs_mii_bitbang_init(struct mii_bus *bus,
150 return 0; 150 return 0;
151} 151}
152 152
153static int __devinit fs_enet_mdio_probe(struct of_device *ofdev, 153static int __devinit fs_enet_mdio_probe(struct platform_device *ofdev,
154 const struct of_device_id *match) 154 const struct of_device_id *match)
155{ 155{
156 struct mii_bus *new_bus; 156 struct mii_bus *new_bus;
@@ -200,7 +200,7 @@ out:
200 return ret; 200 return ret;
201} 201}
202 202
203static int fs_enet_mdio_remove(struct of_device *ofdev) 203static int fs_enet_mdio_remove(struct platform_device *ofdev)
204{ 204{
205 struct mii_bus *bus = dev_get_drvdata(&ofdev->dev); 205 struct mii_bus *bus = dev_get_drvdata(&ofdev->dev);
206 struct bb_info *bitbang = bus->priv; 206 struct bb_info *bitbang = bus->priv;
diff --git a/drivers/net/fs_enet/mii-fec.c b/drivers/net/fs_enet/mii-fec.c
index bddffd169b93..dbb9c48623df 100644
--- a/drivers/net/fs_enet/mii-fec.c
+++ b/drivers/net/fs_enet/mii-fec.c
@@ -101,7 +101,7 @@ static int fs_enet_fec_mii_reset(struct mii_bus *bus)
101 return 0; 101 return 0;
102} 102}
103 103
104static int __devinit fs_enet_mdio_probe(struct of_device *ofdev, 104static int __devinit fs_enet_mdio_probe(struct platform_device *ofdev,
105 const struct of_device_id *match) 105 const struct of_device_id *match)
106{ 106{
107 struct resource res; 107 struct resource res;
@@ -192,7 +192,7 @@ out:
192 return ret; 192 return ret;
193} 193}
194 194
195static int fs_enet_mdio_remove(struct of_device *ofdev) 195static int fs_enet_mdio_remove(struct platform_device *ofdev)
196{ 196{
197 struct mii_bus *bus = dev_get_drvdata(&ofdev->dev); 197 struct mii_bus *bus = dev_get_drvdata(&ofdev->dev);
198 struct fec_info *fec = bus->priv; 198 struct fec_info *fec = bus->priv;
diff --git a/drivers/net/fsl_pq_mdio.c b/drivers/net/fsl_pq_mdio.c
index f53f850b6418..d4bf91aac25f 100644
--- a/drivers/net/fsl_pq_mdio.c
+++ b/drivers/net/fsl_pq_mdio.c
@@ -265,7 +265,7 @@ static int get_ucc_id_for_range(u64 start, u64 end, u32 *ucc_id)
265#endif 265#endif
266 266
267 267
268static int fsl_pq_mdio_probe(struct of_device *ofdev, 268static int fsl_pq_mdio_probe(struct platform_device *ofdev,
269 const struct of_device_id *match) 269 const struct of_device_id *match)
270{ 270{
271 struct device_node *np = ofdev->dev.of_node; 271 struct device_node *np = ofdev->dev.of_node;
@@ -425,7 +425,7 @@ err_free_priv:
425} 425}
426 426
427 427
428static int fsl_pq_mdio_remove(struct of_device *ofdev) 428static int fsl_pq_mdio_remove(struct platform_device *ofdev)
429{ 429{
430 struct device *device = &ofdev->dev; 430 struct device *device = &ofdev->dev;
431 struct mii_bus *bus = dev_get_drvdata(device); 431 struct mii_bus *bus = dev_get_drvdata(device);
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index a1b6301bc674..4f7c3f3ca234 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -122,9 +122,9 @@ static irqreturn_t gfar_interrupt(int irq, void *dev_id);
122static void adjust_link(struct net_device *dev); 122static void adjust_link(struct net_device *dev);
123static void init_registers(struct net_device *dev); 123static void init_registers(struct net_device *dev);
124static int init_phy(struct net_device *dev); 124static int init_phy(struct net_device *dev);
125static int gfar_probe(struct of_device *ofdev, 125static int gfar_probe(struct platform_device *ofdev,
126 const struct of_device_id *match); 126 const struct of_device_id *match);
127static int gfar_remove(struct of_device *ofdev); 127static int gfar_remove(struct platform_device *ofdev);
128static void free_skb_resources(struct gfar_private *priv); 128static void free_skb_resources(struct gfar_private *priv);
129static void gfar_set_multi(struct net_device *dev); 129static void gfar_set_multi(struct net_device *dev);
130static void gfar_set_hash_for_addr(struct net_device *dev, u8 *addr); 130static void gfar_set_hash_for_addr(struct net_device *dev, u8 *addr);
@@ -605,7 +605,7 @@ static int gfar_parse_group(struct device_node *np,
605 return 0; 605 return 0;
606} 606}
607 607
608static int gfar_of_init(struct of_device *ofdev, struct net_device **pdev) 608static int gfar_of_init(struct platform_device *ofdev, struct net_device **pdev)
609{ 609{
610 const char *model; 610 const char *model;
611 const char *ctype; 611 const char *ctype;
@@ -959,7 +959,7 @@ static void gfar_detect_errata(struct gfar_private *priv)
959 959
960/* Set up the ethernet device structure, private data, 960/* Set up the ethernet device structure, private data,
961 * and anything else we need before we start */ 961 * and anything else we need before we start */
962static int gfar_probe(struct of_device *ofdev, 962static int gfar_probe(struct platform_device *ofdev,
963 const struct of_device_id *match) 963 const struct of_device_id *match)
964{ 964{
965 u32 tempval; 965 u32 tempval;
@@ -1238,7 +1238,7 @@ register_fail:
1238 return err; 1238 return err;
1239} 1239}
1240 1240
1241static int gfar_remove(struct of_device *ofdev) 1241static int gfar_remove(struct platform_device *ofdev)
1242{ 1242{
1243 struct gfar_private *priv = dev_get_drvdata(&ofdev->dev); 1243 struct gfar_private *priv = dev_get_drvdata(&ofdev->dev);
1244 1244
diff --git a/drivers/net/gianfar.h b/drivers/net/gianfar.h
index 710810e2adb4..68984eb88ae0 100644
--- a/drivers/net/gianfar.h
+++ b/drivers/net/gianfar.h
@@ -1054,7 +1054,7 @@ struct gfar_private {
1054 1054
1055 struct device_node *node; 1055 struct device_node *node;
1056 struct net_device *ndev; 1056 struct net_device *ndev;
1057 struct of_device *ofdev; 1057 struct platform_device *ofdev;
1058 enum gfar_errata errata; 1058 enum gfar_errata errata;
1059 1059
1060 struct gfar_priv_grp gfargrp[MAXGROUPS]; 1060 struct gfar_priv_grp gfargrp[MAXGROUPS];
diff --git a/drivers/net/greth.c b/drivers/net/greth.c
index 4d09eab3548e..f15c64f1cd38 100644
--- a/drivers/net/greth.c
+++ b/drivers/net/greth.c
@@ -1373,7 +1373,7 @@ error:
1373} 1373}
1374 1374
1375/* Initialize the GRETH MAC */ 1375/* Initialize the GRETH MAC */
1376static int __devinit greth_of_probe(struct of_device *ofdev, const struct of_device_id *match) 1376static int __devinit greth_of_probe(struct platform_device *ofdev, const struct of_device_id *match)
1377{ 1377{
1378 struct net_device *dev; 1378 struct net_device *dev;
1379 struct greth_private *greth; 1379 struct greth_private *greth;
@@ -1412,7 +1412,7 @@ static int __devinit greth_of_probe(struct of_device *ofdev, const struct of_dev
1412 } 1412 }
1413 1413
1414 regs = (struct greth_regs *) greth->regs; 1414 regs = (struct greth_regs *) greth->regs;
1415 greth->irq = ofdev->irqs[0]; 1415 greth->irq = ofdev->archdata.irqs[0];
1416 1416
1417 dev_set_drvdata(greth->dev, dev); 1417 dev_set_drvdata(greth->dev, dev);
1418 SET_NETDEV_DEV(dev, greth->dev); 1418 SET_NETDEV_DEV(dev, greth->dev);
@@ -1572,7 +1572,7 @@ error1:
1572 return err; 1572 return err;
1573} 1573}
1574 1574
1575static int __devexit greth_of_remove(struct of_device *of_dev) 1575static int __devexit greth_of_remove(struct platform_device *of_dev)
1576{ 1576{
1577 struct net_device *ndev = dev_get_drvdata(&of_dev->dev); 1577 struct net_device *ndev = dev_get_drvdata(&of_dev->dev);
1578 struct greth_private *greth = netdev_priv(ndev); 1578 struct greth_private *greth = netdev_priv(ndev);
diff --git a/drivers/net/greth.h b/drivers/net/greth.h
index 973388d6abca..03ad903cd676 100644
--- a/drivers/net/greth.h
+++ b/drivers/net/greth.h
@@ -118,7 +118,7 @@ struct greth_private {
118 118
119 int irq; 119 int irq;
120 120
121 struct device *dev; /* Pointer to of_device->dev */ 121 struct device *dev; /* Pointer to platform_device->dev */
122 struct net_device *netdev; 122 struct net_device *netdev;
123 struct napi_struct napi; 123 struct napi_struct napi;
124 spinlock_t devlock; 124 spinlock_t devlock;
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c
index eeec7bc2ce74..3506fd6ad726 100644
--- a/drivers/net/ibm_newemac/core.c
+++ b/drivers/net/ibm_newemac/core.c
@@ -2245,7 +2245,7 @@ static int emac_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd)
2245struct emac_depentry { 2245struct emac_depentry {
2246 u32 phandle; 2246 u32 phandle;
2247 struct device_node *node; 2247 struct device_node *node;
2248 struct of_device *ofdev; 2248 struct platform_device *ofdev;
2249 void *drvdata; 2249 void *drvdata;
2250}; 2250};
2251 2251
@@ -2719,7 +2719,7 @@ static const struct net_device_ops emac_gige_netdev_ops = {
2719 .ndo_change_mtu = emac_change_mtu, 2719 .ndo_change_mtu = emac_change_mtu,
2720}; 2720};
2721 2721
2722static int __devinit emac_probe(struct of_device *ofdev, 2722static int __devinit emac_probe(struct platform_device *ofdev,
2723 const struct of_device_id *match) 2723 const struct of_device_id *match)
2724{ 2724{
2725 struct net_device *ndev; 2725 struct net_device *ndev;
@@ -2941,7 +2941,7 @@ static int __devinit emac_probe(struct of_device *ofdev,
2941 return err; 2941 return err;
2942} 2942}
2943 2943
2944static int __devexit emac_remove(struct of_device *ofdev) 2944static int __devexit emac_remove(struct platform_device *ofdev)
2945{ 2945{
2946 struct emac_instance *dev = dev_get_drvdata(&ofdev->dev); 2946 struct emac_instance *dev = dev_get_drvdata(&ofdev->dev);
2947 2947
diff --git a/drivers/net/ibm_newemac/core.h b/drivers/net/ibm_newemac/core.h
index b1cbe6fdfc7a..9e37e3d9c51d 100644
--- a/drivers/net/ibm_newemac/core.h
+++ b/drivers/net/ibm_newemac/core.h
@@ -170,12 +170,12 @@ struct emac_instance {
170 struct net_device *ndev; 170 struct net_device *ndev;
171 struct resource rsrc_regs; 171 struct resource rsrc_regs;
172 struct emac_regs __iomem *emacp; 172 struct emac_regs __iomem *emacp;
173 struct of_device *ofdev; 173 struct platform_device *ofdev;
174 struct device_node **blist; /* bootlist entry */ 174 struct device_node **blist; /* bootlist entry */
175 175
176 /* MAL linkage */ 176 /* MAL linkage */
177 u32 mal_ph; 177 u32 mal_ph;
178 struct of_device *mal_dev; 178 struct platform_device *mal_dev;
179 u32 mal_rx_chan; 179 u32 mal_rx_chan;
180 u32 mal_tx_chan; 180 u32 mal_tx_chan;
181 struct mal_instance *mal; 181 struct mal_instance *mal;
@@ -196,24 +196,24 @@ struct emac_instance {
196 196
197 /* Shared MDIO if any */ 197 /* Shared MDIO if any */
198 u32 mdio_ph; 198 u32 mdio_ph;
199 struct of_device *mdio_dev; 199 struct platform_device *mdio_dev;
200 struct emac_instance *mdio_instance; 200 struct emac_instance *mdio_instance;
201 struct mutex mdio_lock; 201 struct mutex mdio_lock;
202 202
203 /* ZMII infos if any */ 203 /* ZMII infos if any */
204 u32 zmii_ph; 204 u32 zmii_ph;
205 u32 zmii_port; 205 u32 zmii_port;
206 struct of_device *zmii_dev; 206 struct platform_device *zmii_dev;
207 207
208 /* RGMII infos if any */ 208 /* RGMII infos if any */
209 u32 rgmii_ph; 209 u32 rgmii_ph;
210 u32 rgmii_port; 210 u32 rgmii_port;
211 struct of_device *rgmii_dev; 211 struct platform_device *rgmii_dev;
212 212
213 /* TAH infos if any */ 213 /* TAH infos if any */
214 u32 tah_ph; 214 u32 tah_ph;
215 u32 tah_port; 215 u32 tah_port;
216 struct of_device *tah_dev; 216 struct platform_device *tah_dev;
217 217
218 /* IRQs */ 218 /* IRQs */
219 int wol_irq; 219 int wol_irq;
diff --git a/drivers/net/ibm_newemac/mal.c b/drivers/net/ibm_newemac/mal.c
index fcff9e0bd382..d5717e2123e1 100644
--- a/drivers/net/ibm_newemac/mal.c
+++ b/drivers/net/ibm_newemac/mal.c
@@ -517,7 +517,7 @@ void *mal_dump_regs(struct mal_instance *mal, void *buf)
517 return regs + 1; 517 return regs + 1;
518} 518}
519 519
520static int __devinit mal_probe(struct of_device *ofdev, 520static int __devinit mal_probe(struct platform_device *ofdev,
521 const struct of_device_id *match) 521 const struct of_device_id *match)
522{ 522{
523 struct mal_instance *mal; 523 struct mal_instance *mal;
@@ -730,7 +730,7 @@ static int __devinit mal_probe(struct of_device *ofdev,
730 return err; 730 return err;
731} 731}
732 732
733static int __devexit mal_remove(struct of_device *ofdev) 733static int __devexit mal_remove(struct platform_device *ofdev)
734{ 734{
735 struct mal_instance *mal = dev_get_drvdata(&ofdev->dev); 735 struct mal_instance *mal = dev_get_drvdata(&ofdev->dev);
736 736
diff --git a/drivers/net/ibm_newemac/mal.h b/drivers/net/ibm_newemac/mal.h
index 9ededfbf0726..66084214bf45 100644
--- a/drivers/net/ibm_newemac/mal.h
+++ b/drivers/net/ibm_newemac/mal.h
@@ -210,7 +210,7 @@ struct mal_instance {
210 dma_addr_t bd_dma; 210 dma_addr_t bd_dma;
211 struct mal_descriptor *bd_virt; 211 struct mal_descriptor *bd_virt;
212 212
213 struct of_device *ofdev; 213 struct platform_device *ofdev;
214 int index; 214 int index;
215 spinlock_t lock; 215 spinlock_t lock;
216 216
diff --git a/drivers/net/ibm_newemac/rgmii.c b/drivers/net/ibm_newemac/rgmii.c
index 108919bcdf13..dd61798897ac 100644
--- a/drivers/net/ibm_newemac/rgmii.c
+++ b/drivers/net/ibm_newemac/rgmii.c
@@ -93,7 +93,7 @@ static inline u32 rgmii_mode_mask(int mode, int input)
93 } 93 }
94} 94}
95 95
96int __devinit rgmii_attach(struct of_device *ofdev, int input, int mode) 96int __devinit rgmii_attach(struct platform_device *ofdev, int input, int mode)
97{ 97{
98 struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); 98 struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev);
99 struct rgmii_regs __iomem *p = dev->base; 99 struct rgmii_regs __iomem *p = dev->base;
@@ -122,7 +122,7 @@ int __devinit rgmii_attach(struct of_device *ofdev, int input, int mode)
122 return 0; 122 return 0;
123} 123}
124 124
125void rgmii_set_speed(struct of_device *ofdev, int input, int speed) 125void rgmii_set_speed(struct platform_device *ofdev, int input, int speed)
126{ 126{
127 struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); 127 struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev);
128 struct rgmii_regs __iomem *p = dev->base; 128 struct rgmii_regs __iomem *p = dev->base;
@@ -144,7 +144,7 @@ void rgmii_set_speed(struct of_device *ofdev, int input, int speed)
144 mutex_unlock(&dev->lock); 144 mutex_unlock(&dev->lock);
145} 145}
146 146
147void rgmii_get_mdio(struct of_device *ofdev, int input) 147void rgmii_get_mdio(struct platform_device *ofdev, int input)
148{ 148{
149 struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); 149 struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev);
150 struct rgmii_regs __iomem *p = dev->base; 150 struct rgmii_regs __iomem *p = dev->base;
@@ -165,7 +165,7 @@ void rgmii_get_mdio(struct of_device *ofdev, int input)
165 DBG2(dev, " fer = 0x%08x\n", fer); 165 DBG2(dev, " fer = 0x%08x\n", fer);
166} 166}
167 167
168void rgmii_put_mdio(struct of_device *ofdev, int input) 168void rgmii_put_mdio(struct platform_device *ofdev, int input)
169{ 169{
170 struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); 170 struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev);
171 struct rgmii_regs __iomem *p = dev->base; 171 struct rgmii_regs __iomem *p = dev->base;
@@ -186,7 +186,7 @@ void rgmii_put_mdio(struct of_device *ofdev, int input)
186 mutex_unlock(&dev->lock); 186 mutex_unlock(&dev->lock);
187} 187}
188 188
189void rgmii_detach(struct of_device *ofdev, int input) 189void rgmii_detach(struct platform_device *ofdev, int input)
190{ 190{
191 struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); 191 struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev);
192 struct rgmii_regs __iomem *p; 192 struct rgmii_regs __iomem *p;
@@ -206,13 +206,13 @@ void rgmii_detach(struct of_device *ofdev, int input)
206 mutex_unlock(&dev->lock); 206 mutex_unlock(&dev->lock);
207} 207}
208 208
209int rgmii_get_regs_len(struct of_device *ofdev) 209int rgmii_get_regs_len(struct platform_device *ofdev)
210{ 210{
211 return sizeof(struct emac_ethtool_regs_subhdr) + 211 return sizeof(struct emac_ethtool_regs_subhdr) +
212 sizeof(struct rgmii_regs); 212 sizeof(struct rgmii_regs);
213} 213}
214 214
215void *rgmii_dump_regs(struct of_device *ofdev, void *buf) 215void *rgmii_dump_regs(struct platform_device *ofdev, void *buf)
216{ 216{
217 struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); 217 struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev);
218 struct emac_ethtool_regs_subhdr *hdr = buf; 218 struct emac_ethtool_regs_subhdr *hdr = buf;
@@ -228,7 +228,7 @@ void *rgmii_dump_regs(struct of_device *ofdev, void *buf)
228} 228}
229 229
230 230
231static int __devinit rgmii_probe(struct of_device *ofdev, 231static int __devinit rgmii_probe(struct platform_device *ofdev,
232 const struct of_device_id *match) 232 const struct of_device_id *match)
233{ 233{
234 struct device_node *np = ofdev->dev.of_node; 234 struct device_node *np = ofdev->dev.of_node;
@@ -293,7 +293,7 @@ static int __devinit rgmii_probe(struct of_device *ofdev,
293 return rc; 293 return rc;
294} 294}
295 295
296static int __devexit rgmii_remove(struct of_device *ofdev) 296static int __devexit rgmii_remove(struct platform_device *ofdev)
297{ 297{
298 struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev); 298 struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev);
299 299
diff --git a/drivers/net/ibm_newemac/rgmii.h b/drivers/net/ibm_newemac/rgmii.h
index c4a4b358a270..d69799049865 100644
--- a/drivers/net/ibm_newemac/rgmii.h
+++ b/drivers/net/ibm_newemac/rgmii.h
@@ -51,20 +51,20 @@ struct rgmii_instance {
51 int users; 51 int users;
52 52
53 /* OF device instance */ 53 /* OF device instance */
54 struct of_device *ofdev; 54 struct platform_device *ofdev;
55}; 55};
56 56
57#ifdef CONFIG_IBM_NEW_EMAC_RGMII 57#ifdef CONFIG_IBM_NEW_EMAC_RGMII
58 58
59extern int rgmii_init(void); 59extern int rgmii_init(void);
60extern void rgmii_exit(void); 60extern void rgmii_exit(void);
61extern int rgmii_attach(struct of_device *ofdev, int input, int mode); 61extern int rgmii_attach(struct platform_device *ofdev, int input, int mode);
62extern void rgmii_detach(struct of_device *ofdev, int input); 62extern void rgmii_detach(struct platform_device *ofdev, int input);
63extern void rgmii_get_mdio(struct of_device *ofdev, int input); 63extern void rgmii_get_mdio(struct platform_device *ofdev, int input);
64extern void rgmii_put_mdio(struct of_device *ofdev, int input); 64extern void rgmii_put_mdio(struct platform_device *ofdev, int input);
65extern void rgmii_set_speed(struct of_device *ofdev, int input, int speed); 65extern void rgmii_set_speed(struct platform_device *ofdev, int input, int speed);
66extern int rgmii_get_regs_len(struct of_device *ofdev); 66extern int rgmii_get_regs_len(struct platform_device *ofdev);
67extern void *rgmii_dump_regs(struct of_device *ofdev, void *buf); 67extern void *rgmii_dump_regs(struct platform_device *ofdev, void *buf);
68 68
69#else 69#else
70 70
diff --git a/drivers/net/ibm_newemac/tah.c b/drivers/net/ibm_newemac/tah.c
index 044637144c43..299aa49490c0 100644
--- a/drivers/net/ibm_newemac/tah.c
+++ b/drivers/net/ibm_newemac/tah.c
@@ -23,7 +23,7 @@
23#include "emac.h" 23#include "emac.h"
24#include "core.h" 24#include "core.h"
25 25
26int __devinit tah_attach(struct of_device *ofdev, int channel) 26int __devinit tah_attach(struct platform_device *ofdev, int channel)
27{ 27{
28 struct tah_instance *dev = dev_get_drvdata(&ofdev->dev); 28 struct tah_instance *dev = dev_get_drvdata(&ofdev->dev);
29 29
@@ -35,7 +35,7 @@ int __devinit tah_attach(struct of_device *ofdev, int channel)
35 return 0; 35 return 0;
36} 36}
37 37
38void tah_detach(struct of_device *ofdev, int channel) 38void tah_detach(struct platform_device *ofdev, int channel)
39{ 39{
40 struct tah_instance *dev = dev_get_drvdata(&ofdev->dev); 40 struct tah_instance *dev = dev_get_drvdata(&ofdev->dev);
41 41
@@ -44,7 +44,7 @@ void tah_detach(struct of_device *ofdev, int channel)
44 mutex_unlock(&dev->lock); 44 mutex_unlock(&dev->lock);
45} 45}
46 46
47void tah_reset(struct of_device *ofdev) 47void tah_reset(struct platform_device *ofdev)
48{ 48{
49 struct tah_instance *dev = dev_get_drvdata(&ofdev->dev); 49 struct tah_instance *dev = dev_get_drvdata(&ofdev->dev);
50 struct tah_regs __iomem *p = dev->base; 50 struct tah_regs __iomem *p = dev->base;
@@ -66,13 +66,13 @@ void tah_reset(struct of_device *ofdev)
66 TAH_MR_DIG); 66 TAH_MR_DIG);
67} 67}
68 68
69int tah_get_regs_len(struct of_device *ofdev) 69int tah_get_regs_len(struct platform_device *ofdev)
70{ 70{
71 return sizeof(struct emac_ethtool_regs_subhdr) + 71 return sizeof(struct emac_ethtool_regs_subhdr) +
72 sizeof(struct tah_regs); 72 sizeof(struct tah_regs);
73} 73}
74 74
75void *tah_dump_regs(struct of_device *ofdev, void *buf) 75void *tah_dump_regs(struct platform_device *ofdev, void *buf)
76{ 76{
77 struct tah_instance *dev = dev_get_drvdata(&ofdev->dev); 77 struct tah_instance *dev = dev_get_drvdata(&ofdev->dev);
78 struct emac_ethtool_regs_subhdr *hdr = buf; 78 struct emac_ethtool_regs_subhdr *hdr = buf;
@@ -87,7 +87,7 @@ void *tah_dump_regs(struct of_device *ofdev, void *buf)
87 return regs + 1; 87 return regs + 1;
88} 88}
89 89
90static int __devinit tah_probe(struct of_device *ofdev, 90static int __devinit tah_probe(struct platform_device *ofdev,
91 const struct of_device_id *match) 91 const struct of_device_id *match)
92{ 92{
93 struct device_node *np = ofdev->dev.of_node; 93 struct device_node *np = ofdev->dev.of_node;
@@ -139,7 +139,7 @@ static int __devinit tah_probe(struct of_device *ofdev,
139 return rc; 139 return rc;
140} 140}
141 141
142static int __devexit tah_remove(struct of_device *ofdev) 142static int __devexit tah_remove(struct platform_device *ofdev)
143{ 143{
144 struct tah_instance *dev = dev_get_drvdata(&ofdev->dev); 144 struct tah_instance *dev = dev_get_drvdata(&ofdev->dev);
145 145
diff --git a/drivers/net/ibm_newemac/tah.h b/drivers/net/ibm_newemac/tah.h
index a068b5658dad..61dbeca006d1 100644
--- a/drivers/net/ibm_newemac/tah.h
+++ b/drivers/net/ibm_newemac/tah.h
@@ -48,7 +48,7 @@ struct tah_instance {
48 int users; 48 int users;
49 49
50 /* OF device instance */ 50 /* OF device instance */
51 struct of_device *ofdev; 51 struct platform_device *ofdev;
52}; 52};
53 53
54 54
@@ -74,11 +74,11 @@ struct tah_instance {
74 74
75extern int tah_init(void); 75extern int tah_init(void);
76extern void tah_exit(void); 76extern void tah_exit(void);
77extern int tah_attach(struct of_device *ofdev, int channel); 77extern int tah_attach(struct platform_device *ofdev, int channel);
78extern void tah_detach(struct of_device *ofdev, int channel); 78extern void tah_detach(struct platform_device *ofdev, int channel);
79extern void tah_reset(struct of_device *ofdev); 79extern void tah_reset(struct platform_device *ofdev);
80extern int tah_get_regs_len(struct of_device *ofdev); 80extern int tah_get_regs_len(struct platform_device *ofdev);
81extern void *tah_dump_regs(struct of_device *ofdev, void *buf); 81extern void *tah_dump_regs(struct platform_device *ofdev, void *buf);
82 82
83#else 83#else
84 84
diff --git a/drivers/net/ibm_newemac/zmii.c b/drivers/net/ibm_newemac/zmii.c
index 046dcd069c45..34ed6ee8ca8a 100644
--- a/drivers/net/ibm_newemac/zmii.c
+++ b/drivers/net/ibm_newemac/zmii.c
@@ -82,7 +82,7 @@ static inline u32 zmii_mode_mask(int mode, int input)
82 } 82 }
83} 83}
84 84
85int __devinit zmii_attach(struct of_device *ofdev, int input, int *mode) 85int __devinit zmii_attach(struct platform_device *ofdev, int input, int *mode)
86{ 86{
87 struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); 87 struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev);
88 struct zmii_regs __iomem *p = dev->base; 88 struct zmii_regs __iomem *p = dev->base;
@@ -148,7 +148,7 @@ int __devinit zmii_attach(struct of_device *ofdev, int input, int *mode)
148 return 0; 148 return 0;
149} 149}
150 150
151void zmii_get_mdio(struct of_device *ofdev, int input) 151void zmii_get_mdio(struct platform_device *ofdev, int input)
152{ 152{
153 struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); 153 struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev);
154 u32 fer; 154 u32 fer;
@@ -161,7 +161,7 @@ void zmii_get_mdio(struct of_device *ofdev, int input)
161 out_be32(&dev->base->fer, fer | ZMII_FER_MDI(input)); 161 out_be32(&dev->base->fer, fer | ZMII_FER_MDI(input));
162} 162}
163 163
164void zmii_put_mdio(struct of_device *ofdev, int input) 164void zmii_put_mdio(struct platform_device *ofdev, int input)
165{ 165{
166 struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); 166 struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev);
167 167
@@ -170,7 +170,7 @@ void zmii_put_mdio(struct of_device *ofdev, int input)
170} 170}
171 171
172 172
173void zmii_set_speed(struct of_device *ofdev, int input, int speed) 173void zmii_set_speed(struct platform_device *ofdev, int input, int speed)
174{ 174{
175 struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); 175 struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev);
176 u32 ssr; 176 u32 ssr;
@@ -191,7 +191,7 @@ void zmii_set_speed(struct of_device *ofdev, int input, int speed)
191 mutex_unlock(&dev->lock); 191 mutex_unlock(&dev->lock);
192} 192}
193 193
194void zmii_detach(struct of_device *ofdev, int input) 194void zmii_detach(struct platform_device *ofdev, int input)
195{ 195{
196 struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); 196 struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev);
197 197
@@ -210,13 +210,13 @@ void zmii_detach(struct of_device *ofdev, int input)
210 mutex_unlock(&dev->lock); 210 mutex_unlock(&dev->lock);
211} 211}
212 212
213int zmii_get_regs_len(struct of_device *ofdev) 213int zmii_get_regs_len(struct platform_device *ofdev)
214{ 214{
215 return sizeof(struct emac_ethtool_regs_subhdr) + 215 return sizeof(struct emac_ethtool_regs_subhdr) +
216 sizeof(struct zmii_regs); 216 sizeof(struct zmii_regs);
217} 217}
218 218
219void *zmii_dump_regs(struct of_device *ofdev, void *buf) 219void *zmii_dump_regs(struct platform_device *ofdev, void *buf)
220{ 220{
221 struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); 221 struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev);
222 struct emac_ethtool_regs_subhdr *hdr = buf; 222 struct emac_ethtool_regs_subhdr *hdr = buf;
@@ -231,7 +231,7 @@ void *zmii_dump_regs(struct of_device *ofdev, void *buf)
231 return regs + 1; 231 return regs + 1;
232} 232}
233 233
234static int __devinit zmii_probe(struct of_device *ofdev, 234static int __devinit zmii_probe(struct platform_device *ofdev,
235 const struct of_device_id *match) 235 const struct of_device_id *match)
236{ 236{
237 struct device_node *np = ofdev->dev.of_node; 237 struct device_node *np = ofdev->dev.of_node;
@@ -286,7 +286,7 @@ static int __devinit zmii_probe(struct of_device *ofdev,
286 return rc; 286 return rc;
287} 287}
288 288
289static int __devexit zmii_remove(struct of_device *ofdev) 289static int __devexit zmii_remove(struct platform_device *ofdev)
290{ 290{
291 struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev); 291 struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev);
292 292
diff --git a/drivers/net/ibm_newemac/zmii.h b/drivers/net/ibm_newemac/zmii.h
index 6c9beba0c4b6..1333fa2b2781 100644
--- a/drivers/net/ibm_newemac/zmii.h
+++ b/drivers/net/ibm_newemac/zmii.h
@@ -48,20 +48,20 @@ struct zmii_instance {
48 u32 fer_save; 48 u32 fer_save;
49 49
50 /* OF device instance */ 50 /* OF device instance */
51 struct of_device *ofdev; 51 struct platform_device *ofdev;
52}; 52};
53 53
54#ifdef CONFIG_IBM_NEW_EMAC_ZMII 54#ifdef CONFIG_IBM_NEW_EMAC_ZMII
55 55
56extern int zmii_init(void); 56extern int zmii_init(void);
57extern void zmii_exit(void); 57extern void zmii_exit(void);
58extern int zmii_attach(struct of_device *ofdev, int input, int *mode); 58extern int zmii_attach(struct platform_device *ofdev, int input, int *mode);
59extern void zmii_detach(struct of_device *ofdev, int input); 59extern void zmii_detach(struct platform_device *ofdev, int input);
60extern void zmii_get_mdio(struct of_device *ofdev, int input); 60extern void zmii_get_mdio(struct platform_device *ofdev, int input);
61extern void zmii_put_mdio(struct of_device *ofdev, int input); 61extern void zmii_put_mdio(struct platform_device *ofdev, int input);
62extern void zmii_set_speed(struct of_device *ofdev, int input, int speed); 62extern void zmii_set_speed(struct platform_device *ofdev, int input, int speed);
63extern int zmii_get_regs_len(struct of_device *ocpdev); 63extern int zmii_get_regs_len(struct platform_device *ocpdev);
64extern void *zmii_dump_regs(struct of_device *ofdev, void *buf); 64extern void *zmii_dump_regs(struct platform_device *ofdev, void *buf);
65 65
66#else 66#else
67# define zmii_init() 0 67# define zmii_init() 0
diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c
index 4eea3f70c5cf..c7b624711f5e 100644
--- a/drivers/net/ll_temac_main.c
+++ b/drivers/net/ll_temac_main.c
@@ -159,7 +159,7 @@ static void temac_dma_dcr_out(struct temac_local *lp, int reg, u32 value)
159 * temac_dcr_setup - If the DMA is DCR based, then setup the address and 159 * temac_dcr_setup - If the DMA is DCR based, then setup the address and
160 * I/O functions 160 * I/O functions
161 */ 161 */
162static int temac_dcr_setup(struct temac_local *lp, struct of_device *op, 162static int temac_dcr_setup(struct temac_local *lp, struct platform_device *op,
163 struct device_node *np) 163 struct device_node *np)
164{ 164{
165 unsigned int dcrs; 165 unsigned int dcrs;
@@ -184,7 +184,7 @@ static int temac_dcr_setup(struct temac_local *lp, struct of_device *op,
184 * temac_dcr_setup - This is a stub for when DCR is not supported, 184 * temac_dcr_setup - This is a stub for when DCR is not supported,
185 * such as with MicroBlaze 185 * such as with MicroBlaze
186 */ 186 */
187static int temac_dcr_setup(struct temac_local *lp, struct of_device *op, 187static int temac_dcr_setup(struct temac_local *lp, struct platform_device *op,
188 struct device_node *np) 188 struct device_node *np)
189{ 189{
190 return -1; 190 return -1;
@@ -952,7 +952,7 @@ static const struct attribute_group temac_attr_group = {
952}; 952};
953 953
954static int __init 954static int __init
955temac_of_probe(struct of_device *op, const struct of_device_id *match) 955temac_of_probe(struct platform_device *op, const struct of_device_id *match)
956{ 956{
957 struct device_node *np; 957 struct device_node *np;
958 struct temac_local *lp; 958 struct temac_local *lp;
@@ -1094,7 +1094,7 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match)
1094 return rc; 1094 return rc;
1095} 1095}
1096 1096
1097static int __devexit temac_of_remove(struct of_device *op) 1097static int __devexit temac_of_remove(struct platform_device *op)
1098{ 1098{
1099 struct net_device *ndev = dev_get_drvdata(&op->dev); 1099 struct net_device *ndev = dev_get_drvdata(&op->dev);
1100 struct temac_local *lp = netdev_priv(ndev); 1100 struct temac_local *lp = netdev_priv(ndev);
diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c
index 04e552aa14ec..617f898ba5f0 100644
--- a/drivers/net/myri_sbus.c
+++ b/drivers/net/myri_sbus.c
@@ -926,7 +926,7 @@ static const struct net_device_ops myri_ops = {
926 .ndo_validate_addr = eth_validate_addr, 926 .ndo_validate_addr = eth_validate_addr,
927}; 927};
928 928
929static int __devinit myri_sbus_probe(struct of_device *op, const struct of_device_id *match) 929static int __devinit myri_sbus_probe(struct platform_device *op, const struct of_device_id *match)
930{ 930{
931 struct device_node *dp = op->dev.of_node; 931 struct device_node *dp = op->dev.of_node;
932 static unsigned version_printed; 932 static unsigned version_printed;
@@ -1124,7 +1124,7 @@ err:
1124 return -ENODEV; 1124 return -ENODEV;
1125} 1125}
1126 1126
1127static int __devexit myri_sbus_remove(struct of_device *op) 1127static int __devexit myri_sbus_remove(struct platform_device *op)
1128{ 1128{
1129 struct myri_eth *mp = dev_get_drvdata(&op->dev); 1129 struct myri_eth *mp = dev_get_drvdata(&op->dev);
1130 struct net_device *net_dev = mp->dev; 1130 struct net_device *net_dev = mp->dev;
diff --git a/drivers/net/myri_sbus.h b/drivers/net/myri_sbus.h
index ff363e95d9cf..80a2fa5cf757 100644
--- a/drivers/net/myri_sbus.h
+++ b/drivers/net/myri_sbus.h
@@ -288,7 +288,7 @@ struct myri_eth {
288 struct myri_eeprom eeprom; /* Local copy of EEPROM. */ 288 struct myri_eeprom eeprom; /* Local copy of EEPROM. */
289 unsigned int reg_size; /* Size of register space. */ 289 unsigned int reg_size; /* Size of register space. */
290 unsigned int shmem_base; /* Offset to shared ram. */ 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/* We use this to acquire receive skb's that we can DMA directly into. */ 294/* We use this to acquire receive skb's that we can DMA directly into. */
diff --git a/drivers/net/niu.c b/drivers/net/niu.c
index 404f2d552888..bc695d53cdcc 100644
--- a/drivers/net/niu.c
+++ b/drivers/net/niu.c
@@ -9103,7 +9103,7 @@ retry:
9103static int __devinit niu_n2_irq_init(struct niu *np, u8 *ldg_num_map) 9103static int __devinit niu_n2_irq_init(struct niu *np, u8 *ldg_num_map)
9104{ 9104{
9105#ifdef CONFIG_SPARC64 9105#ifdef CONFIG_SPARC64
9106 struct of_device *op = np->op; 9106 struct platform_device *op = np->op;
9107 const u32 *int_prop; 9107 const u32 *int_prop;
9108 int i; 9108 int i;
9109 9109
@@ -9688,7 +9688,7 @@ static void __devinit niu_driver_version(void)
9688 9688
9689static struct net_device * __devinit niu_alloc_and_init( 9689static struct net_device * __devinit niu_alloc_and_init(
9690 struct device *gen_dev, struct pci_dev *pdev, 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 u8 port) 9692 u8 port)
9693{ 9693{
9694 struct net_device *dev; 9694 struct net_device *dev;
@@ -10064,7 +10064,7 @@ static const struct niu_ops niu_phys_ops = {
10064 .unmap_single = niu_phys_unmap_single, 10064 .unmap_single = niu_phys_unmap_single,
10065}; 10065};
10066 10066
10067static int __devinit niu_of_probe(struct of_device *op, 10067static int __devinit niu_of_probe(struct platform_device *op,
10068 const struct of_device_id *match) 10068 const struct of_device_id *match)
10069{ 10069{
10070 union niu_parent_id parent_id; 10070 union niu_parent_id parent_id;
@@ -10179,7 +10179,7 @@ err_out:
10179 return err; 10179 return err;
10180} 10180}
10181 10181
10182static int __devexit niu_of_remove(struct of_device *op) 10182static int __devexit niu_of_remove(struct platform_device *op)
10183{ 10183{
10184 struct net_device *dev = dev_get_drvdata(&op->dev); 10184 struct net_device *dev = dev_get_drvdata(&op->dev);
10185 10185
diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c
index fc5fef2a8175..f62c7b717bc8 100644
--- a/drivers/net/phy/mdio-gpio.c
+++ b/drivers/net/phy/mdio-gpio.c
@@ -188,7 +188,7 @@ static int __devexit mdio_gpio_remove(struct platform_device *pdev)
188 188
189#ifdef CONFIG_OF_GPIO 189#ifdef CONFIG_OF_GPIO
190 190
191static int __devinit mdio_ofgpio_probe(struct of_device *ofdev, 191static int __devinit mdio_ofgpio_probe(struct platform_device *ofdev,
192 const struct of_device_id *match) 192 const struct of_device_id *match)
193{ 193{
194 struct mdio_gpio_platform_data *pdata; 194 struct mdio_gpio_platform_data *pdata;
@@ -224,7 +224,7 @@ out_free:
224 return -ENODEV; 224 return -ENODEV;
225} 225}
226 226
227static int __devexit mdio_ofgpio_remove(struct of_device *ofdev) 227static int __devexit mdio_ofgpio_remove(struct platform_device *ofdev)
228{ 228{
229 mdio_gpio_bus_destroy(&ofdev->dev); 229 mdio_gpio_bus_destroy(&ofdev->dev);
230 kfree(ofdev->dev.platform_data); 230 kfree(ofdev->dev.platform_data);
diff --git a/drivers/net/sunbmac.c b/drivers/net/sunbmac.c
index 09c071bd6ad4..618643e3ca3e 100644
--- a/drivers/net/sunbmac.c
+++ b/drivers/net/sunbmac.c
@@ -97,7 +97,7 @@ static int qec_global_reset(void __iomem *gregs)
97 97
98static void qec_init(struct bigmac *bp) 98static 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 void __iomem *gregs = bp->gregs; 101 void __iomem *gregs = bp->gregs;
102 u8 bsizes = bp->bigmac_bursts; 102 u8 bsizes = bp->bigmac_bursts;
103 u32 regval; 103 u32 regval;
@@ -1083,8 +1083,8 @@ static const struct net_device_ops bigmac_ops = {
1083 .ndo_validate_addr = eth_validate_addr, 1083 .ndo_validate_addr = eth_validate_addr,
1084}; 1084};
1085 1085
1086static int __devinit bigmac_ether_init(struct of_device *op, 1086static int __devinit bigmac_ether_init(struct platform_device *op,
1087 struct of_device *qec_op) 1087 struct platform_device *qec_op)
1088{ 1088{
1089 static int version_printed; 1089 static int version_printed;
1090 struct net_device *dev; 1090 struct net_device *dev;
@@ -1242,25 +1242,25 @@ fail_and_cleanup:
1242/* QEC can be the parent of either QuadEthernet or a BigMAC. We want 1242/* QEC can be the parent of either QuadEthernet or a BigMAC. We want
1243 * the latter. 1243 * the latter.
1244 */ 1244 */
1245static int __devinit bigmac_sbus_probe(struct of_device *op, 1245static int __devinit bigmac_sbus_probe(struct platform_device *op,
1246 const struct of_device_id *match) 1246 const struct of_device_id *match)
1247{ 1247{
1248 struct device *parent = op->dev.parent; 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 return bigmac_ether_init(op, qec_op); 1253 return bigmac_ether_init(op, qec_op);
1254} 1254}
1255 1255
1256static int __devexit bigmac_sbus_remove(struct of_device *op) 1256static int __devexit bigmac_sbus_remove(struct platform_device *op)
1257{ 1257{
1258 struct bigmac *bp = dev_get_drvdata(&op->dev); 1258 struct bigmac *bp = dev_get_drvdata(&op->dev);
1259 struct device *parent = op->dev.parent; 1259 struct device *parent = op->dev.parent;
1260 struct net_device *net_dev = bp->dev; 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 unregister_netdev(net_dev); 1265 unregister_netdev(net_dev);
1266 1266
diff --git a/drivers/net/sunbmac.h b/drivers/net/sunbmac.h
index 8840bc0b840b..8db88945b889 100644
--- a/drivers/net/sunbmac.h
+++ b/drivers/net/sunbmac.h
@@ -329,8 +329,8 @@ struct bigmac {
329 unsigned int timer_ticks; 329 unsigned int timer_ticks;
330 330
331 struct net_device_stats enet_stats; 331 struct net_device_stats enet_stats;
332 struct of_device *qec_op; 332 struct platform_device *qec_op;
333 struct of_device *bigmac_op; 333 struct platform_device *bigmac_op;
334 struct net_device *dev; 334 struct net_device *dev;
335}; 335};
336 336
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c
index eec443f64079..bd0df1c14955 100644
--- a/drivers/net/sunhme.c
+++ b/drivers/net/sunhme.c
@@ -1591,7 +1591,7 @@ static int happy_meal_init(struct happy_meal *hp)
1591 */ 1591 */
1592#ifdef CONFIG_SBUS 1592#ifdef CONFIG_SBUS
1593 if ((hp->happy_flags & HFLAG_PCI) == 0) { 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 if (sbus_can_dma_64bit()) { 1595 if (sbus_can_dma_64bit()) {
1596 sbus_set_sbus64(&op->dev, 1596 sbus_set_sbus64(&op->dev,
1597 hp->happy_bursts); 1597 hp->happy_bursts);
@@ -2480,7 +2480,7 @@ static void hme_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info
2480#ifdef CONFIG_SBUS 2480#ifdef CONFIG_SBUS
2481 else { 2481 else {
2482 const struct linux_prom_registers *regs; 2482 const struct linux_prom_registers *regs;
2483 struct of_device *op = hp->happy_dev; 2483 struct platform_device *op = hp->happy_dev;
2484 regs = of_get_property(op->dev.of_node, "regs", NULL); 2484 regs = of_get_property(op->dev.of_node, "regs", NULL);
2485 if (regs) 2485 if (regs)
2486 sprintf(info->bus_info, "SBUS:%d", 2486 sprintf(info->bus_info, "SBUS:%d",
@@ -2515,13 +2515,13 @@ static int hme_version_printed;
2515 * 2515 *
2516 * Return NULL on failure. 2516 * Return NULL on failure.
2517 */ 2517 */
2518static struct quattro * __devinit quattro_sbus_find(struct of_device *child) 2518static struct quattro * __devinit quattro_sbus_find(struct platform_device *child)
2519{ 2519{
2520 struct device *parent = child->dev.parent; 2520 struct device *parent = child->dev.parent;
2521 struct of_device *op; 2521 struct platform_device *op;
2522 struct quattro *qp; 2522 struct quattro *qp;
2523 2523
2524 op = to_of_device(parent); 2524 op = to_platform_device(parent);
2525 qp = dev_get_drvdata(&op->dev); 2525 qp = dev_get_drvdata(&op->dev);
2526 if (qp) 2526 if (qp)
2527 return qp; 2527 return qp;
@@ -2551,7 +2551,7 @@ static int __init quattro_sbus_register_irqs(void)
2551 struct quattro *qp; 2551 struct quattro *qp;
2552 2552
2553 for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) { 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 int err, qfe_slot, skip = 0; 2555 int err, qfe_slot, skip = 0;
2556 2556
2557 for (qfe_slot = 0; qfe_slot < 4; qfe_slot++) { 2557 for (qfe_slot = 0; qfe_slot < 4; qfe_slot++) {
@@ -2580,7 +2580,7 @@ static void quattro_sbus_free_irqs(void)
2580 struct quattro *qp; 2580 struct quattro *qp;
2581 2581
2582 for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) { 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 int qfe_slot, skip = 0; 2584 int qfe_slot, skip = 0;
2585 2585
2586 for (qfe_slot = 0; qfe_slot < 4; qfe_slot++) { 2586 for (qfe_slot = 0; qfe_slot < 4; qfe_slot++) {
@@ -2639,7 +2639,7 @@ static const struct net_device_ops hme_netdev_ops = {
2639}; 2639};
2640 2640
2641#ifdef CONFIG_SBUS 2641#ifdef CONFIG_SBUS
2642static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe) 2642static int __devinit happy_meal_sbus_probe_one(struct platform_device *op, int is_qfe)
2643{ 2643{
2644 struct device_node *dp = op->dev.of_node, *sbus_dp; 2644 struct device_node *dp = op->dev.of_node, *sbus_dp;
2645 struct quattro *qp = NULL; 2645 struct quattro *qp = NULL;
@@ -2648,7 +2648,7 @@ static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe)
2648 int i, qfe_slot = -1; 2648 int i, qfe_slot = -1;
2649 int err = -ENODEV; 2649 int err = -ENODEV;
2650 2650
2651 sbus_dp = to_of_device(op->dev.parent)->dev.of_node; 2651 sbus_dp = op->dev.parent->of_node;
2652 2652
2653 /* We can match PCI devices too, do not accept those here. */ 2653 /* We can match PCI devices too, do not accept those here. */
2654 if (strcmp(sbus_dp->name, "sbus")) 2654 if (strcmp(sbus_dp->name, "sbus"))
@@ -3235,7 +3235,7 @@ static void happy_meal_pci_exit(void)
3235#endif 3235#endif
3236 3236
3237#ifdef CONFIG_SBUS 3237#ifdef CONFIG_SBUS
3238static int __devinit hme_sbus_probe(struct of_device *op, const struct of_device_id *match) 3238static int __devinit hme_sbus_probe(struct platform_device *op, const struct of_device_id *match)
3239{ 3239{
3240 struct device_node *dp = op->dev.of_node; 3240 struct device_node *dp = op->dev.of_node;
3241 const char *model = of_get_property(dp, "model", NULL); 3241 const char *model = of_get_property(dp, "model", NULL);
@@ -3247,7 +3247,7 @@ static int __devinit hme_sbus_probe(struct of_device *op, const struct of_device
3247 return happy_meal_sbus_probe_one(op, is_qfe); 3247 return happy_meal_sbus_probe_one(op, is_qfe);
3248} 3248}
3249 3249
3250static int __devexit hme_sbus_remove(struct of_device *op) 3250static int __devexit hme_sbus_remove(struct platform_device *op)
3251{ 3251{
3252 struct happy_meal *hp = dev_get_drvdata(&op->dev); 3252 struct happy_meal *hp = dev_get_drvdata(&op->dev);
3253 struct net_device *net_dev = hp->dev; 3253 struct net_device *net_dev = hp->dev;
diff --git a/drivers/net/sunhme.h b/drivers/net/sunhme.h
index efd2ca0fcad3..756b5bf3aa89 100644
--- a/drivers/net/sunhme.h
+++ b/drivers/net/sunhme.h
@@ -407,7 +407,7 @@ struct happy_meal {
407 void (*write_rxd)(struct happy_meal_rxd *, u32, u32); 407 void (*write_rxd)(struct happy_meal_rxd *, u32, u32);
408#endif 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 void *happy_dev; 411 void *happy_dev;
412 struct device *dma_dev; 412 struct device *dma_dev;
413 413
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c
index ee364fa75634..8dcb858f2168 100644
--- a/drivers/net/sunlance.c
+++ b/drivers/net/sunlance.c
@@ -250,7 +250,7 @@ struct lance_private {
250 int rx_new, tx_new; 250 int rx_new, tx_new;
251 int rx_old, tx_old; 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 char tpe; /* cable-selection is TPE */ 254 char tpe; /* cable-selection is TPE */
255 char auto_select; /* cable-selection by carrier */ 255 char auto_select; /* cable-selection by carrier */
256 char burst_sizes; /* ledma SBus burst sizes */ 256 char burst_sizes; /* ledma SBus burst sizes */
@@ -265,8 +265,8 @@ struct lance_private {
265 char *name; 265 char *name;
266 dma_addr_t init_block_dvma; 266 dma_addr_t init_block_dvma;
267 struct net_device *dev; /* Backpointer */ 267 struct net_device *dev; /* Backpointer */
268 struct of_device *op; 268 struct platform_device *op;
269 struct of_device *lebuffer; 269 struct platform_device *lebuffer;
270 struct timer_list multicast_timer; 270 struct timer_list multicast_timer;
271}; 271};
272 272
@@ -1272,7 +1272,7 @@ static void lance_free_hwresources(struct lance_private *lp)
1272 if (lp->lregs) 1272 if (lp->lregs)
1273 of_iounmap(&lp->op->resource[0], lp->lregs, LANCE_REG_SIZE); 1273 of_iounmap(&lp->op->resource[0], lp->lregs, LANCE_REG_SIZE);
1274 if (lp->dregs) { 1274 if (lp->dregs) {
1275 struct of_device *ledma = lp->ledma; 1275 struct platform_device *ledma = lp->ledma;
1276 1276
1277 of_iounmap(&ledma->resource[0], lp->dregs, 1277 of_iounmap(&ledma->resource[0], lp->dregs,
1278 resource_size(&ledma->resource[0])); 1278 resource_size(&ledma->resource[0]));
@@ -1319,9 +1319,9 @@ static const struct net_device_ops sparc_lance_ops = {
1319 .ndo_validate_addr = eth_validate_addr, 1319 .ndo_validate_addr = eth_validate_addr,
1320}; 1320};
1321 1321
1322static int __devinit sparc_lance_probe_one(struct of_device *op, 1322static int __devinit sparc_lance_probe_one(struct platform_device *op,
1323 struct of_device *ledma, 1323 struct platform_device *ledma,
1324 struct of_device *lebuffer) 1324 struct platform_device *lebuffer)
1325{ 1325{
1326 struct device_node *dp = op->dev.of_node; 1326 struct device_node *dp = op->dev.of_node;
1327 static unsigned version_printed; 1327 static unsigned version_printed;
@@ -1503,9 +1503,9 @@ fail:
1503 return -ENODEV; 1503 return -ENODEV;
1504} 1504}
1505 1505
1506static int __devinit sunlance_sbus_probe(struct of_device *op, const struct of_device_id *match) 1506static 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 struct device_node *parent_dp = parent->dev.of_node; 1509 struct device_node *parent_dp = parent->dev.of_node;
1510 int err; 1510 int err;
1511 1511
@@ -1519,7 +1519,7 @@ static int __devinit sunlance_sbus_probe(struct of_device *op, const struct of_d
1519 return err; 1519 return err;
1520} 1520}
1521 1521
1522static int __devexit sunlance_sbus_remove(struct of_device *op) 1522static int __devexit sunlance_sbus_remove(struct platform_device *op)
1523{ 1523{
1524 struct lance_private *lp = dev_get_drvdata(&op->dev); 1524 struct lance_private *lp = dev_get_drvdata(&op->dev);
1525 struct net_device *net_dev = lp->dev; 1525 struct net_device *net_dev = lp->dev;
diff --git a/drivers/net/sunqe.c b/drivers/net/sunqe.c
index 5f84a5dadedd..72e65d4666ef 100644
--- a/drivers/net/sunqe.c
+++ b/drivers/net/sunqe.c
@@ -689,7 +689,7 @@ static void qe_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
689{ 689{
690 const struct linux_prom_registers *regs; 690 const struct linux_prom_registers *regs;
691 struct sunqe *qep = netdev_priv(dev); 691 struct sunqe *qep = netdev_priv(dev);
692 struct of_device *op; 692 struct platform_device *op;
693 693
694 strcpy(info->driver, "sunqe"); 694 strcpy(info->driver, "sunqe");
695 strcpy(info->version, "3.0"); 695 strcpy(info->version, "3.0");
@@ -720,7 +720,7 @@ static const struct ethtool_ops qe_ethtool_ops = {
720}; 720};
721 721
722/* This is only called once at boot time for each card probed. */ 722/* This is only called once at boot time for each card probed. */
723static void qec_init_once(struct sunqec *qecp, struct of_device *op) 723static void qec_init_once(struct sunqec *qecp, struct platform_device *op)
724{ 724{
725 u8 bsizes = qecp->qec_bursts; 725 u8 bsizes = qecp->qec_bursts;
726 726
@@ -770,9 +770,9 @@ static u8 __devinit qec_get_burst(struct device_node *dp)
770 return bsizes; 770 return bsizes;
771} 771}
772 772
773static struct sunqec * __devinit get_qec(struct of_device *child) 773static 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 struct sunqec *qecp; 776 struct sunqec *qecp;
777 777
778 qecp = dev_get_drvdata(&op->dev); 778 qecp = dev_get_drvdata(&op->dev);
@@ -836,7 +836,7 @@ static const struct net_device_ops qec_ops = {
836 .ndo_validate_addr = eth_validate_addr, 836 .ndo_validate_addr = eth_validate_addr,
837}; 837};
838 838
839static int __devinit qec_ether_init(struct of_device *op) 839static int __devinit qec_ether_init(struct platform_device *op)
840{ 840{
841 static unsigned version_printed; 841 static unsigned version_printed;
842 struct net_device *dev; 842 struct net_device *dev;
@@ -941,12 +941,12 @@ fail:
941 return res; 941 return res;
942} 942}
943 943
944static int __devinit qec_sbus_probe(struct of_device *op, const struct of_device_id *match) 944static int __devinit qec_sbus_probe(struct platform_device *op, const struct of_device_id *match)
945{ 945{
946 return qec_ether_init(op); 946 return qec_ether_init(op);
947} 947}
948 948
949static int __devexit qec_sbus_remove(struct of_device *op) 949static int __devexit qec_sbus_remove(struct platform_device *op)
950{ 950{
951 struct sunqe *qp = dev_get_drvdata(&op->dev); 951 struct sunqe *qp = dev_get_drvdata(&op->dev);
952 struct net_device *net_dev = qp->dev; 952 struct net_device *net_dev = qp->dev;
@@ -997,7 +997,7 @@ static void __exit qec_exit(void)
997 997
998 while (root_qec_dev) { 998 while (root_qec_dev) {
999 struct sunqec *next = root_qec_dev->next_module; 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 free_irq(op->archdata.irqs[0], (void *) root_qec_dev); 1002 free_irq(op->archdata.irqs[0], (void *) root_qec_dev);
1003 of_iounmap(&op->resource[0], root_qec_dev->gregs, 1003 of_iounmap(&op->resource[0], root_qec_dev->gregs,
diff --git a/drivers/net/sunqe.h b/drivers/net/sunqe.h
index 5813a7b2faa5..581781b6b2fa 100644
--- a/drivers/net/sunqe.h
+++ b/drivers/net/sunqe.h
@@ -314,7 +314,7 @@ struct sunqec {
314 void __iomem *gregs; /* QEC Global Registers */ 314 void __iomem *gregs; /* QEC Global Registers */
315 struct sunqe *qes[4]; /* Each child MACE */ 315 struct sunqe *qes[4]; /* Each child MACE */
316 unsigned int qec_bursts; /* Support burst sizes */ 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 struct sunqec *next_module; /* List of all QECs in system */ 318 struct sunqec *next_module; /* List of all QECs in system */
319}; 319};
320 320
@@ -342,7 +342,7 @@ struct sunqe {
342 __u32 buffers_dvma; /* DVMA visible address. */ 342 __u32 buffers_dvma; /* DVMA visible address. */
343 struct sunqec *parent; 343 struct sunqec *parent;
344 u8 mconfig; /* Base MACE mconfig value */ 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 struct net_device *dev; /* QE's netdevice struct */ 346 struct net_device *dev; /* QE's netdevice struct */
347 int channel; /* Who am I? */ 347 int channel; /* Who am I? */
348}; 348};
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index 8d532f9b50d0..a4c3f5708246 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -3601,7 +3601,7 @@ static void ucc_geth_timeout(struct net_device *dev)
3601 3601
3602#ifdef CONFIG_PM 3602#ifdef CONFIG_PM
3603 3603
3604static int ucc_geth_suspend(struct of_device *ofdev, pm_message_t state) 3604static int ucc_geth_suspend(struct platform_device *ofdev, pm_message_t state)
3605{ 3605{
3606 struct net_device *ndev = dev_get_drvdata(&ofdev->dev); 3606 struct net_device *ndev = dev_get_drvdata(&ofdev->dev);
3607 struct ucc_geth_private *ugeth = netdev_priv(ndev); 3607 struct ucc_geth_private *ugeth = netdev_priv(ndev);
@@ -3629,7 +3629,7 @@ static int ucc_geth_suspend(struct of_device *ofdev, pm_message_t state)
3629 return 0; 3629 return 0;
3630} 3630}
3631 3631
3632static int ucc_geth_resume(struct of_device *ofdev) 3632static int ucc_geth_resume(struct platform_device *ofdev)
3633{ 3633{
3634 struct net_device *ndev = dev_get_drvdata(&ofdev->dev); 3634 struct net_device *ndev = dev_get_drvdata(&ofdev->dev);
3635 struct ucc_geth_private *ugeth = netdev_priv(ndev); 3635 struct ucc_geth_private *ugeth = netdev_priv(ndev);
@@ -3732,7 +3732,7 @@ static const struct net_device_ops ucc_geth_netdev_ops = {
3732#endif 3732#endif
3733}; 3733};
3734 3734
3735static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *match) 3735static int ucc_geth_probe(struct platform_device* ofdev, const struct of_device_id *match)
3736{ 3736{
3737 struct device *device = &ofdev->dev; 3737 struct device *device = &ofdev->dev;
3738 struct device_node *np = ofdev->dev.of_node; 3738 struct device_node *np = ofdev->dev.of_node;
@@ -3954,7 +3954,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
3954 return 0; 3954 return 0;
3955} 3955}
3956 3956
3957static int ucc_geth_remove(struct of_device* ofdev) 3957static int ucc_geth_remove(struct platform_device* ofdev)
3958{ 3958{
3959 struct device *device = &ofdev->dev; 3959 struct device *device = &ofdev->dev;
3960 struct net_device *dev = dev_get_drvdata(device); 3960 struct net_device *dev = dev_get_drvdata(device);
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index b2c2f391b29d..ecbbb688eba0 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -1086,7 +1086,7 @@ static void xemaclite_remove_ndev(struct net_device *ndev)
1086 * 1086 *
1087 * Return: Value of the parameter if the parameter is found, or 0 otherwise 1087 * Return: Value of the parameter if the parameter is found, or 0 otherwise
1088 */ 1088 */
1089static bool get_bool(struct of_device *ofdev, const char *s) 1089static bool get_bool(struct platform_device *ofdev, const char *s)
1090{ 1090{
1091 u32 *p = (u32 *)of_get_property(ofdev->dev.of_node, s, NULL); 1091 u32 *p = (u32 *)of_get_property(ofdev->dev.of_node, s, NULL);
1092 1092
@@ -1115,7 +1115,7 @@ static struct net_device_ops xemaclite_netdev_ops;
1115 * Return: 0, if the driver is bound to the Emaclite device, or 1115 * Return: 0, if the driver is bound to the Emaclite device, or
1116 * a negative error if there is failure. 1116 * a negative error if there is failure.
1117 */ 1117 */
1118static int __devinit xemaclite_of_probe(struct of_device *ofdev, 1118static int __devinit xemaclite_of_probe(struct platform_device *ofdev,
1119 const struct of_device_id *match) 1119 const struct of_device_id *match)
1120{ 1120{
1121 struct resource r_irq; /* Interrupt resources */ 1121 struct resource r_irq; /* Interrupt resources */
@@ -1240,7 +1240,7 @@ error2:
1240 * 1240 *
1241 * Return: 0, always. 1241 * Return: 0, always.
1242 */ 1242 */
1243static int __devexit xemaclite_of_remove(struct of_device *of_dev) 1243static int __devexit xemaclite_of_remove(struct platform_device *of_dev)
1244{ 1244{
1245 struct device *dev = &of_dev->dev; 1245 struct device *dev = &of_dev->dev;
1246 struct net_device *ndev = dev_get_drvdata(dev); 1246 struct net_device *ndev = dev_get_drvdata(dev);
diff --git a/drivers/of/device.c b/drivers/of/device.c
index 0d8a0644f540..92de0eb74aea 100644
--- a/drivers/of/device.c
+++ b/drivers/of/device.c
@@ -14,7 +14,7 @@
14 * @ids: array of of device match structures to search in 14 * @ids: array of of device match structures to search in
15 * @dev: the of device structure to match against 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 * system is in its list of supported devices. 18 * system is in its list of supported devices.
19 */ 19 */
20const struct of_device_id *of_match_device(const struct of_device_id *matches, 20const struct of_device_id *of_match_device(const struct of_device_id *matches,
diff --git a/drivers/parport/parport_sunbpp.c b/drivers/parport/parport_sunbpp.c
index 210a6441a066..55ba118f1cf1 100644
--- a/drivers/parport/parport_sunbpp.c
+++ b/drivers/parport/parport_sunbpp.c
@@ -286,7 +286,7 @@ static struct parport_operations parport_sunbpp_ops =
286 .owner = THIS_MODULE, 286 .owner = THIS_MODULE,
287}; 287};
288 288
289static int __devinit bpp_probe(struct of_device *op, const struct of_device_id *match) 289static int __devinit bpp_probe(struct platform_device *op, const struct of_device_id *match)
290{ 290{
291 struct parport_operations *ops; 291 struct parport_operations *ops;
292 struct bpp_regs __iomem *regs; 292 struct bpp_regs __iomem *regs;
@@ -351,7 +351,7 @@ out_unmap:
351 return err; 351 return err;
352} 352}
353 353
354static int __devexit bpp_remove(struct of_device *op) 354static int __devexit bpp_remove(struct platform_device *op)
355{ 355{
356 struct parport *p = dev_get_drvdata(&op->dev); 356 struct parport *p = dev_get_drvdata(&op->dev);
357 struct parport_operations *ops = p->ops; 357 struct parport_operations *ops = p->ops;
diff --git a/drivers/pcmcia/electra_cf.c b/drivers/pcmcia/electra_cf.c
index f94d8281cfb0..546d3024b6f0 100644
--- a/drivers/pcmcia/electra_cf.c
+++ b/drivers/pcmcia/electra_cf.c
@@ -44,7 +44,7 @@ struct electra_cf_socket {
44 unsigned present:1; 44 unsigned present:1;
45 unsigned active:1; 45 unsigned active:1;
46 46
47 struct of_device *ofdev; 47 struct platform_device *ofdev;
48 unsigned long mem_phys; 48 unsigned long mem_phys;
49 void __iomem * mem_base; 49 void __iomem * mem_base;
50 unsigned long mem_size; 50 unsigned long mem_size;
@@ -181,7 +181,7 @@ static struct pccard_operations electra_cf_ops = {
181 .set_mem_map = electra_cf_set_mem_map, 181 .set_mem_map = electra_cf_set_mem_map,
182}; 182};
183 183
184static int __devinit electra_cf_probe(struct of_device *ofdev, 184static int __devinit electra_cf_probe(struct platform_device *ofdev,
185 const struct of_device_id *match) 185 const struct of_device_id *match)
186{ 186{
187 struct device *device = &ofdev->dev; 187 struct device *device = &ofdev->dev;
@@ -325,7 +325,7 @@ fail1:
325 325
326} 326}
327 327
328static int __devexit electra_cf_remove(struct of_device *ofdev) 328static int __devexit electra_cf_remove(struct platform_device *ofdev)
329{ 329{
330 struct device *device = &ofdev->dev; 330 struct device *device = &ofdev->dev;
331 struct electra_cf_socket *cf; 331 struct electra_cf_socket *cf;
diff --git a/drivers/pcmcia/m8xx_pcmcia.c b/drivers/pcmcia/m8xx_pcmcia.c
index f2f90a7d3e12..f0ecad99ce81 100644
--- a/drivers/pcmcia/m8xx_pcmcia.c
+++ b/drivers/pcmcia/m8xx_pcmcia.c
@@ -1149,7 +1149,7 @@ static struct pccard_operations m8xx_services = {
1149 .set_mem_map = m8xx_set_mem_map, 1149 .set_mem_map = m8xx_set_mem_map,
1150}; 1150};
1151 1151
1152static int __init m8xx_probe(struct of_device *ofdev, 1152static int __init m8xx_probe(struct platform_device *ofdev,
1153 const struct of_device_id *match) 1153 const struct of_device_id *match)
1154{ 1154{
1155 struct pcmcia_win *w; 1155 struct pcmcia_win *w;
@@ -1249,7 +1249,7 @@ static int __init m8xx_probe(struct of_device *ofdev,
1249 return 0; 1249 return 0;
1250} 1250}
1251 1251
1252static int m8xx_remove(struct of_device *ofdev) 1252static int m8xx_remove(struct platform_device *ofdev)
1253{ 1253{
1254 u32 m, i; 1254 u32 m, i;
1255 struct pcmcia_win *w; 1255 struct pcmcia_win *w;
diff --git a/drivers/rtc/rtc-mpc5121.c b/drivers/rtc/rtc-mpc5121.c
index db5d8c416d26..dfcdf0901d21 100644
--- a/drivers/rtc/rtc-mpc5121.c
+++ b/drivers/rtc/rtc-mpc5121.c
@@ -268,7 +268,7 @@ static const struct rtc_class_ops mpc5121_rtc_ops = {
268 .update_irq_enable = mpc5121_rtc_update_irq_enable, 268 .update_irq_enable = mpc5121_rtc_update_irq_enable,
269}; 269};
270 270
271static int __devinit mpc5121_rtc_probe(struct of_device *op, 271static int __devinit mpc5121_rtc_probe(struct platform_device *op,
272 const struct of_device_id *match) 272 const struct of_device_id *match)
273{ 273{
274 struct mpc5121_rtc_data *rtc; 274 struct mpc5121_rtc_data *rtc;
@@ -338,7 +338,7 @@ out_free:
338 return err; 338 return err;
339} 339}
340 340
341static int __devexit mpc5121_rtc_remove(struct of_device *op) 341static int __devexit mpc5121_rtc_remove(struct platform_device *op)
342{ 342{
343 struct mpc5121_rtc_data *rtc = dev_get_drvdata(&op->dev); 343 struct mpc5121_rtc_data *rtc = dev_get_drvdata(&op->dev);
344 struct mpc5121_rtc_regs __iomem *regs = rtc->regs; 344 struct mpc5121_rtc_regs __iomem *regs = rtc->regs;
diff --git a/drivers/sbus/char/bbc_envctrl.c b/drivers/sbus/char/bbc_envctrl.c
index 103fdf6b0b89..160e7510aca6 100644
--- a/drivers/sbus/char/bbc_envctrl.c
+++ b/drivers/sbus/char/bbc_envctrl.c
@@ -443,7 +443,7 @@ static int kenvctrld(void *__unused)
443 return 0; 443 return 0;
444} 444}
445 445
446static void attach_one_temp(struct bbc_i2c_bus *bp, struct of_device *op, 446static void attach_one_temp(struct bbc_i2c_bus *bp, struct platform_device *op,
447 int temp_idx) 447 int temp_idx)
448{ 448{
449 struct bbc_cpu_temperature *tp; 449 struct bbc_cpu_temperature *tp;
@@ -488,7 +488,7 @@ static void attach_one_temp(struct bbc_i2c_bus *bp, struct of_device *op,
488 tp->fan_todo[FAN_CPU] = FAN_SAME; 488 tp->fan_todo[FAN_CPU] = FAN_SAME;
489} 489}
490 490
491static void attach_one_fan(struct bbc_i2c_bus *bp, struct of_device *op, 491static void attach_one_fan(struct bbc_i2c_bus *bp, struct platform_device *op,
492 int fan_idx) 492 int fan_idx)
493{ 493{
494 struct bbc_fan_control *fp; 494 struct bbc_fan_control *fp;
@@ -559,7 +559,7 @@ static void destroy_all_fans(struct bbc_i2c_bus *bp)
559 559
560int bbc_envctrl_init(struct bbc_i2c_bus *bp) 560int bbc_envctrl_init(struct bbc_i2c_bus *bp)
561{ 561{
562 struct of_device *op; 562 struct platform_device *op;
563 int temp_index = 0; 563 int temp_index = 0;
564 int fan_index = 0; 564 int fan_index = 0;
565 int devidx = 0; 565 int devidx = 0;
diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c
index 3e89c313e98d..614a5e114a19 100644
--- a/drivers/sbus/char/bbc_i2c.c
+++ b/drivers/sbus/char/bbc_i2c.c
@@ -51,7 +51,7 @@
51 * The second controller also connects to the smartcard reader, if present. 51 * The second controller also connects to the smartcard reader, if present.
52 */ 52 */
53 53
54static void set_device_claimage(struct bbc_i2c_bus *bp, struct of_device *op, int val) 54static void set_device_claimage(struct bbc_i2c_bus *bp, struct platform_device *op, int val)
55{ 55{
56 int i; 56 int i;
57 57
@@ -66,9 +66,9 @@ static void set_device_claimage(struct bbc_i2c_bus *bp, struct of_device *op, in
66#define claim_device(BP,ECHILD) set_device_claimage(BP,ECHILD,1) 66#define claim_device(BP,ECHILD) set_device_claimage(BP,ECHILD,1)
67#define release_device(BP,ECHILD) set_device_claimage(BP,ECHILD,0) 67#define release_device(BP,ECHILD) set_device_claimage(BP,ECHILD,0)
68 68
69struct of_device *bbc_i2c_getdev(struct bbc_i2c_bus *bp, int index) 69struct 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 int curidx = 0, i; 72 int curidx = 0, i;
73 73
74 for (i = 0; i < NUM_CHILDREN; i++) { 74 for (i = 0; i < NUM_CHILDREN; i++) {
@@ -86,7 +86,7 @@ out:
86 return NULL; 86 return NULL;
87} 87}
88 88
89struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct of_device *op) 89struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct platform_device *op)
90{ 90{
91 struct bbc_i2c_client *client; 91 struct bbc_i2c_client *client;
92 const u32 *reg; 92 const u32 *reg;
@@ -114,7 +114,7 @@ struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct of_device *
114void bbc_i2c_detach(struct bbc_i2c_client *client) 114void bbc_i2c_detach(struct bbc_i2c_client *client)
115{ 115{
116 struct bbc_i2c_bus *bp = client->bp; 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 release_device(bp, op); 119 release_device(bp, op);
120 kfree(client); 120 kfree(client);
@@ -297,7 +297,7 @@ static void __init reset_one_i2c(struct bbc_i2c_bus *bp)
297 writeb(I2C_PCF_IDLE, bp->i2c_control_regs + 0x0); 297 writeb(I2C_PCF_IDLE, bp->i2c_control_regs + 0x0);
298} 298}
299 299
300static struct bbc_i2c_bus * __init attach_one_i2c(struct of_device *op, int index) 300static struct bbc_i2c_bus * __init attach_one_i2c(struct platform_device *op, int index)
301{ 301{
302 struct bbc_i2c_bus *bp; 302 struct bbc_i2c_bus *bp;
303 struct device_node *dp; 303 struct device_node *dp;
@@ -330,7 +330,7 @@ static struct bbc_i2c_bus * __init attach_one_i2c(struct of_device *op, int inde
330 for (dp = op->dev.of_node->child; 330 for (dp = op->dev.of_node->child;
331 dp && entry < 8; 331 dp && entry < 8;
332 dp = dp->sibling, entry++) { 332 dp = dp->sibling, entry++) {
333 struct of_device *child_op; 333 struct platform_device *child_op;
334 334
335 child_op = of_find_device_by_node(dp); 335 child_op = of_find_device_by_node(dp);
336 bp->devs[entry].device = child_op; 336 bp->devs[entry].device = child_op;
@@ -361,7 +361,7 @@ fail:
361extern int bbc_envctrl_init(struct bbc_i2c_bus *bp); 361extern int bbc_envctrl_init(struct bbc_i2c_bus *bp);
362extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp); 362extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp);
363 363
364static int __devinit bbc_i2c_probe(struct of_device *op, 364static int __devinit bbc_i2c_probe(struct platform_device *op,
365 const struct of_device_id *match) 365 const struct of_device_id *match)
366{ 366{
367 struct bbc_i2c_bus *bp; 367 struct bbc_i2c_bus *bp;
@@ -386,7 +386,7 @@ static int __devinit bbc_i2c_probe(struct of_device *op,
386 return err; 386 return err;
387} 387}
388 388
389static int __devexit bbc_i2c_remove(struct of_device *op) 389static int __devexit bbc_i2c_remove(struct platform_device *op)
390{ 390{
391 struct bbc_i2c_bus *bp = dev_get_drvdata(&op->dev); 391 struct bbc_i2c_bus *bp = dev_get_drvdata(&op->dev);
392 392
diff --git a/drivers/sbus/char/bbc_i2c.h b/drivers/sbus/char/bbc_i2c.h
index 83c4811b7b5e..4b4531066e75 100644
--- a/drivers/sbus/char/bbc_i2c.h
+++ b/drivers/sbus/char/bbc_i2c.h
@@ -7,7 +7,7 @@
7 7
8struct bbc_i2c_client { 8struct bbc_i2c_client {
9 struct bbc_i2c_bus *bp; 9 struct bbc_i2c_bus *bp;
10 struct of_device *op; 10 struct platform_device *op;
11 int bus; 11 int bus;
12 int address; 12 int address;
13}; 13};
@@ -64,16 +64,16 @@ struct bbc_i2c_bus {
64 struct list_head temps; 64 struct list_head temps;
65 struct list_head fans; 65 struct list_head fans;
66 66
67 struct of_device *op; 67 struct platform_device *op;
68 struct { 68 struct {
69 struct of_device *device; 69 struct platform_device *device;
70 int client_claimed; 70 int client_claimed;
71 } devs[NUM_CHILDREN]; 71 } devs[NUM_CHILDREN];
72}; 72};
73 73
74/* Probing and attachment. */ 74/* Probing and attachment. */
75extern struct of_device *bbc_i2c_getdev(struct bbc_i2c_bus *, int); 75extern struct platform_device *bbc_i2c_getdev(struct bbc_i2c_bus *, int);
76extern struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct of_device *); 76extern struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct platform_device *);
77extern void bbc_i2c_detach(struct bbc_i2c_client *); 77extern void bbc_i2c_detach(struct bbc_i2c_client *);
78 78
79/* Register read/write. NOTE: Blocking! */ 79/* Register read/write. NOTE: Blocking! */
diff --git a/drivers/sbus/char/display7seg.c b/drivers/sbus/char/display7seg.c
index 47db97583ea7..1690e53fb84a 100644
--- a/drivers/sbus/char/display7seg.c
+++ b/drivers/sbus/char/display7seg.c
@@ -170,7 +170,7 @@ static struct miscdevice d7s_miscdev = {
170 .fops = &d7s_fops 170 .fops = &d7s_fops
171}; 171};
172 172
173static int __devinit d7s_probe(struct of_device *op, 173static int __devinit d7s_probe(struct platform_device *op,
174 const struct of_device_id *match) 174 const struct of_device_id *match)
175{ 175{
176 struct device_node *opts; 176 struct device_node *opts;
@@ -236,7 +236,7 @@ out_free:
236 goto out; 236 goto out;
237} 237}
238 238
239static int __devexit d7s_remove(struct of_device *op) 239static int __devexit d7s_remove(struct platform_device *op)
240{ 240{
241 struct d7s *p = dev_get_drvdata(&op->dev); 241 struct d7s *p = dev_get_drvdata(&op->dev);
242 u8 regs = readb(p->regs); 242 u8 regs = readb(p->regs);
diff --git a/drivers/sbus/char/envctrl.c b/drivers/sbus/char/envctrl.c
index 3c27f45e2b6d..078e5f4520ef 100644
--- a/drivers/sbus/char/envctrl.c
+++ b/drivers/sbus/char/envctrl.c
@@ -1027,7 +1027,7 @@ static int kenvctrld(void *__unused)
1027 return 0; 1027 return 0;
1028} 1028}
1029 1029
1030static int __devinit envctrl_probe(struct of_device *op, 1030static int __devinit envctrl_probe(struct platform_device *op,
1031 const struct of_device_id *match) 1031 const struct of_device_id *match)
1032{ 1032{
1033 struct device_node *dp; 1033 struct device_node *dp;
@@ -1104,7 +1104,7 @@ out_iounmap:
1104 return err; 1104 return err;
1105} 1105}
1106 1106
1107static int __devexit envctrl_remove(struct of_device *op) 1107static int __devexit envctrl_remove(struct platform_device *op)
1108{ 1108{
1109 int index; 1109 int index;
1110 1110
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c
index 8bb31c584b64..2b4b4b613c48 100644
--- a/drivers/sbus/char/flash.c
+++ b/drivers/sbus/char/flash.c
@@ -160,7 +160,7 @@ static const struct file_operations flash_fops = {
160 160
161static struct miscdevice flash_dev = { FLASH_MINOR, "flash", &flash_fops }; 161static struct miscdevice flash_dev = { FLASH_MINOR, "flash", &flash_fops };
162 162
163static int __devinit flash_probe(struct of_device *op, 163static int __devinit flash_probe(struct platform_device *op,
164 const struct of_device_id *match) 164 const struct of_device_id *match)
165{ 165{
166 struct device_node *dp = op->dev.of_node; 166 struct device_node *dp = op->dev.of_node;
@@ -192,7 +192,7 @@ static int __devinit flash_probe(struct of_device *op,
192 return misc_register(&flash_dev); 192 return misc_register(&flash_dev);
193} 193}
194 194
195static int __devexit flash_remove(struct of_device *op) 195static int __devexit flash_remove(struct platform_device *op)
196{ 196{
197 misc_deregister(&flash_dev); 197 misc_deregister(&flash_dev);
198 198
diff --git a/drivers/sbus/char/uctrl.c b/drivers/sbus/char/uctrl.c
index 41eb6725ff5f..1b345be5cc02 100644
--- a/drivers/sbus/char/uctrl.c
+++ b/drivers/sbus/char/uctrl.c
@@ -348,7 +348,7 @@ static void uctrl_get_external_status(struct uctrl_driver *driver)
348 348
349} 349}
350 350
351static int __devinit uctrl_probe(struct of_device *op, 351static int __devinit uctrl_probe(struct platform_device *op,
352 const struct of_device_id *match) 352 const struct of_device_id *match)
353{ 353{
354 struct uctrl_driver *p; 354 struct uctrl_driver *p;
@@ -404,7 +404,7 @@ out_free:
404 goto out; 404 goto out;
405} 405}
406 406
407static int __devexit uctrl_remove(struct of_device *op) 407static int __devexit uctrl_remove(struct platform_device *op)
408{ 408{
409 struct uctrl_driver *p = dev_get_drvdata(&op->dev); 409 struct uctrl_driver *p = dev_get_drvdata(&op->dev);
410 410
diff --git a/drivers/scsi/qlogicpti.c b/drivers/scsi/qlogicpti.c
index 53d7ed0dc169..f8c561cf751e 100644
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -704,7 +704,7 @@ static void __devexit qpti_chain_del(struct qlogicpti *qpti)
704 704
705static int __devinit qpti_map_regs(struct qlogicpti *qpti) 705static 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 qpti->qregs = of_ioremap(&op->resource[0], 0, 709 qpti->qregs = of_ioremap(&op->resource[0], 0,
710 resource_size(&op->resource[0]), 710 resource_size(&op->resource[0]),
@@ -727,7 +727,7 @@ static int __devinit qpti_map_regs(struct qlogicpti *qpti)
727 727
728static int __devinit qpti_register_irq(struct qlogicpti *qpti) 728static 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 qpti->qhost->irq = qpti->irq = op->archdata.irqs[0]; 732 qpti->qhost->irq = qpti->irq = op->archdata.irqs[0];
733 733
@@ -752,7 +752,7 @@ fail:
752 752
753static void __devinit qpti_get_scsi_id(struct qlogicpti *qpti) 753static 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 struct device_node *dp; 756 struct device_node *dp;
757 757
758 dp = op->dev.of_node; 758 dp = op->dev.of_node;
@@ -773,7 +773,7 @@ static void __devinit qpti_get_scsi_id(struct qlogicpti *qpti)
773 773
774static void qpti_get_bursts(struct qlogicpti *qpti) 774static void qpti_get_bursts(struct qlogicpti *qpti)
775{ 775{
776 struct of_device *op = qpti->op; 776 struct platform_device *op = qpti->op;
777 u8 bursts, bmask; 777 u8 bursts, bmask;
778 778
779 bursts = of_getintprop_default(op->dev.of_node, "burst-sizes", 0xff); 779 bursts = of_getintprop_default(op->dev.of_node, "burst-sizes", 0xff);
@@ -806,7 +806,7 @@ static void qpti_get_clock(struct qlogicpti *qpti)
806 */ 806 */
807static int __devinit qpti_map_queues(struct qlogicpti *qpti) 807static 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#define QSIZE(entries) (((entries) + 1) * QUEUE_ENTRY_LEN) 811#define QSIZE(entries) (((entries) + 1) * QUEUE_ENTRY_LEN)
812 qpti->res_cpu = dma_alloc_coherent(&op->dev, 812 qpti->res_cpu = dma_alloc_coherent(&op->dev,
@@ -1290,7 +1290,7 @@ static struct scsi_host_template qpti_template = {
1290 .use_clustering = ENABLE_CLUSTERING, 1290 .use_clustering = ENABLE_CLUSTERING,
1291}; 1291};
1292 1292
1293static int __devinit qpti_sbus_probe(struct of_device *op, const struct of_device_id *match) 1293static int __devinit qpti_sbus_probe(struct platform_device *op, const struct of_device_id *match)
1294{ 1294{
1295 struct scsi_host_template *tpnt = match->data; 1295 struct scsi_host_template *tpnt = match->data;
1296 struct device_node *dp = op->dev.of_node; 1296 struct device_node *dp = op->dev.of_node;
@@ -1401,7 +1401,7 @@ fail_unlink:
1401 return -ENODEV; 1401 return -ENODEV;
1402} 1402}
1403 1403
1404static int __devexit qpti_sbus_remove(struct of_device *op) 1404static int __devexit qpti_sbus_remove(struct platform_device *op)
1405{ 1405{
1406 struct qlogicpti *qpti = dev_get_drvdata(&op->dev); 1406 struct qlogicpti *qpti = dev_get_drvdata(&op->dev);
1407 1407
diff --git a/drivers/scsi/qlogicpti.h b/drivers/scsi/qlogicpti.h
index e3c74d1ee2db..4377e87ee79c 100644
--- a/drivers/scsi/qlogicpti.h
+++ b/drivers/scsi/qlogicpti.h
@@ -342,7 +342,7 @@ struct qlogicpti {
342 u_int req_in_ptr; /* index of next request slot */ 342 u_int req_in_ptr; /* index of next request slot */
343 u_int res_out_ptr; /* index of next result slot */ 343 u_int res_out_ptr; /* index of next result slot */
344 long send_marker; /* must we send a marker? */ 344 long send_marker; /* must we send a marker? */
345 struct of_device *op; 345 struct platform_device *op;
346 unsigned long __pad; 346 unsigned long __pad;
347 347
348 int cmd_count[MAX_TARGETS]; 348 int cmd_count[MAX_TARGETS];
diff --git a/drivers/scsi/sun_esp.c b/drivers/scsi/sun_esp.c
index 89ba6fe02f80..193b37ba1834 100644
--- a/drivers/scsi/sun_esp.c
+++ b/drivers/scsi/sun_esp.c
@@ -44,7 +44,7 @@ enum dvma_rev {
44}; 44};
45 45
46static int __devinit esp_sbus_setup_dma(struct esp *esp, 46static int __devinit esp_sbus_setup_dma(struct esp *esp,
47 struct of_device *dma_of) 47 struct platform_device *dma_of)
48{ 48{
49 esp->dma = dma_of; 49 esp->dma = dma_of;
50 50
@@ -81,7 +81,7 @@ static int __devinit esp_sbus_setup_dma(struct esp *esp,
81 81
82static int __devinit esp_sbus_map_regs(struct esp *esp, int hme) 82static 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 struct resource *res; 85 struct resource *res;
86 86
87 /* On HME, two reg sets exist, first is DVMA, 87 /* On HME, two reg sets exist, first is DVMA,
@@ -101,7 +101,7 @@ static int __devinit esp_sbus_map_regs(struct esp *esp, int hme)
101 101
102static int __devinit esp_sbus_map_command_block(struct esp *esp) 102static 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 esp->command_block = dma_alloc_coherent(&op->dev, 16, 106 esp->command_block = dma_alloc_coherent(&op->dev, 16,
107 &esp->command_block_dma, 107 &esp->command_block_dma,
@@ -114,15 +114,15 @@ static int __devinit esp_sbus_map_command_block(struct esp *esp)
114static int __devinit esp_sbus_register_irq(struct esp *esp) 114static int __devinit esp_sbus_register_irq(struct esp *esp)
115{ 115{
116 struct Scsi_Host *host = esp->host; 116 struct Scsi_Host *host = esp->host;
117 struct of_device *op = esp->dev; 117 struct platform_device *op = esp->dev;
118 118
119 host->irq = op->archdata.irqs[0]; 119 host->irq = op->archdata.irqs[0];
120 return request_irq(host->irq, scsi_esp_intr, IRQF_SHARED, "ESP", esp); 120 return request_irq(host->irq, scsi_esp_intr, IRQF_SHARED, "ESP", esp);
121} 121}
122 122
123static void __devinit esp_get_scsi_id(struct esp *esp, struct of_device *espdma) 123static 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 struct device_node *dp; 126 struct device_node *dp;
127 127
128 dp = op->dev.of_node; 128 dp = op->dev.of_node;
@@ -144,7 +144,7 @@ done:
144 144
145static void __devinit esp_get_differential(struct esp *esp) 145static 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 struct device_node *dp; 148 struct device_node *dp;
149 149
150 dp = op->dev.of_node; 150 dp = op->dev.of_node;
@@ -156,7 +156,7 @@ static void __devinit esp_get_differential(struct esp *esp)
156 156
157static void __devinit esp_get_clock_params(struct esp *esp) 157static 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 struct device_node *bus_dp, *dp; 160 struct device_node *bus_dp, *dp;
161 int fmhz; 161 int fmhz;
162 162
@@ -170,10 +170,10 @@ static void __devinit esp_get_clock_params(struct esp *esp)
170 esp->cfreq = fmhz; 170 esp->cfreq = fmhz;
171} 171}
172 172
173static void __devinit esp_get_bursts(struct esp *esp, struct of_device *dma_of) 173static void __devinit esp_get_bursts(struct esp *esp, struct platform_device *dma_of)
174{ 174{
175 struct device_node *dma_dp = dma_of->dev.of_node; 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 struct device_node *dp; 177 struct device_node *dp;
178 u8 bursts, val; 178 u8 bursts, val;
179 179
@@ -195,7 +195,7 @@ static void __devinit esp_get_bursts(struct esp *esp, struct of_device *dma_of)
195 esp->bursts = bursts; 195 esp->bursts = bursts;
196} 196}
197 197
198static void __devinit esp_sbus_get_props(struct esp *esp, struct of_device *espdma) 198static void __devinit esp_sbus_get_props(struct esp *esp, struct platform_device *espdma)
199{ 199{
200 esp_get_scsi_id(esp, espdma); 200 esp_get_scsi_id(esp, espdma);
201 esp_get_differential(esp); 201 esp_get_differential(esp);
@@ -216,7 +216,7 @@ static u8 sbus_esp_read8(struct esp *esp, unsigned long reg)
216static dma_addr_t sbus_esp_map_single(struct esp *esp, void *buf, 216static dma_addr_t sbus_esp_map_single(struct esp *esp, void *buf,
217 size_t sz, int dir) 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 return dma_map_single(&op->dev, buf, sz, dir); 221 return dma_map_single(&op->dev, buf, sz, dir);
222} 222}
@@ -224,7 +224,7 @@ static dma_addr_t sbus_esp_map_single(struct esp *esp, void *buf,
224static int sbus_esp_map_sg(struct esp *esp, struct scatterlist *sg, 224static int sbus_esp_map_sg(struct esp *esp, struct scatterlist *sg,
225 int num_sg, int dir) 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 return dma_map_sg(&op->dev, sg, num_sg, dir); 229 return dma_map_sg(&op->dev, sg, num_sg, dir);
230} 230}
@@ -232,7 +232,7 @@ static int sbus_esp_map_sg(struct esp *esp, struct scatterlist *sg,
232static void sbus_esp_unmap_single(struct esp *esp, dma_addr_t addr, 232static void sbus_esp_unmap_single(struct esp *esp, dma_addr_t addr,
233 size_t sz, int dir) 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 dma_unmap_single(&op->dev, addr, sz, dir); 237 dma_unmap_single(&op->dev, addr, sz, dir);
238} 238}
@@ -240,7 +240,7 @@ static void sbus_esp_unmap_single(struct esp *esp, dma_addr_t addr,
240static void sbus_esp_unmap_sg(struct esp *esp, struct scatterlist *sg, 240static void sbus_esp_unmap_sg(struct esp *esp, struct scatterlist *sg,
241 int num_sg, int dir) 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 dma_unmap_sg(&op->dev, sg, num_sg, dir); 245 dma_unmap_sg(&op->dev, sg, num_sg, dir);
246} 246}
@@ -256,7 +256,7 @@ static void sbus_esp_reset_dma(struct esp *esp)
256{ 256{
257 int can_do_burst16, can_do_burst32, can_do_burst64; 257 int can_do_burst16, can_do_burst32, can_do_burst64;
258 int can_do_sbus64, lim; 258 int can_do_sbus64, lim;
259 struct of_device *op; 259 struct platform_device *op;
260 u32 val; 260 u32 val;
261 261
262 can_do_burst16 = (esp->bursts & DMA_BURST16) != 0; 262 can_do_burst16 = (esp->bursts & DMA_BURST16) != 0;
@@ -487,8 +487,8 @@ static const struct esp_driver_ops sbus_esp_ops = {
487 .dma_error = sbus_esp_dma_error, 487 .dma_error = sbus_esp_dma_error,
488}; 488};
489 489
490static int __devinit esp_sbus_probe_one(struct of_device *op, 490static int __devinit esp_sbus_probe_one(struct platform_device *op,
491 struct of_device *espdma, 491 struct platform_device *espdma,
492 int hme) 492 int hme)
493{ 493{
494 struct scsi_host_template *tpnt = &scsi_esp_template; 494 struct scsi_host_template *tpnt = &scsi_esp_template;
@@ -562,11 +562,11 @@ fail:
562 return err; 562 return err;
563} 563}
564 564
565static int __devinit esp_sbus_probe(struct of_device *op, const struct of_device_id *match) 565static int __devinit esp_sbus_probe(struct platform_device *op, const struct of_device_id *match)
566{ 566{
567 struct device_node *dma_node = NULL; 567 struct device_node *dma_node = NULL;
568 struct device_node *dp = op->dev.of_node; 568 struct device_node *dp = op->dev.of_node;
569 struct of_device *dma_of = NULL; 569 struct platform_device *dma_of = NULL;
570 int hme = 0; 570 int hme = 0;
571 571
572 if (dp->parent && 572 if (dp->parent &&
@@ -585,10 +585,10 @@ static int __devinit esp_sbus_probe(struct of_device *op, const struct of_device
585 return esp_sbus_probe_one(op, dma_of, hme); 585 return esp_sbus_probe_one(op, dma_of, hme);
586} 586}
587 587
588static int __devexit esp_sbus_remove(struct of_device *op) 588static int __devexit esp_sbus_remove(struct platform_device *op)
589{ 589{
590 struct esp *esp = dev_get_drvdata(&op->dev); 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 unsigned int irq = esp->host->irq; 592 unsigned int irq = esp->host->irq;
593 bool is_hme; 593 bool is_hme;
594 u32 val; 594 u32 val;
diff --git a/drivers/serial/apbuart.c b/drivers/serial/apbuart.c
index 0099b8692b60..cc01c650a144 100644
--- a/drivers/serial/apbuart.c
+++ b/drivers/serial/apbuart.c
@@ -551,7 +551,7 @@ static struct uart_driver grlib_apbuart_driver = {
551/* OF Platform Driver */ 551/* OF Platform Driver */
552/* ======================================================================== */ 552/* ======================================================================== */
553 553
554static int __devinit apbuart_probe(struct of_device *op, 554static int __devinit apbuart_probe(struct platform_device *op,
555 const struct of_device_id *match) 555 const struct of_device_id *match)
556{ 556{
557 int i = -1; 557 int i = -1;
diff --git a/drivers/serial/cpm_uart/cpm_uart_core.c b/drivers/serial/cpm_uart/cpm_uart_core.c
index 6016179db533..f2b8adcc6c92 100644
--- a/drivers/serial/cpm_uart/cpm_uart_core.c
+++ b/drivers/serial/cpm_uart/cpm_uart_core.c
@@ -1340,7 +1340,7 @@ static struct uart_driver cpm_reg = {
1340 1340
1341static int probe_index; 1341static int probe_index;
1342 1342
1343static int __devinit cpm_uart_probe(struct of_device *ofdev, 1343static int __devinit cpm_uart_probe(struct platform_device *ofdev,
1344 const struct of_device_id *match) 1344 const struct of_device_id *match)
1345{ 1345{
1346 int index = probe_index++; 1346 int index = probe_index++;
@@ -1364,7 +1364,7 @@ static int __devinit cpm_uart_probe(struct of_device *ofdev,
1364 return uart_add_one_port(&cpm_reg, &pinfo->port); 1364 return uart_add_one_port(&cpm_reg, &pinfo->port);
1365} 1365}
1366 1366
1367static int __devexit cpm_uart_remove(struct of_device *ofdev) 1367static int __devexit cpm_uart_remove(struct platform_device *ofdev)
1368{ 1368{
1369 struct uart_cpm_port *pinfo = dev_get_drvdata(&ofdev->dev); 1369 struct uart_cpm_port *pinfo = dev_get_drvdata(&ofdev->dev);
1370 return uart_remove_one_port(&cpm_reg, &pinfo->port); 1370 return uart_remove_one_port(&cpm_reg, &pinfo->port);
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index 1a88b363005c..8dedb266f143 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -1298,7 +1298,7 @@ static struct of_device_id mpc52xx_uart_of_match[] = {
1298}; 1298};
1299 1299
1300static int __devinit 1300static int __devinit
1301mpc52xx_uart_of_probe(struct of_device *op, const struct of_device_id *match) 1301mpc52xx_uart_of_probe(struct platform_device *op, const struct of_device_id *match)
1302{ 1302{
1303 int idx = -1; 1303 int idx = -1;
1304 unsigned int uartclk; 1304 unsigned int uartclk;
@@ -1369,7 +1369,7 @@ mpc52xx_uart_of_probe(struct of_device *op, const struct of_device_id *match)
1369} 1369}
1370 1370
1371static int 1371static int
1372mpc52xx_uart_of_remove(struct of_device *op) 1372mpc52xx_uart_of_remove(struct platform_device *op)
1373{ 1373{
1374 struct uart_port *port = dev_get_drvdata(&op->dev); 1374 struct uart_port *port = dev_get_drvdata(&op->dev);
1375 dev_set_drvdata(&op->dev, NULL); 1375 dev_set_drvdata(&op->dev, NULL);
@@ -1382,7 +1382,7 @@ mpc52xx_uart_of_remove(struct of_device *op)
1382 1382
1383#ifdef CONFIG_PM 1383#ifdef CONFIG_PM
1384static int 1384static int
1385mpc52xx_uart_of_suspend(struct of_device *op, pm_message_t state) 1385mpc52xx_uart_of_suspend(struct platform_device *op, pm_message_t state)
1386{ 1386{
1387 struct uart_port *port = (struct uart_port *) dev_get_drvdata(&op->dev); 1387 struct uart_port *port = (struct uart_port *) dev_get_drvdata(&op->dev);
1388 1388
@@ -1393,7 +1393,7 @@ mpc52xx_uart_of_suspend(struct of_device *op, pm_message_t state)
1393} 1393}
1394 1394
1395static int 1395static int
1396mpc52xx_uart_of_resume(struct of_device *op) 1396mpc52xx_uart_of_resume(struct platform_device *op)
1397{ 1397{
1398 struct uart_port *port = (struct uart_port *) dev_get_drvdata(&op->dev); 1398 struct uart_port *port = (struct uart_port *) dev_get_drvdata(&op->dev);
1399 1399
diff --git a/drivers/serial/nwpserial.c b/drivers/serial/nwpserial.c
index e65b0d9202a5..de173671e3d0 100644
--- a/drivers/serial/nwpserial.c
+++ b/drivers/serial/nwpserial.c
@@ -344,7 +344,7 @@ int nwpserial_register_port(struct uart_port *port)
344 344
345 mutex_lock(&nwpserial_mutex); 345 mutex_lock(&nwpserial_mutex);
346 346
347 dn = to_of_device(port->dev)->dev.of_node; 347 dn = port->dev->of_node;
348 if (dn == NULL) 348 if (dn == NULL)
349 goto out; 349 goto out;
350 350
diff --git a/drivers/serial/of_serial.c b/drivers/serial/of_serial.c
index a48d9080f552..659a695bdad6 100644
--- a/drivers/serial/of_serial.c
+++ b/drivers/serial/of_serial.c
@@ -27,7 +27,7 @@ struct of_serial_info {
27/* 27/*
28 * Fill a struct uart_port for a given device node 28 * Fill a struct uart_port for a given device node
29 */ 29 */
30static int __devinit of_platform_serial_setup(struct of_device *ofdev, 30static int __devinit of_platform_serial_setup(struct platform_device *ofdev,
31 int type, struct uart_port *port) 31 int type, struct uart_port *port)
32{ 32{
33 struct resource resource; 33 struct resource resource;
@@ -80,7 +80,7 @@ static int __devinit of_platform_serial_setup(struct of_device *ofdev,
80/* 80/*
81 * Try to register a serial port 81 * Try to register a serial port
82 */ 82 */
83static int __devinit of_platform_serial_probe(struct of_device *ofdev, 83static int __devinit of_platform_serial_probe(struct platform_device *ofdev,
84 const struct of_device_id *id) 84 const struct of_device_id *id)
85{ 85{
86 struct of_serial_info *info; 86 struct of_serial_info *info;
@@ -134,7 +134,7 @@ out:
134/* 134/*
135 * Release a line 135 * Release a line
136 */ 136 */
137static int of_platform_serial_remove(struct of_device *ofdev) 137static int of_platform_serial_remove(struct platform_device *ofdev)
138{ 138{
139 struct of_serial_info *info = dev_get_drvdata(&ofdev->dev); 139 struct of_serial_info *info = dev_get_drvdata(&ofdev->dev);
140 switch (info->type) { 140 switch (info->type) {
diff --git a/drivers/serial/sunhv.c b/drivers/serial/sunhv.c
index a779e22d213e..c9014868297d 100644
--- a/drivers/serial/sunhv.c
+++ b/drivers/serial/sunhv.c
@@ -519,7 +519,7 @@ static struct console sunhv_console = {
519 .data = &sunhv_reg, 519 .data = &sunhv_reg,
520}; 520};
521 521
522static int __devinit hv_probe(struct of_device *op, const struct of_device_id *match) 522static int __devinit hv_probe(struct platform_device *op, const struct of_device_id *match)
523{ 523{
524 struct uart_port *port; 524 struct uart_port *port;
525 unsigned long minor; 525 unsigned long minor;
@@ -598,7 +598,7 @@ out_free_port:
598 return err; 598 return err;
599} 599}
600 600
601static int __devexit hv_remove(struct of_device *dev) 601static int __devexit hv_remove(struct platform_device *dev)
602{ 602{
603 struct uart_port *port = dev_get_drvdata(&dev->dev); 603 struct uart_port *port = dev_get_drvdata(&dev->dev);
604 604
diff --git a/drivers/serial/sunsab.c b/drivers/serial/sunsab.c
index 9845fb1cfb1f..5b246b18f42f 100644
--- a/drivers/serial/sunsab.c
+++ b/drivers/serial/sunsab.c
@@ -883,7 +883,7 @@ static int sunsab_console_setup(struct console *con, char *options)
883 printk("Console: ttyS%d (SAB82532)\n", 883 printk("Console: ttyS%d (SAB82532)\n",
884 (sunsab_reg.minor - 64) + con->index); 884 (sunsab_reg.minor - 64) + con->index);
885 885
886 sunserial_console_termios(con, to_of_device(up->port.dev)->dev.of_node); 886 sunserial_console_termios(con, up->port.dev->of_node);
887 887
888 switch (con->cflag & CBAUD) { 888 switch (con->cflag & CBAUD) {
889 case B150: baud = 150; break; 889 case B150: baud = 150; break;
@@ -954,7 +954,7 @@ static inline struct console *SUNSAB_CONSOLE(void)
954#endif 954#endif
955 955
956static int __devinit sunsab_init_one(struct uart_sunsab_port *up, 956static int __devinit sunsab_init_one(struct uart_sunsab_port *up,
957 struct of_device *op, 957 struct platform_device *op,
958 unsigned long offset, 958 unsigned long offset,
959 int line) 959 int line)
960{ 960{
@@ -1006,7 +1006,7 @@ static int __devinit sunsab_init_one(struct uart_sunsab_port *up,
1006 return 0; 1006 return 0;
1007} 1007}
1008 1008
1009static int __devinit sab_probe(struct of_device *op, const struct of_device_id *match) 1009static int __devinit sab_probe(struct platform_device *op, const struct of_device_id *match)
1010{ 1010{
1011 static int inst; 1011 static int inst;
1012 struct uart_sunsab_port *up; 1012 struct uart_sunsab_port *up;
@@ -1062,7 +1062,7 @@ out:
1062 return err; 1062 return err;
1063} 1063}
1064 1064
1065static int __devexit sab_remove(struct of_device *op) 1065static int __devexit sab_remove(struct platform_device *op)
1066{ 1066{
1067 struct uart_sunsab_port *up = dev_get_drvdata(&op->dev); 1067 struct uart_sunsab_port *up = dev_get_drvdata(&op->dev);
1068 1068
diff --git a/drivers/serial/sunsu.c b/drivers/serial/sunsu.c
index 3cdf74822db5..551ebfe3ccbb 100644
--- a/drivers/serial/sunsu.c
+++ b/drivers/serial/sunsu.c
@@ -1200,7 +1200,7 @@ static int __devinit sunsu_kbd_ms_init(struct uart_sunsu_port *up)
1200 return -ENODEV; 1200 return -ENODEV;
1201 1201
1202 printk("%s: %s port at %llx, irq %u\n", 1202 printk("%s: %s port at %llx, irq %u\n",
1203 to_of_device(up->port.dev)->dev.of_node->full_name, 1203 up->port.dev->of_node->full_name,
1204 (up->su_type == SU_PORT_KBD) ? "Keyboard" : "Mouse", 1204 (up->su_type == SU_PORT_KBD) ? "Keyboard" : "Mouse",
1205 (unsigned long long) up->port.mapbase, 1205 (unsigned long long) up->port.mapbase,
1206 up->port.irq); 1206 up->port.irq);
@@ -1352,7 +1352,7 @@ static int __init sunsu_console_setup(struct console *co, char *options)
1352 spin_lock_init(&port->lock); 1352 spin_lock_init(&port->lock);
1353 1353
1354 /* Get firmware console settings. */ 1354 /* Get firmware console settings. */
1355 sunserial_console_termios(co, to_of_device(port->dev)->dev.of_node); 1355 sunserial_console_termios(co, port->dev->of_node);
1356 1356
1357 memset(&termios, 0, sizeof(struct ktermios)); 1357 memset(&termios, 0, sizeof(struct ktermios));
1358 termios.c_cflag = co->cflag; 1358 termios.c_cflag = co->cflag;
@@ -1406,7 +1406,7 @@ static enum su_type __devinit su_get_type(struct device_node *dp)
1406 return SU_PORT_PORT; 1406 return SU_PORT_PORT;
1407} 1407}
1408 1408
1409static int __devinit su_probe(struct of_device *op, const struct of_device_id *match) 1409static int __devinit su_probe(struct platform_device *op, const struct of_device_id *match)
1410{ 1410{
1411 static int inst; 1411 static int inst;
1412 struct device_node *dp = op->dev.of_node; 1412 struct device_node *dp = op->dev.of_node;
@@ -1497,7 +1497,7 @@ out_unmap:
1497 return err; 1497 return err;
1498} 1498}
1499 1499
1500static int __devexit su_remove(struct of_device *op) 1500static int __devexit su_remove(struct platform_device *op)
1501{ 1501{
1502 struct uart_sunsu_port *up = dev_get_drvdata(&op->dev); 1502 struct uart_sunsu_port *up = dev_get_drvdata(&op->dev);
1503 bool kbdms = false; 1503 bool kbdms = false;
diff --git a/drivers/serial/sunzilog.c b/drivers/serial/sunzilog.c
index d1e6bcb59546..c1967ac1c07f 100644
--- a/drivers/serial/sunzilog.c
+++ b/drivers/serial/sunzilog.c
@@ -1230,7 +1230,7 @@ static int __init sunzilog_console_setup(struct console *con, char *options)
1230 (sunzilog_reg.minor - 64) + con->index, con->index); 1230 (sunzilog_reg.minor - 64) + con->index, con->index);
1231 1231
1232 /* Get firmware console settings. */ 1232 /* Get firmware console settings. */
1233 sunserial_console_termios(con, to_of_device(up->port.dev)->dev.of_node); 1233 sunserial_console_termios(con, up->port.dev->of_node);
1234 1234
1235 /* Firmware console speed is limited to 150-->38400 baud so 1235 /* Firmware console speed is limited to 150-->38400 baud so
1236 * this hackish cflag thing is OK. 1236 * this hackish cflag thing is OK.
@@ -1399,7 +1399,7 @@ static void __devinit sunzilog_init_hw(struct uart_sunzilog_port *up)
1399 1399
1400static int zilog_irq = -1; 1400static int zilog_irq = -1;
1401 1401
1402static int __devinit zs_probe(struct of_device *op, const struct of_device_id *match) 1402static int __devinit zs_probe(struct platform_device *op, const struct of_device_id *match)
1403{ 1403{
1404 static int kbm_inst, uart_inst; 1404 static int kbm_inst, uart_inst;
1405 int inst; 1405 int inst;
@@ -1516,7 +1516,7 @@ static void __devexit zs_remove_one(struct uart_sunzilog_port *up)
1516 uart_remove_one_port(&sunzilog_reg, &up->port); 1516 uart_remove_one_port(&sunzilog_reg, &up->port);
1517} 1517}
1518 1518
1519static int __devexit zs_remove(struct of_device *op) 1519static int __devexit zs_remove(struct platform_device *op)
1520{ 1520{
1521 struct uart_sunzilog_port *up = dev_get_drvdata(&op->dev); 1521 struct uart_sunzilog_port *up = dev_get_drvdata(&op->dev);
1522 struct zilog_layout __iomem *regs; 1522 struct zilog_layout __iomem *regs;
diff --git a/drivers/serial/uartlite.c b/drivers/serial/uartlite.c
index caf085d3a76a..9b03d7b3e456 100644
--- a/drivers/serial/uartlite.c
+++ b/drivers/serial/uartlite.c
@@ -584,7 +584,7 @@ static struct platform_driver ulite_platform_driver = {
584 */ 584 */
585#if defined(CONFIG_OF) && (defined(CONFIG_PPC32) || defined(CONFIG_MICROBLAZE)) 585#if defined(CONFIG_OF) && (defined(CONFIG_PPC32) || defined(CONFIG_MICROBLAZE))
586static int __devinit 586static int __devinit
587ulite_of_probe(struct of_device *op, const struct of_device_id *match) 587ulite_of_probe(struct platform_device *op, const struct of_device_id *match)
588{ 588{
589 struct resource res; 589 struct resource res;
590 const unsigned int *id; 590 const unsigned int *id;
@@ -605,7 +605,7 @@ ulite_of_probe(struct of_device *op, const struct of_device_id *match)
605 return ulite_assign(&op->dev, id ? *id : -1, res.start, irq); 605 return ulite_assign(&op->dev, id ? *id : -1, res.start, irq);
606} 606}
607 607
608static int __devexit ulite_of_remove(struct of_device *op) 608static int __devexit ulite_of_remove(struct platform_device *op)
609{ 609{
610 return ulite_release(&op->dev); 610 return ulite_release(&op->dev);
611} 611}
diff --git a/drivers/serial/ucc_uart.c b/drivers/serial/ucc_uart.c
index 907b06f5c447..3f4848e2174a 100644
--- a/drivers/serial/ucc_uart.c
+++ b/drivers/serial/ucc_uart.c
@@ -1194,7 +1194,7 @@ static void uart_firmware_cont(const struct firmware *fw, void *context)
1194 release_firmware(fw); 1194 release_firmware(fw);
1195} 1195}
1196 1196
1197static int ucc_uart_probe(struct of_device *ofdev, 1197static int ucc_uart_probe(struct platform_device *ofdev,
1198 const struct of_device_id *match) 1198 const struct of_device_id *match)
1199{ 1199{
1200 struct device_node *np = ofdev->dev.of_node; 1200 struct device_node *np = ofdev->dev.of_node;
@@ -1462,7 +1462,7 @@ static int ucc_uart_probe(struct of_device *ofdev,
1462 return 0; 1462 return 0;
1463} 1463}
1464 1464
1465static int ucc_uart_remove(struct of_device *ofdev) 1465static int ucc_uart_remove(struct platform_device *ofdev)
1466{ 1466{
1467 struct uart_qe_port *qe_port = dev_get_drvdata(&ofdev->dev); 1467 struct uart_qe_port *qe_port = dev_get_drvdata(&ofdev->dev);
1468 1468
diff --git a/drivers/spi/mpc512x_psc_spi.c b/drivers/spi/mpc512x_psc_spi.c
index 10baac3f8ea5..cddbfceb324f 100644
--- a/drivers/spi/mpc512x_psc_spi.c
+++ b/drivers/spi/mpc512x_psc_spi.c
@@ -507,7 +507,7 @@ static int __exit mpc512x_psc_spi_do_remove(struct device *dev)
507 return 0; 507 return 0;
508} 508}
509 509
510static int __init mpc512x_psc_spi_of_probe(struct of_device *op, 510static int __init mpc512x_psc_spi_of_probe(struct platform_device *op,
511 const struct of_device_id *match) 511 const struct of_device_id *match)
512{ 512{
513 const u32 *regaddr_p; 513 const u32 *regaddr_p;
@@ -539,7 +539,7 @@ static int __init mpc512x_psc_spi_of_probe(struct of_device *op,
539 irq_of_parse_and_map(op->dev.of_node, 0), id); 539 irq_of_parse_and_map(op->dev.of_node, 0), id);
540} 540}
541 541
542static int __exit mpc512x_psc_spi_of_remove(struct of_device *op) 542static int __exit mpc512x_psc_spi_of_remove(struct platform_device *op)
543{ 543{
544 return mpc512x_psc_spi_do_remove(&op->dev); 544 return mpc512x_psc_spi_do_remove(&op->dev);
545} 545}
diff --git a/drivers/spi/mpc52xx_psc_spi.c b/drivers/spi/mpc52xx_psc_spi.c
index 66d170147dcc..983fbbfce76e 100644
--- a/drivers/spi/mpc52xx_psc_spi.c
+++ b/drivers/spi/mpc52xx_psc_spi.c
@@ -465,7 +465,7 @@ static int __exit mpc52xx_psc_spi_do_remove(struct device *dev)
465 return 0; 465 return 0;
466} 466}
467 467
468static int __init mpc52xx_psc_spi_of_probe(struct of_device *op, 468static int __init mpc52xx_psc_spi_of_probe(struct platform_device *op,
469 const struct of_device_id *match) 469 const struct of_device_id *match)
470{ 470{
471 const u32 *regaddr_p; 471 const u32 *regaddr_p;
@@ -495,7 +495,7 @@ static int __init mpc52xx_psc_spi_of_probe(struct of_device *op,
495 irq_of_parse_and_map(op->dev.of_node, 0), id); 495 irq_of_parse_and_map(op->dev.of_node, 0), id);
496} 496}
497 497
498static int __exit mpc52xx_psc_spi_of_remove(struct of_device *op) 498static int __exit mpc52xx_psc_spi_of_remove(struct platform_device *op)
499{ 499{
500 return mpc52xx_psc_spi_do_remove(&op->dev); 500 return mpc52xx_psc_spi_do_remove(&op->dev);
501} 501}
diff --git a/drivers/spi/mpc52xx_spi.c b/drivers/spi/mpc52xx_spi.c
index 56136ff00e01..ec9f0b1bf864 100644
--- a/drivers/spi/mpc52xx_spi.c
+++ b/drivers/spi/mpc52xx_spi.c
@@ -390,7 +390,7 @@ static int mpc52xx_spi_transfer(struct spi_device *spi, struct spi_message *m)
390/* 390/*
391 * OF Platform Bus Binding 391 * OF Platform Bus Binding
392 */ 392 */
393static int __devinit mpc52xx_spi_probe(struct of_device *op, 393static int __devinit mpc52xx_spi_probe(struct platform_device *op,
394 const struct of_device_id *match) 394 const struct of_device_id *match)
395{ 395{
396 struct spi_master *master; 396 struct spi_master *master;
@@ -530,7 +530,7 @@ static int __devinit mpc52xx_spi_probe(struct of_device *op,
530 return rc; 530 return rc;
531} 531}
532 532
533static int __devexit mpc52xx_spi_remove(struct of_device *op) 533static int __devexit mpc52xx_spi_remove(struct platform_device *op)
534{ 534{
535 struct spi_master *master = dev_get_drvdata(&op->dev); 535 struct spi_master *master = dev_get_drvdata(&op->dev);
536 struct mpc52xx_spi *ms = spi_master_get_devdata(master); 536 struct mpc52xx_spi *ms = spi_master_get_devdata(master);
diff --git a/drivers/spi/spi_mpc8xxx.c b/drivers/spi/spi_mpc8xxx.c
index aad9ae1b9c69..d31b57f7baaf 100644
--- a/drivers/spi/spi_mpc8xxx.c
+++ b/drivers/spi/spi_mpc8xxx.c
@@ -1236,7 +1236,7 @@ static int of_mpc8xxx_spi_free_chipselects(struct device *dev)
1236 return 0; 1236 return 0;
1237} 1237}
1238 1238
1239static int __devinit of_mpc8xxx_spi_probe(struct of_device *ofdev, 1239static int __devinit of_mpc8xxx_spi_probe(struct platform_device *ofdev,
1240 const struct of_device_id *ofid) 1240 const struct of_device_id *ofid)
1241{ 1241{
1242 struct device *dev = &ofdev->dev; 1242 struct device *dev = &ofdev->dev;
@@ -1308,7 +1308,7 @@ err_clk:
1308 return ret; 1308 return ret;
1309} 1309}
1310 1310
1311static int __devexit of_mpc8xxx_spi_remove(struct of_device *ofdev) 1311static int __devexit of_mpc8xxx_spi_remove(struct platform_device *ofdev)
1312{ 1312{
1313 int ret; 1313 int ret;
1314 1314
diff --git a/drivers/spi/spi_ppc4xx.c b/drivers/spi/spi_ppc4xx.c
index 0f5fa7e2a550..80e172d3e72a 100644
--- a/drivers/spi/spi_ppc4xx.c
+++ b/drivers/spi/spi_ppc4xx.c
@@ -388,9 +388,9 @@ static void free_gpios(struct ppc4xx_spi *hw)
388} 388}
389 389
390/* 390/*
391 * of_device layer stuff... 391 * platform_device layer stuff...
392 */ 392 */
393static int __init spi_ppc4xx_of_probe(struct of_device *op, 393static int __init spi_ppc4xx_of_probe(struct platform_device *op,
394 const struct of_device_id *match) 394 const struct of_device_id *match)
395{ 395{
396 struct ppc4xx_spi *hw; 396 struct ppc4xx_spi *hw;
@@ -565,7 +565,7 @@ free_master:
565 return ret; 565 return ret;
566} 566}
567 567
568static int __exit spi_ppc4xx_of_remove(struct of_device *op) 568static int __exit spi_ppc4xx_of_remove(struct platform_device *op)
569{ 569{
570 struct spi_master *master = dev_get_drvdata(&op->dev); 570 struct spi_master *master = dev_get_drvdata(&op->dev);
571 struct ppc4xx_spi *hw = spi_master_get_devdata(master); 571 struct ppc4xx_spi *hw = spi_master_get_devdata(master);
diff --git a/drivers/spi/xilinx_spi_of.c b/drivers/spi/xilinx_spi_of.c
index f53d3f6b9f61..b66c2dbf20a5 100644
--- a/drivers/spi/xilinx_spi_of.c
+++ b/drivers/spi/xilinx_spi_of.c
@@ -38,7 +38,7 @@
38#include "xilinx_spi.h" 38#include "xilinx_spi.h"
39 39
40 40
41static int __devinit xilinx_spi_of_probe(struct of_device *ofdev, 41static int __devinit xilinx_spi_of_probe(struct platform_device *ofdev,
42 const struct of_device_id *match) 42 const struct of_device_id *match)
43{ 43{
44 struct spi_master *master; 44 struct spi_master *master;
@@ -84,7 +84,7 @@ static int __devinit xilinx_spi_of_probe(struct of_device *ofdev,
84 return 0; 84 return 0;
85} 85}
86 86
87static int __devexit xilinx_spi_remove(struct of_device *ofdev) 87static int __devexit xilinx_spi_remove(struct platform_device *ofdev)
88{ 88{
89 xilinx_spi_deinit(dev_get_drvdata(&ofdev->dev)); 89 xilinx_spi_deinit(dev_get_drvdata(&ofdev->dev));
90 dev_set_drvdata(&ofdev->dev, 0); 90 dev_set_drvdata(&ofdev->dev, 0);
@@ -93,7 +93,7 @@ static int __devexit xilinx_spi_remove(struct of_device *ofdev)
93 return 0; 93 return 0;
94} 94}
95 95
96static int __exit xilinx_spi_of_remove(struct of_device *op) 96static int __exit xilinx_spi_of_remove(struct platform_device *op)
97{ 97{
98 return xilinx_spi_remove(op); 98 return xilinx_spi_remove(op);
99} 99}
diff --git a/drivers/usb/gadget/fsl_qe_udc.c b/drivers/usb/gadget/fsl_qe_udc.c
index 9648b75f0283..a5ea2c1d8c93 100644
--- a/drivers/usb/gadget/fsl_qe_udc.c
+++ b/drivers/usb/gadget/fsl_qe_udc.c
@@ -2398,7 +2398,7 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
2398EXPORT_SYMBOL(usb_gadget_unregister_driver); 2398EXPORT_SYMBOL(usb_gadget_unregister_driver);
2399 2399
2400/* udc structure's alloc and setup, include ep-param alloc */ 2400/* udc structure's alloc and setup, include ep-param alloc */
2401static struct qe_udc __devinit *qe_udc_config(struct of_device *ofdev) 2401static struct qe_udc __devinit *qe_udc_config(struct platform_device *ofdev)
2402{ 2402{
2403 struct qe_udc *udc; 2403 struct qe_udc *udc;
2404 struct device_node *np = ofdev->dev.of_node; 2404 struct device_node *np = ofdev->dev.of_node;
@@ -2523,7 +2523,7 @@ static void qe_udc_release(struct device *dev)
2523} 2523}
2524 2524
2525/* Driver probe functions */ 2525/* Driver probe functions */
2526static int __devinit qe_udc_probe(struct of_device *ofdev, 2526static int __devinit qe_udc_probe(struct platform_device *ofdev,
2527 const struct of_device_id *match) 2527 const struct of_device_id *match)
2528{ 2528{
2529 struct device_node *np = ofdev->dev.of_node; 2529 struct device_node *np = ofdev->dev.of_node;
@@ -2679,18 +2679,18 @@ err1:
2679} 2679}
2680 2680
2681#ifdef CONFIG_PM 2681#ifdef CONFIG_PM
2682static int qe_udc_suspend(struct of_device *dev, pm_message_t state) 2682static int qe_udc_suspend(struct platform_device *dev, pm_message_t state)
2683{ 2683{
2684 return -ENOTSUPP; 2684 return -ENOTSUPP;
2685} 2685}
2686 2686
2687static int qe_udc_resume(struct of_device *dev) 2687static int qe_udc_resume(struct platform_device *dev)
2688{ 2688{
2689 return -ENOTSUPP; 2689 return -ENOTSUPP;
2690} 2690}
2691#endif 2691#endif
2692 2692
2693static int __devexit qe_udc_remove(struct of_device *ofdev) 2693static int __devexit qe_udc_remove(struct platform_device *ofdev)
2694{ 2694{
2695 struct qe_ep *ep; 2695 struct qe_ep *ep;
2696 unsigned int size; 2696 unsigned int size;
diff --git a/drivers/usb/host/ehci-ppc-of.c b/drivers/usb/host/ehci-ppc-of.c
index 5aec92866ab3..335ee699fd85 100644
--- a/drivers/usb/host/ehci-ppc-of.c
+++ b/drivers/usb/host/ehci-ppc-of.c
@@ -106,7 +106,7 @@ ppc44x_enable_bmt(struct device_node *dn)
106 106
107 107
108static int __devinit 108static int __devinit
109ehci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match) 109ehci_hcd_ppc_of_probe(struct platform_device *op, const struct of_device_id *match)
110{ 110{
111 struct device_node *dn = op->dev.of_node; 111 struct device_node *dn = op->dev.of_node;
112 struct usb_hcd *hcd; 112 struct usb_hcd *hcd;
@@ -210,7 +210,7 @@ err_rmr:
210} 210}
211 211
212 212
213static int ehci_hcd_ppc_of_remove(struct of_device *op) 213static int ehci_hcd_ppc_of_remove(struct platform_device *op)
214{ 214{
215 struct usb_hcd *hcd = dev_get_drvdata(&op->dev); 215 struct usb_hcd *hcd = dev_get_drvdata(&op->dev);
216 struct ehci_hcd *ehci = hcd_to_ehci(hcd); 216 struct ehci_hcd *ehci = hcd_to_ehci(hcd);
@@ -253,7 +253,7 @@ static int ehci_hcd_ppc_of_remove(struct of_device *op)
253} 253}
254 254
255 255
256static int ehci_hcd_ppc_of_shutdown(struct of_device *op) 256static int ehci_hcd_ppc_of_shutdown(struct platform_device *op)
257{ 257{
258 struct usb_hcd *hcd = dev_get_drvdata(&op->dev); 258 struct usb_hcd *hcd = dev_get_drvdata(&op->dev);
259 259
diff --git a/drivers/usb/host/ehci-xilinx-of.c b/drivers/usb/host/ehci-xilinx-of.c
index 4899f451add9..6c8076ad821d 100644
--- a/drivers/usb/host/ehci-xilinx-of.c
+++ b/drivers/usb/host/ehci-xilinx-of.c
@@ -140,7 +140,7 @@ static const struct hc_driver ehci_xilinx_of_hc_driver = {
140 140
141/** 141/**
142 * ehci_hcd_xilinx_of_probe - Probe method for the USB host controller 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 * @match: pointer to of_device_id structure, not used 144 * @match: pointer to of_device_id structure, not used
145 * 145 *
146 * This function requests resources and sets up appropriate properties for the 146 * This function requests resources and sets up appropriate properties for the
@@ -149,7 +149,7 @@ static const struct hc_driver ehci_xilinx_of_hc_driver = {
149 * entry, and sets an appropriate value for hcd->has_tt. 149 * entry, and sets an appropriate value for hcd->has_tt.
150 */ 150 */
151static int __devinit 151static int __devinit
152ehci_hcd_xilinx_of_probe(struct of_device *op, const struct of_device_id *match) 152ehci_hcd_xilinx_of_probe(struct platform_device *op, const struct of_device_id *match)
153{ 153{
154 struct device_node *dn = op->dev.of_node; 154 struct device_node *dn = op->dev.of_node;
155 struct usb_hcd *hcd; 155 struct usb_hcd *hcd;
@@ -242,12 +242,12 @@ err_rmr:
242 242
243/** 243/**
244 * ehci_hcd_xilinx_of_remove - shutdown hcd and release resources 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 * Remove the hcd structure, and release resources that has been requested 247 * Remove the hcd structure, and release resources that has been requested
248 * during probe. 248 * during probe.
249 */ 249 */
250static int ehci_hcd_xilinx_of_remove(struct of_device *op) 250static int ehci_hcd_xilinx_of_remove(struct platform_device *op)
251{ 251{
252 struct usb_hcd *hcd = dev_get_drvdata(&op->dev); 252 struct usb_hcd *hcd = dev_get_drvdata(&op->dev);
253 dev_set_drvdata(&op->dev, NULL); 253 dev_set_drvdata(&op->dev, NULL);
@@ -266,11 +266,11 @@ static int ehci_hcd_xilinx_of_remove(struct of_device *op)
266 266
267/** 267/**
268 * ehci_hcd_xilinx_of_shutdown - shutdown the hcd 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 * Properly shutdown the hcd, call driver's shutdown routine. 271 * Properly shutdown the hcd, call driver's shutdown routine.
272 */ 272 */
273static int ehci_hcd_xilinx_of_shutdown(struct of_device *op) 273static int ehci_hcd_xilinx_of_shutdown(struct platform_device *op)
274{ 274{
275 struct usb_hcd *hcd = dev_get_drvdata(&op->dev); 275 struct usb_hcd *hcd = dev_get_drvdata(&op->dev);
276 276
diff --git a/drivers/usb/host/fhci-hcd.c b/drivers/usb/host/fhci-hcd.c
index c7c8392a88b9..20092a27a1e8 100644
--- a/drivers/usb/host/fhci-hcd.c
+++ b/drivers/usb/host/fhci-hcd.c
@@ -561,7 +561,7 @@ static const struct hc_driver fhci_driver = {
561 .hub_control = fhci_hub_control, 561 .hub_control = fhci_hub_control,
562}; 562};
563 563
564static int __devinit of_fhci_probe(struct of_device *ofdev, 564static int __devinit of_fhci_probe(struct platform_device *ofdev,
565 const struct of_device_id *ofid) 565 const struct of_device_id *ofid)
566{ 566{
567 struct device *dev = &ofdev->dev; 567 struct device *dev = &ofdev->dev;
@@ -801,7 +801,7 @@ static int __devexit fhci_remove(struct device *dev)
801 return 0; 801 return 0;
802} 802}
803 803
804static int __devexit of_fhci_remove(struct of_device *ofdev) 804static int __devexit of_fhci_remove(struct platform_device *ofdev)
805{ 805{
806 return fhci_remove(&ofdev->dev); 806 return fhci_remove(&ofdev->dev);
807} 807}
diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c
index ec85d0c3cc3e..3b28dbfca058 100644
--- a/drivers/usb/host/isp1760-if.c
+++ b/drivers/usb/host/isp1760-if.c
@@ -27,7 +27,7 @@
27#endif 27#endif
28 28
29#ifdef CONFIG_PPC_OF 29#ifdef CONFIG_PPC_OF
30static int of_isp1760_probe(struct of_device *dev, 30static int of_isp1760_probe(struct platform_device *dev,
31 const struct of_device_id *match) 31 const struct of_device_id *match)
32{ 32{
33 struct usb_hcd *hcd; 33 struct usb_hcd *hcd;
@@ -95,7 +95,7 @@ release_reg:
95 return ret; 95 return ret;
96} 96}
97 97
98static int of_isp1760_remove(struct of_device *dev) 98static int of_isp1760_remove(struct platform_device *dev)
99{ 99{
100 struct usb_hcd *hcd = dev_get_drvdata(&dev->dev); 100 struct usb_hcd *hcd = dev_get_drvdata(&dev->dev);
101 101
diff --git a/drivers/usb/host/ohci-ppc-of.c b/drivers/usb/host/ohci-ppc-of.c
index df165917412a..b2c2dbf08766 100644
--- a/drivers/usb/host/ohci-ppc-of.c
+++ b/drivers/usb/host/ohci-ppc-of.c
@@ -81,7 +81,7 @@ static const struct hc_driver ohci_ppc_of_hc_driver = {
81 81
82 82
83static int __devinit 83static int __devinit
84ohci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match) 84ohci_hcd_ppc_of_probe(struct platform_device *op, const struct of_device_id *match)
85{ 85{
86 struct device_node *dn = op->dev.of_node; 86 struct device_node *dn = op->dev.of_node;
87 struct usb_hcd *hcd; 87 struct usb_hcd *hcd;
@@ -183,7 +183,7 @@ err_rmr:
183 return rv; 183 return rv;
184} 184}
185 185
186static int ohci_hcd_ppc_of_remove(struct of_device *op) 186static int ohci_hcd_ppc_of_remove(struct platform_device *op)
187{ 187{
188 struct usb_hcd *hcd = dev_get_drvdata(&op->dev); 188 struct usb_hcd *hcd = dev_get_drvdata(&op->dev);
189 dev_set_drvdata(&op->dev, NULL); 189 dev_set_drvdata(&op->dev, NULL);
@@ -201,7 +201,7 @@ static int ohci_hcd_ppc_of_remove(struct of_device *op)
201 return 0; 201 return 0;
202} 202}
203 203
204static int ohci_hcd_ppc_of_shutdown(struct of_device *op) 204static int ohci_hcd_ppc_of_shutdown(struct platform_device *op)
205{ 205{
206 struct usb_hcd *hcd = dev_get_drvdata(&op->dev); 206 struct usb_hcd *hcd = dev_get_drvdata(&op->dev);
207 207
diff --git a/drivers/video/bw2.c b/drivers/video/bw2.c
index c7796637bafd..4dc13467281d 100644
--- a/drivers/video/bw2.c
+++ b/drivers/video/bw2.c
@@ -273,7 +273,7 @@ static int __devinit bw2_do_default_mode(struct bw2_par *par,
273 return 0; 273 return 0;
274} 274}
275 275
276static int __devinit bw2_probe(struct of_device *op, const struct of_device_id *match) 276static int __devinit bw2_probe(struct platform_device *op, const struct of_device_id *match)
277{ 277{
278 struct device_node *dp = op->dev.of_node; 278 struct device_node *dp = op->dev.of_node;
279 struct fb_info *info; 279 struct fb_info *info;
@@ -350,7 +350,7 @@ out_err:
350 return err; 350 return err;
351} 351}
352 352
353static int __devexit bw2_remove(struct of_device *op) 353static int __devexit bw2_remove(struct platform_device *op)
354{ 354{
355 struct fb_info *info = dev_get_drvdata(&op->dev); 355 struct fb_info *info = dev_get_drvdata(&op->dev);
356 struct bw2_par *par = info->par; 356 struct bw2_par *par = info->par;
diff --git a/drivers/video/cg14.c b/drivers/video/cg14.c
index d09fde8beb69..24249535ac86 100644
--- a/drivers/video/cg14.c
+++ b/drivers/video/cg14.c
@@ -446,7 +446,7 @@ static struct sbus_mmap_map __cg14_mmap_map[CG14_MMAP_ENTRIES] __devinitdata = {
446 { .size = 0 } 446 { .size = 0 }
447}; 447};
448 448
449static void cg14_unmap_regs(struct of_device *op, struct fb_info *info, 449static void cg14_unmap_regs(struct platform_device *op, struct fb_info *info,
450 struct cg14_par *par) 450 struct cg14_par *par)
451{ 451{
452 if (par->regs) 452 if (par->regs)
@@ -463,7 +463,7 @@ static void cg14_unmap_regs(struct of_device *op, struct fb_info *info,
463 info->screen_base, info->fix.smem_len); 463 info->screen_base, info->fix.smem_len);
464} 464}
465 465
466static int __devinit cg14_probe(struct of_device *op, const struct of_device_id *match) 466static int __devinit cg14_probe(struct platform_device *op, const struct of_device_id *match)
467{ 467{
468 struct device_node *dp = op->dev.of_node; 468 struct device_node *dp = op->dev.of_node;
469 struct fb_info *info; 469 struct fb_info *info;
@@ -570,7 +570,7 @@ out_err:
570 return err; 570 return err;
571} 571}
572 572
573static int __devexit cg14_remove(struct of_device *op) 573static int __devexit cg14_remove(struct platform_device *op)
574{ 574{
575 struct fb_info *info = dev_get_drvdata(&op->dev); 575 struct fb_info *info = dev_get_drvdata(&op->dev);
576 struct cg14_par *par = info->par; 576 struct cg14_par *par = info->par;
diff --git a/drivers/video/cg3.c b/drivers/video/cg3.c
index 64aa29809fb9..09c0c3c42482 100644
--- a/drivers/video/cg3.c
+++ b/drivers/video/cg3.c
@@ -346,7 +346,7 @@ static int __devinit cg3_do_default_mode(struct cg3_par *par)
346 return 0; 346 return 0;
347} 347}
348 348
349static int __devinit cg3_probe(struct of_device *op, 349static int __devinit cg3_probe(struct platform_device *op,
350 const struct of_device_id *match) 350 const struct of_device_id *match)
351{ 351{
352 struct device_node *dp = op->dev.of_node; 352 struct device_node *dp = op->dev.of_node;
@@ -433,7 +433,7 @@ out_err:
433 return err; 433 return err;
434} 434}
435 435
436static int __devexit cg3_remove(struct of_device *op) 436static int __devexit cg3_remove(struct platform_device *op)
437{ 437{
438 struct fb_info *info = dev_get_drvdata(&op->dev); 438 struct fb_info *info = dev_get_drvdata(&op->dev);
439 struct cg3_par *par = info->par; 439 struct cg3_par *par = info->par;
diff --git a/drivers/video/cg6.c b/drivers/video/cg6.c
index 2389a719dcc7..2b5a97058b08 100644
--- a/drivers/video/cg6.c
+++ b/drivers/video/cg6.c
@@ -718,7 +718,7 @@ static void __devinit cg6_chip_init(struct fb_info *info)
718 sbus_writel(info->var.yres - 1, &fbc->clipmaxy); 718 sbus_writel(info->var.yres - 1, &fbc->clipmaxy);
719} 719}
720 720
721static void cg6_unmap_regs(struct of_device *op, struct fb_info *info, 721static void cg6_unmap_regs(struct platform_device *op, struct fb_info *info,
722 struct cg6_par *par) 722 struct cg6_par *par)
723{ 723{
724 if (par->fbc) 724 if (par->fbc)
@@ -737,7 +737,7 @@ static void cg6_unmap_regs(struct of_device *op, struct fb_info *info,
737 info->fix.smem_len); 737 info->fix.smem_len);
738} 738}
739 739
740static int __devinit cg6_probe(struct of_device *op, 740static int __devinit cg6_probe(struct platform_device *op,
741 const struct of_device_id *match) 741 const struct of_device_id *match)
742{ 742{
743 struct device_node *dp = op->dev.of_node; 743 struct device_node *dp = op->dev.of_node;
@@ -827,7 +827,7 @@ out_err:
827 return err; 827 return err;
828} 828}
829 829
830static int __devexit cg6_remove(struct of_device *op) 830static int __devexit cg6_remove(struct platform_device *op)
831{ 831{
832 struct fb_info *info = dev_get_drvdata(&op->dev); 832 struct fb_info *info = dev_get_drvdata(&op->dev);
833 struct cg6_par *par = info->par; 833 struct cg6_par *par = info->par;
diff --git a/drivers/video/ffb.c b/drivers/video/ffb.c
index f6ecfab296d3..6739b2af3bc0 100644
--- a/drivers/video/ffb.c
+++ b/drivers/video/ffb.c
@@ -893,7 +893,7 @@ static void ffb_init_fix(struct fb_info *info)
893 info->fix.accel = FB_ACCEL_SUN_CREATOR; 893 info->fix.accel = FB_ACCEL_SUN_CREATOR;
894} 894}
895 895
896static int __devinit ffb_probe(struct of_device *op, 896static int __devinit ffb_probe(struct platform_device *op,
897 const struct of_device_id *match) 897 const struct of_device_id *match)
898{ 898{
899 struct device_node *dp = op->dev.of_node; 899 struct device_node *dp = op->dev.of_node;
@@ -1023,7 +1023,7 @@ out_err:
1023 return err; 1023 return err;
1024} 1024}
1025 1025
1026static int __devexit ffb_remove(struct of_device *op) 1026static int __devexit ffb_remove(struct platform_device *op)
1027{ 1027{
1028 struct fb_info *info = dev_get_drvdata(&op->dev); 1028 struct fb_info *info = dev_get_drvdata(&op->dev);
1029 struct ffb_par *par = info->par; 1029 struct ffb_par *par = info->par;
diff --git a/drivers/video/fsl-diu-fb.c b/drivers/video/fsl-diu-fb.c
index e38ad2224540..8bbbf08fa3ce 100644
--- a/drivers/video/fsl-diu-fb.c
+++ b/drivers/video/fsl-diu-fb.c
@@ -1393,7 +1393,7 @@ static void free_irq_local(int irq)
1393 * Power management hooks. Note that we won't be called from IRQ context, 1393 * Power management hooks. Note that we won't be called from IRQ context,
1394 * unlike the blank functions above, so we may sleep. 1394 * unlike the blank functions above, so we may sleep.
1395 */ 1395 */
1396static int fsl_diu_suspend(struct of_device *ofdev, pm_message_t state) 1396static int fsl_diu_suspend(struct platform_device *ofdev, pm_message_t state)
1397{ 1397{
1398 struct fsl_diu_data *machine_data; 1398 struct fsl_diu_data *machine_data;
1399 1399
@@ -1403,7 +1403,7 @@ static int fsl_diu_suspend(struct of_device *ofdev, pm_message_t state)
1403 return 0; 1403 return 0;
1404} 1404}
1405 1405
1406static int fsl_diu_resume(struct of_device *ofdev) 1406static int fsl_diu_resume(struct platform_device *ofdev)
1407{ 1407{
1408 struct fsl_diu_data *machine_data; 1408 struct fsl_diu_data *machine_data;
1409 1409
@@ -1487,7 +1487,7 @@ static ssize_t show_monitor(struct device *device,
1487 return diu_ops.show_monitor_port(machine_data->monitor_port, buf); 1487 return diu_ops.show_monitor_port(machine_data->monitor_port, buf);
1488} 1488}
1489 1489
1490static int __devinit fsl_diu_probe(struct of_device *ofdev, 1490static int __devinit fsl_diu_probe(struct platform_device *ofdev,
1491 const struct of_device_id *match) 1491 const struct of_device_id *match)
1492{ 1492{
1493 struct device_node *np = ofdev->dev.of_node; 1493 struct device_node *np = ofdev->dev.of_node;
@@ -1667,7 +1667,7 @@ error2:
1667} 1667}
1668 1668
1669 1669
1670static int fsl_diu_remove(struct of_device *ofdev) 1670static int fsl_diu_remove(struct platform_device *ofdev)
1671{ 1671{
1672 struct fsl_diu_data *machine_data; 1672 struct fsl_diu_data *machine_data;
1673 int i; 1673 int i;
diff --git a/drivers/video/leo.c b/drivers/video/leo.c
index ad677637ffbb..b599e5e36ced 100644
--- a/drivers/video/leo.c
+++ b/drivers/video/leo.c
@@ -529,7 +529,7 @@ static void leo_fixup_var_rgb(struct fb_var_screeninfo *var)
529 var->transp.length = 0; 529 var->transp.length = 0;
530} 530}
531 531
532static void leo_unmap_regs(struct of_device *op, struct fb_info *info, 532static void leo_unmap_regs(struct platform_device *op, struct fb_info *info,
533 struct leo_par *par) 533 struct leo_par *par)
534{ 534{
535 if (par->lc_ss0_usr) 535 if (par->lc_ss0_usr)
@@ -547,7 +547,7 @@ static void leo_unmap_regs(struct of_device *op, struct fb_info *info,
547 of_iounmap(&op->resource[0], info->screen_base, 0x800000); 547 of_iounmap(&op->resource[0], info->screen_base, 0x800000);
548} 548}
549 549
550static int __devinit leo_probe(struct of_device *op, 550static int __devinit leo_probe(struct platform_device *op,
551 const struct of_device_id *match) 551 const struct of_device_id *match)
552{ 552{
553 struct device_node *dp = op->dev.of_node; 553 struct device_node *dp = op->dev.of_node;
@@ -637,7 +637,7 @@ out_err:
637 return err; 637 return err;
638} 638}
639 639
640static int __devexit leo_remove(struct of_device *op) 640static int __devexit leo_remove(struct platform_device *op)
641{ 641{
642 struct fb_info *info = dev_get_drvdata(&op->dev); 642 struct fb_info *info = dev_get_drvdata(&op->dev);
643 struct leo_par *par = info->par; 643 struct leo_par *par = info->par;
diff --git a/drivers/video/mb862xx/mb862xxfb.c b/drivers/video/mb862xx/mb862xxfb.c
index 4e2b8cc3d460..b1c4374cf940 100644
--- a/drivers/video/mb862xx/mb862xxfb.c
+++ b/drivers/video/mb862xx/mb862xxfb.c
@@ -550,7 +550,7 @@ static int mb862xx_gdc_init(struct mb862xxfb_par *par)
550 return 0; 550 return 0;
551} 551}
552 552
553static int __devinit of_platform_mb862xx_probe(struct of_device *ofdev, 553static int __devinit of_platform_mb862xx_probe(struct platform_device *ofdev,
554 const struct of_device_id *id) 554 const struct of_device_id *id)
555{ 555{
556 struct device_node *np = ofdev->dev.of_node; 556 struct device_node *np = ofdev->dev.of_node;
@@ -669,7 +669,7 @@ fbrel:
669 return ret; 669 return ret;
670} 670}
671 671
672static int __devexit of_platform_mb862xx_remove(struct of_device *ofdev) 672static int __devexit of_platform_mb862xx_remove(struct platform_device *ofdev)
673{ 673{
674 struct fb_info *fbi = dev_get_drvdata(&ofdev->dev); 674 struct fb_info *fbi = dev_get_drvdata(&ofdev->dev);
675 struct mb862xxfb_par *par = fbi->par; 675 struct mb862xxfb_par *par = fbi->par;
diff --git a/drivers/video/p9100.c b/drivers/video/p9100.c
index 688b055abab2..b6c3fc2db632 100644
--- a/drivers/video/p9100.c
+++ b/drivers/video/p9100.c
@@ -249,7 +249,7 @@ static void p9100_init_fix(struct fb_info *info, int linebytes, struct device_no
249 info->fix.accel = FB_ACCEL_SUN_CGTHREE; 249 info->fix.accel = FB_ACCEL_SUN_CGTHREE;
250} 250}
251 251
252static int __devinit p9100_probe(struct of_device *op, const struct of_device_id *match) 252static int __devinit p9100_probe(struct platform_device *op, const struct of_device_id *match)
253{ 253{
254 struct device_node *dp = op->dev.of_node; 254 struct device_node *dp = op->dev.of_node;
255 struct fb_info *info; 255 struct fb_info *info;
@@ -326,7 +326,7 @@ out_err:
326 return err; 326 return err;
327} 327}
328 328
329static int __devexit p9100_remove(struct of_device *op) 329static int __devexit p9100_remove(struct platform_device *op)
330{ 330{
331 struct fb_info *info = dev_get_drvdata(&op->dev); 331 struct fb_info *info = dev_get_drvdata(&op->dev);
332 struct p9100_par *par = info->par; 332 struct p9100_par *par = info->par;
diff --git a/drivers/video/platinumfb.c b/drivers/video/platinumfb.c
index 72a1f4c04732..a50e1977b316 100644
--- a/drivers/video/platinumfb.c
+++ b/drivers/video/platinumfb.c
@@ -533,7 +533,7 @@ static int __init platinumfb_setup(char *options)
533#define invalidate_cache(addr) 533#define invalidate_cache(addr)
534#endif 534#endif
535 535
536static int __devinit platinumfb_probe(struct of_device* odev, 536static int __devinit platinumfb_probe(struct platform_device* odev,
537 const struct of_device_id *match) 537 const struct of_device_id *match)
538{ 538{
539 struct device_node *dp = odev->dev.of_node; 539 struct device_node *dp = odev->dev.of_node;
@@ -646,7 +646,7 @@ static int __devinit platinumfb_probe(struct of_device* odev,
646 return rc; 646 return rc;
647} 647}
648 648
649static int __devexit platinumfb_remove(struct of_device* odev) 649static int __devexit platinumfb_remove(struct platform_device* odev)
650{ 650{
651 struct fb_info *info = dev_get_drvdata(&odev->dev); 651 struct fb_info *info = dev_get_drvdata(&odev->dev);
652 struct fb_info_platinum *pinfo = info->par; 652 struct fb_info_platinum *pinfo = info->par;
diff --git a/drivers/video/sunxvr1000.c b/drivers/video/sunxvr1000.c
index 7288934c0d49..5dbe06af2226 100644
--- a/drivers/video/sunxvr1000.c
+++ b/drivers/video/sunxvr1000.c
@@ -111,7 +111,7 @@ static int __devinit gfb_set_fbinfo(struct gfb_info *gp)
111 return 0; 111 return 0;
112} 112}
113 113
114static int __devinit gfb_probe(struct of_device *op, 114static int __devinit gfb_probe(struct platform_device *op,
115 const struct of_device_id *match) 115 const struct of_device_id *match)
116{ 116{
117 struct device_node *dp = op->dev.of_node; 117 struct device_node *dp = op->dev.of_node;
@@ -172,7 +172,7 @@ err_out:
172 return err; 172 return err;
173} 173}
174 174
175static int __devexit gfb_remove(struct of_device *op) 175static int __devexit gfb_remove(struct platform_device *op)
176{ 176{
177 struct fb_info *info = dev_get_drvdata(&op->dev); 177 struct fb_info *info = dev_get_drvdata(&op->dev);
178 struct gfb_info *gp = info->par; 178 struct gfb_info *gp = info->par;
diff --git a/drivers/video/tcx.c b/drivers/video/tcx.c
index f375e0db6776..77ad27955cf0 100644
--- a/drivers/video/tcx.c
+++ b/drivers/video/tcx.c
@@ -342,7 +342,7 @@ tcx_init_fix(struct fb_info *info, int linebytes)
342 info->fix.accel = FB_ACCEL_SUN_TCX; 342 info->fix.accel = FB_ACCEL_SUN_TCX;
343} 343}
344 344
345static void tcx_unmap_regs(struct of_device *op, struct fb_info *info, 345static void tcx_unmap_regs(struct platform_device *op, struct fb_info *info,
346 struct tcx_par *par) 346 struct tcx_par *par)
347{ 347{
348 if (par->tec) 348 if (par->tec)
@@ -362,7 +362,7 @@ static void tcx_unmap_regs(struct of_device *op, struct fb_info *info,
362 info->screen_base, info->fix.smem_len); 362 info->screen_base, info->fix.smem_len);
363} 363}
364 364
365static int __devinit tcx_probe(struct of_device *op, 365static int __devinit tcx_probe(struct platform_device *op,
366 const struct of_device_id *match) 366 const struct of_device_id *match)
367{ 367{
368 struct device_node *dp = op->dev.of_node; 368 struct device_node *dp = op->dev.of_node;
@@ -486,7 +486,7 @@ out_err:
486 return err; 486 return err;
487} 487}
488 488
489static int __devexit tcx_remove(struct of_device *op) 489static int __devexit tcx_remove(struct platform_device *op)
490{ 490{
491 struct fb_info *info = dev_get_drvdata(&op->dev); 491 struct fb_info *info = dev_get_drvdata(&op->dev);
492 struct tcx_par *par = info->par; 492 struct tcx_par *par = info->par;
diff --git a/drivers/video/xilinxfb.c b/drivers/video/xilinxfb.c
index 29b5daacc217..0c9ce88e95e8 100644
--- a/drivers/video/xilinxfb.c
+++ b/drivers/video/xilinxfb.c
@@ -397,7 +397,7 @@ static int xilinxfb_release(struct device *dev)
397 */ 397 */
398 398
399static int __devinit 399static int __devinit
400xilinxfb_of_probe(struct of_device *op, const struct of_device_id *match) 400xilinxfb_of_probe(struct platform_device *op, const struct of_device_id *match)
401{ 401{
402 const u32 *prop; 402 const u32 *prop;
403 u32 *p; 403 u32 *p;
@@ -477,7 +477,7 @@ xilinxfb_of_probe(struct of_device *op, const struct of_device_id *match)
477 return -ENODEV; 477 return -ENODEV;
478} 478}
479 479
480static int __devexit xilinxfb_of_remove(struct of_device *op) 480static int __devexit xilinxfb_of_remove(struct platform_device *op)
481{ 481{
482 return xilinxfb_release(&op->dev); 482 return xilinxfb_release(&op->dev);
483} 483}
diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c
index 30a2512fd52e..566343b3c131 100644
--- a/drivers/watchdog/cpwd.c
+++ b/drivers/watchdog/cpwd.c
@@ -526,7 +526,7 @@ static const struct file_operations cpwd_fops = {
526 .release = cpwd_release, 526 .release = cpwd_release,
527}; 527};
528 528
529static int __devinit cpwd_probe(struct of_device *op, 529static int __devinit cpwd_probe(struct platform_device *op,
530 const struct of_device_id *match) 530 const struct of_device_id *match)
531{ 531{
532 struct device_node *options; 532 struct device_node *options;
@@ -639,7 +639,7 @@ out_free:
639 goto out; 639 goto out;
640} 640}
641 641
642static int __devexit cpwd_remove(struct of_device *op) 642static int __devexit cpwd_remove(struct platform_device *op)
643{ 643{
644 struct cpwd *p = dev_get_drvdata(&op->dev); 644 struct cpwd *p = dev_get_drvdata(&op->dev);
645 int i; 645 int i;
diff --git a/drivers/watchdog/gef_wdt.c b/drivers/watchdog/gef_wdt.c
index 1df284f9c2a1..9c21d19043a6 100644
--- a/drivers/watchdog/gef_wdt.c
+++ b/drivers/watchdog/gef_wdt.c
@@ -260,7 +260,7 @@ static struct miscdevice gef_wdt_miscdev = {
260}; 260};
261 261
262 262
263static int __devinit gef_wdt_probe(struct of_device *dev, 263static int __devinit gef_wdt_probe(struct platform_device *dev,
264 const struct of_device_id *match) 264 const struct of_device_id *match)
265{ 265{
266 int timeout = 10; 266 int timeout = 10;
diff --git a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c
index 4cda64dd309c..8fa213cdb499 100644
--- a/drivers/watchdog/mpc8xxx_wdt.c
+++ b/drivers/watchdog/mpc8xxx_wdt.c
@@ -185,7 +185,7 @@ static struct miscdevice mpc8xxx_wdt_miscdev = {
185 .fops = &mpc8xxx_wdt_fops, 185 .fops = &mpc8xxx_wdt_fops,
186}; 186};
187 187
188static int __devinit mpc8xxx_wdt_probe(struct of_device *ofdev, 188static int __devinit mpc8xxx_wdt_probe(struct platform_device *ofdev,
189 const struct of_device_id *match) 189 const struct of_device_id *match)
190{ 190{
191 int ret; 191 int ret;
@@ -238,7 +238,7 @@ err_unmap:
238 return ret; 238 return ret;
239} 239}
240 240
241static int __devexit mpc8xxx_wdt_remove(struct of_device *ofdev) 241static int __devexit mpc8xxx_wdt_remove(struct platform_device *ofdev)
242{ 242{
243 mpc8xxx_wdt_pr_warn("watchdog removed"); 243 mpc8xxx_wdt_pr_warn("watchdog removed");
244 del_timer_sync(&wdt_timer); 244 del_timer_sync(&wdt_timer);
diff --git a/drivers/watchdog/riowd.c b/drivers/watchdog/riowd.c
index 4082b4ace1fc..3faee1ae64bd 100644
--- a/drivers/watchdog/riowd.c
+++ b/drivers/watchdog/riowd.c
@@ -172,7 +172,7 @@ static struct miscdevice riowd_miscdev = {
172 .fops = &riowd_fops 172 .fops = &riowd_fops
173}; 173};
174 174
175static int __devinit riowd_probe(struct of_device *op, 175static int __devinit riowd_probe(struct platform_device *op,
176 const struct of_device_id *match) 176 const struct of_device_id *match)
177{ 177{
178 struct riowd *p; 178 struct riowd *p;
@@ -219,7 +219,7 @@ out:
219 return err; 219 return err;
220} 220}
221 221
222static int __devexit riowd_remove(struct of_device *op) 222static int __devexit riowd_remove(struct platform_device *op)
223{ 223{
224 struct riowd *p = dev_get_drvdata(&op->dev); 224 struct riowd *p = dev_get_drvdata(&op->dev);
225 225