]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
of/device: Replace struct of_device with struct platform_device
authorGrant Likely <grant.likely@secretlab.ca>
Fri, 6 Aug 2010 15:25:50 +0000 (09:25 -0600)
committerGrant Likely <grant.likely@secretlab.ca>
Fri, 6 Aug 2010 15:25:50 +0000 (09:25 -0600)
of_device is just an alias for platform_device, so remove it entirely.  Also
replace to_of_device() with to_platform_device() and update comment blocks.

This patch was initially generated from the following semantic patch, and then
edited by hand to pick up the bits that coccinelle didn't catch.

@@
@@
-struct of_device
+struct platform_device

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Reviewed-by: David S. Miller <davem@davemloft.net>
158 files changed:
arch/powerpc/platforms/83xx/mpc837x_mds.c
arch/powerpc/platforms/83xx/mpc837x_rdb.c
arch/powerpc/sysdev/fsl_rio.c
drivers/ata/pata_mpc52xx.c
drivers/ata/pata_of_platform.c
drivers/ata/sata_fsl.c
drivers/atm/fore200e.c
drivers/block/xsysace.c
drivers/char/hw_random/n2-drv.c
drivers/char/hw_random/n2rng.h
drivers/char/hw_random/pasemi-rng.c
drivers/char/ipmi/ipmi_si_intf.c
drivers/char/rtc.c
drivers/char/xilinx_hwicap/xilinx_hwicap.c
drivers/crypto/amcc/crypto4xx_core.c
drivers/crypto/amcc/crypto4xx_core.h
drivers/crypto/n2_core.c
drivers/crypto/talitos.c
drivers/dma/fsldma.c
drivers/dma/mpc512x_dma.c
drivers/dma/ppc4xx/adma.c
drivers/edac/mpc85xx_edac.c
drivers/edac/ppc4xx_edac.c
drivers/hwmon/ams/ams.h
drivers/hwmon/ultra45_env.c
drivers/i2c/busses/i2c-cpm.c
drivers/i2c/busses/i2c-ibm_iic.c
drivers/i2c/busses/i2c-mpc.c
drivers/infiniband/hw/ehca/ehca_classes.h
drivers/infiniband/hw/ehca/ehca_main.c
drivers/input/misc/sparcspkr.c
drivers/input/serio/i8042-sparcio.h
drivers/input/serio/xilinx_ps2.c
drivers/leds/leds-gpio.c
drivers/macintosh/macio_sysfs.c
drivers/macintosh/smu.c
drivers/macintosh/therm_adt746x.c
drivers/macintosh/therm_pm72.c
drivers/macintosh/therm_windtunnel.c
drivers/media/video/fsl-viu.c
drivers/mmc/host/sdhci-of-core.c
drivers/mtd/maps/physmap_of.c
drivers/mtd/maps/sun_uflash.c
drivers/mtd/nand/fsl_elbc_nand.c
drivers/mtd/nand/fsl_upm.c
drivers/mtd/nand/mpc5121_nfc.c
drivers/mtd/nand/ndfc.c
drivers/mtd/nand/pasemi_nand.c
drivers/mtd/nand/socrates_nand.c
drivers/net/can/mscan/mpc5xxx_can.c
drivers/net/can/sja1000/sja1000_of_platform.c
drivers/net/ehea/ehea.h
drivers/net/ehea/ehea_main.c
drivers/net/fec_mpc52xx.c
drivers/net/fec_mpc52xx_phy.c
drivers/net/fs_enet/fs_enet-main.c
drivers/net/fs_enet/mac-fcc.c
drivers/net/fs_enet/mac-fec.c
drivers/net/fs_enet/mac-scc.c
drivers/net/fs_enet/mii-bitbang.c
drivers/net/fs_enet/mii-fec.c
drivers/net/fsl_pq_mdio.c
drivers/net/gianfar.c
drivers/net/gianfar.h
drivers/net/greth.c
drivers/net/greth.h
drivers/net/ibm_newemac/core.c
drivers/net/ibm_newemac/core.h
drivers/net/ibm_newemac/mal.c
drivers/net/ibm_newemac/mal.h
drivers/net/ibm_newemac/rgmii.c
drivers/net/ibm_newemac/rgmii.h
drivers/net/ibm_newemac/tah.c
drivers/net/ibm_newemac/tah.h
drivers/net/ibm_newemac/zmii.c
drivers/net/ibm_newemac/zmii.h
drivers/net/ll_temac_main.c
drivers/net/myri_sbus.c
drivers/net/myri_sbus.h
drivers/net/niu.c
drivers/net/phy/mdio-gpio.c
drivers/net/sunbmac.c
drivers/net/sunbmac.h
drivers/net/sunhme.c
drivers/net/sunhme.h
drivers/net/sunlance.c
drivers/net/sunqe.c
drivers/net/sunqe.h
drivers/net/ucc_geth.c
drivers/net/xilinx_emaclite.c
drivers/of/device.c
drivers/parport/parport_sunbpp.c
drivers/pcmcia/electra_cf.c
drivers/pcmcia/m8xx_pcmcia.c
drivers/rtc/rtc-mpc5121.c
drivers/sbus/char/bbc_envctrl.c
drivers/sbus/char/bbc_i2c.c
drivers/sbus/char/bbc_i2c.h
drivers/sbus/char/display7seg.c
drivers/sbus/char/envctrl.c
drivers/sbus/char/flash.c
drivers/sbus/char/uctrl.c
drivers/scsi/qlogicpti.c
drivers/scsi/qlogicpti.h
drivers/scsi/sun_esp.c
drivers/serial/apbuart.c
drivers/serial/cpm_uart/cpm_uart_core.c
drivers/serial/mpc52xx_uart.c
drivers/serial/nwpserial.c
drivers/serial/of_serial.c
drivers/serial/sunhv.c
drivers/serial/sunsab.c
drivers/serial/sunsu.c
drivers/serial/sunzilog.c
drivers/serial/uartlite.c
drivers/serial/ucc_uart.c
drivers/spi/mpc512x_psc_spi.c
drivers/spi/mpc52xx_psc_spi.c
drivers/spi/mpc52xx_spi.c
drivers/spi/spi_mpc8xxx.c
drivers/spi/spi_ppc4xx.c
drivers/spi/xilinx_spi_of.c
drivers/usb/gadget/fsl_qe_udc.c
drivers/usb/host/ehci-ppc-of.c
drivers/usb/host/ehci-xilinx-of.c
drivers/usb/host/fhci-hcd.c
drivers/usb/host/isp1760-if.c
drivers/usb/host/ohci-ppc-of.c
drivers/video/bw2.c
drivers/video/cg14.c
drivers/video/cg3.c
drivers/video/cg6.c
drivers/video/ffb.c
drivers/video/fsl-diu-fb.c
drivers/video/leo.c
drivers/video/mb862xx/mb862xxfb.c
drivers/video/p9100.c
drivers/video/platinumfb.c
drivers/video/sunxvr1000.c
drivers/video/tcx.c
drivers/video/xilinxfb.c
drivers/watchdog/cpwd.c
drivers/watchdog/gef_wdt.c
drivers/watchdog/mpc8xxx_wdt.c
drivers/watchdog/riowd.c
include/linux/of_device.h
include/linux/of_platform.h
sound/aoa/soundbus/core.c
sound/aoa/soundbus/soundbus.h
sound/aoa/soundbus/sysfs.c
sound/soc/fsl/mpc5200_dma.c
sound/soc/fsl/mpc5200_dma.h
sound/soc/fsl/mpc5200_psc_ac97.c
sound/soc/fsl/mpc5200_psc_i2s.c
sound/soc/fsl/mpc8610_hpcd.c
sound/sparc/amd7930.c
sound/sparc/cs4231.c
sound/sparc/dbri.c

index 51df7e7546985b044893a6380fcd748588c978dc..f9751c8905be5db684a25555975a60b3b574d881 100644 (file)
@@ -102,7 +102,7 @@ static struct of_device_id mpc837x_ids[] = {
 
 static int __init mpc837x_declare_of_platform_devices(void)
 {
-       /* Publish of_device */
+       /* Publish platform_device */
        of_platform_bus_probe(NULL, mpc837x_ids, NULL);
 
        return 0;
index e00801c42540a26ebe5291f7d6000e0e3b0c0f5d..910caa6b581056e7a4cb928a00998d2336f24818 100644 (file)
@@ -78,7 +78,7 @@ static struct of_device_id mpc837x_ids[] = {
 
 static int __init mpc837x_declare_of_platform_devices(void)
 {
-       /* Publish of_device */
+       /* Publish platform_device */
        of_platform_bus_probe(NULL, mpc837x_ids, NULL);
 
        return 0;
index 8bd86530ee252cfafa19d3c5866853385398104a..6425abe5b7dbfe809cd41d8a06634a56367d9d1d 100644 (file)
@@ -1332,7 +1332,7 @@ static inline void fsl_rio_info(struct device *dev, u32 ccsr)
 
 /**
  * fsl_rio_setup - Setup Freescale PowerPC RapidIO interface
- * @dev: of_device pointer
+ * @dev: platform_device pointer
  *
  * Initializes MPC85xx RapidIO hardware interface, configures
  * master port with system-specific info, and registers the
index f087ab55b1dfcb09c0c0dce87a045a8de7479f31..8cc536e49a0ae4a851b6bf42009eef01848a0023 100644 (file)
@@ -680,7 +680,7 @@ mpc52xx_ata_remove_one(struct device *dev)
 /* ======================================================================== */
 
 static int __devinit
-mpc52xx_ata_probe(struct of_device *op, const struct of_device_id *match)
+mpc52xx_ata_probe(struct platform_device *op, const struct of_device_id *match)
 {
        unsigned int ipb_freq;
        struct resource res_mem;
@@ -821,7 +821,7 @@ mpc52xx_ata_probe(struct of_device *op, const struct of_device_id *match)
 }
 
 static int
-mpc52xx_ata_remove(struct of_device *op)
+mpc52xx_ata_remove(struct platform_device *op)
 {
        struct mpc52xx_ata_priv *priv;
        int task_irq;
@@ -848,7 +848,7 @@ mpc52xx_ata_remove(struct of_device *op)
 #ifdef CONFIG_PM
 
 static int
-mpc52xx_ata_suspend(struct of_device *op, pm_message_t state)
+mpc52xx_ata_suspend(struct platform_device *op, pm_message_t state)
 {
        struct ata_host *host = dev_get_drvdata(&op->dev);
 
@@ -856,7 +856,7 @@ mpc52xx_ata_suspend(struct of_device *op, pm_message_t state)
 }
 
 static int
-mpc52xx_ata_resume(struct of_device *op)
+mpc52xx_ata_resume(struct platform_device *op)
 {
        struct ata_host *host = dev_get_drvdata(&op->dev);
        struct mpc52xx_ata_priv *priv = host->private_data;
index 5a1b82c08be950b3b359c203c6654f342dde57c2..480e043ce6b80e4b307977095c85df26cde6d558 100644 (file)
@@ -14,7 +14,7 @@
 #include <linux/of_platform.h>
 #include <linux/ata_platform.h>
 
-static int __devinit pata_of_platform_probe(struct of_device *ofdev,
+static int __devinit pata_of_platform_probe(struct platform_device *ofdev,
                                            const struct of_device_id *match)
 {
        int ret;
@@ -78,7 +78,7 @@ static int __devinit pata_of_platform_probe(struct of_device *ofdev,
                                     reg_shift, pio_mask);
 }
 
-static int __devexit pata_of_platform_remove(struct of_device *ofdev)
+static int __devexit pata_of_platform_remove(struct platform_device *ofdev)
 {
        return __pata_platform_remove(&ofdev->dev);
 }
index 61c89b54ea23941fd937a25ec4228eca56648e10..4e4d42f1186adbfb1754efc3ec771b0e39924e89 100644 (file)
@@ -1296,7 +1296,7 @@ static const struct ata_port_info sata_fsl_port_info[] = {
         },
 };
 
-static int sata_fsl_probe(struct of_device *ofdev,
+static int sata_fsl_probe(struct platform_device *ofdev,
                        const struct of_device_id *match)
 {
        int retval = -ENXIO;
@@ -1370,7 +1370,7 @@ error_exit_with_cleanup:
        return retval;
 }
 
-static int sata_fsl_remove(struct of_device *ofdev)
+static int sata_fsl_remove(struct platform_device *ofdev)
 {
        struct ata_host *host = dev_get_drvdata(&ofdev->dev);
        struct sata_fsl_host_priv *host_priv = host->private_data;
@@ -1387,13 +1387,13 @@ static int sata_fsl_remove(struct of_device *ofdev)
 }
 
 #ifdef CONFIG_PM
-static int sata_fsl_suspend(struct of_device *op, pm_message_t state)
+static int sata_fsl_suspend(struct platform_device *op, pm_message_t state)
 {
        struct ata_host *host = dev_get_drvdata(&op->dev);
        return ata_host_suspend(host, state);
 }
 
-static int sata_fsl_resume(struct of_device *op)
+static int sata_fsl_resume(struct platform_device *op)
 {
        struct ata_host *host = dev_get_drvdata(&op->dev);
        struct sata_fsl_host_priv *host_priv = host->private_data;
index b7385e0777176413c2497b780797e81189888632..c8fc69c85a062f81029495e827ae615547f964e9 100644 (file)
@@ -674,7 +674,7 @@ static void fore200e_sba_write(u32 val, volatile u32 __iomem *addr)
 
 static u32 fore200e_sba_dma_map(struct fore200e *fore200e, void* virt_addr, int size, int direction)
 {
-       struct of_device *op = fore200e->bus_dev;
+       struct platform_device *op = fore200e->bus_dev;
        u32 dma_addr;
 
        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
 
 static void fore200e_sba_dma_unmap(struct fore200e *fore200e, u32 dma_addr, int size, int direction)
 {
-       struct of_device *op = fore200e->bus_dev;
+       struct platform_device *op = fore200e->bus_dev;
 
        DPRINTK(3, "SBUS DVMA unmapping: dma_addr = 0x%08x, size = %d, direction = %d,\n",
                dma_addr, size, direction);
@@ -697,7 +697,7 @@ static void fore200e_sba_dma_unmap(struct fore200e *fore200e, u32 dma_addr, int
 
 static void fore200e_sba_dma_sync_for_cpu(struct fore200e *fore200e, u32 dma_addr, int size, int direction)
 {
-       struct of_device *op = fore200e->bus_dev;
+       struct platform_device *op = fore200e->bus_dev;
 
        DPRINTK(3, "SBUS DVMA sync: dma_addr = 0x%08x, size = %d, direction = %d\n", dma_addr, size, direction);
     
@@ -706,7 +706,7 @@ static void fore200e_sba_dma_sync_for_cpu(struct fore200e *fore200e, u32 dma_add
 
 static void fore200e_sba_dma_sync_for_device(struct fore200e *fore200e, u32 dma_addr, int size, int direction)
 {
-       struct of_device *op = fore200e->bus_dev;
+       struct platform_device *op = fore200e->bus_dev;
 
        DPRINTK(3, "SBUS DVMA sync: dma_addr = 0x%08x, size = %d, direction = %d\n", dma_addr, size, direction);
 
@@ -719,7 +719,7 @@ static void fore200e_sba_dma_sync_for_device(struct fore200e *fore200e, u32 dma_
 static int fore200e_sba_dma_chunk_alloc(struct fore200e *fore200e, struct chunk *chunk,
                                        int size, int nbr, int alignment)
 {
-       struct of_device *op = fore200e->bus_dev;
+       struct platform_device *op = fore200e->bus_dev;
 
        chunk->alloc_size = chunk->align_size = size * nbr;
 
@@ -738,7 +738,7 @@ static int fore200e_sba_dma_chunk_alloc(struct fore200e *fore200e, struct chunk
 /* free a DVMA consistent chunk of memory */
 static void fore200e_sba_dma_chunk_free(struct fore200e *fore200e, struct chunk *chunk)
 {
-       struct of_device *op = fore200e->bus_dev;
+       struct platform_device *op = fore200e->bus_dev;
 
        dma_free_coherent(&op->dev, chunk->alloc_size,
                          chunk->alloc_addr, chunk->dma_addr);
@@ -770,7 +770,7 @@ static void fore200e_sba_reset(struct fore200e *fore200e)
 
 static int __init fore200e_sba_map(struct fore200e *fore200e)
 {
-       struct of_device *op = fore200e->bus_dev;
+       struct platform_device *op = fore200e->bus_dev;
        unsigned int bursts;
 
        /* gain access to the SBA specific registers  */
@@ -800,7 +800,7 @@ static int __init fore200e_sba_map(struct fore200e *fore200e)
 
 static void fore200e_sba_unmap(struct fore200e *fore200e)
 {
-       struct of_device *op = fore200e->bus_dev;
+       struct platform_device *op = fore200e->bus_dev;
 
        of_iounmap(&op->resource[0], fore200e->regs.sba.hcr, SBA200E_HCR_LENGTH);
        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)
 
 static int __init fore200e_sba_prom_read(struct fore200e *fore200e, struct prom_data *prom)
 {
-       struct of_device *op = fore200e->bus_dev;
+       struct platform_device *op = fore200e->bus_dev;
        const u8 *prop;
        int len;
 
@@ -840,7 +840,7 @@ static int __init fore200e_sba_prom_read(struct fore200e *fore200e, struct prom_
 
 static int fore200e_sba_proc_read(struct fore200e *fore200e, char *page)
 {
-       struct of_device *op = fore200e->bus_dev;
+       struct platform_device *op = fore200e->bus_dev;
        const struct linux_prom_registers *regs;
 
        regs = of_get_property(op->dev.of_node, "reg", NULL);
@@ -2513,7 +2513,7 @@ fore200e_load_and_start_fw(struct fore200e* fore200e)
        device = &((struct pci_dev *) fore200e->bus_dev)->dev;
 #ifdef CONFIG_SBUS
     else if (strcmp(fore200e->bus->model_name, "SBA-200E") == 0)
-       device = &((struct of_device *) fore200e->bus_dev)->dev;
+       device = &((struct platform_device *) fore200e->bus_dev)->dev;
 #endif
     else
        return err;
@@ -2643,7 +2643,7 @@ fore200e_init(struct fore200e* fore200e)
 }
 
 #ifdef CONFIG_SBUS
-static int __devinit fore200e_sba_probe(struct of_device *op,
+static int __devinit fore200e_sba_probe(struct platform_device *op,
                                        const struct of_device_id *match)
 {
        const struct fore200e_bus *bus = match->data;
@@ -2675,7 +2675,7 @@ static int __devinit fore200e_sba_probe(struct of_device *op,
        return 0;
 }
 
-static int __devexit fore200e_sba_remove(struct of_device *op)
+static int __devexit fore200e_sba_remove(struct platform_device *op)
 {
        struct fore200e *fore200e = dev_get_drvdata(&op->dev);
 
index a7b83c0a7eb5575ded978fd7a2e89025d829057d..d7cb69db3067db73bdfd2aa23bbec2fbd14d9320 100644 (file)
@@ -1188,7 +1188,7 @@ static struct platform_driver ace_platform_driver = {
 
 #if defined(CONFIG_OF)
 static int __devinit
-ace_of_probe(struct of_device *op, const struct of_device_id *match)
+ace_of_probe(struct platform_device *op, const struct of_device_id *match)
 {
        struct resource res;
        resource_size_t physaddr;
@@ -1220,7 +1220,7 @@ ace_of_probe(struct of_device *op, const struct of_device_id *match)
        return ace_alloc(&op->dev, id ? *id : 0, physaddr, irq, bus_width);
 }
 
-static int __devexit ace_of_remove(struct of_device *op)
+static int __devexit ace_of_remove(struct platform_device *op)
 {
        ace_free(&op->dev);
        return 0;
index 7a4f080f8356e7657375debd0a0e9cf7c8b15a6e..1acdb25095112ef538072e8d153a889476d1359f 100644 (file)
@@ -619,7 +619,7 @@ static void __devinit n2rng_driver_version(void)
                pr_info("%s", version);
 }
 
-static int __devinit n2rng_probe(struct of_device *op,
+static int __devinit n2rng_probe(struct platform_device *op,
                                 const struct of_device_id *match)
 {
        int victoria_falls = (match->data != NULL);
@@ -714,7 +714,7 @@ out:
        return err;
 }
 
-static int __devexit n2rng_remove(struct of_device *op)
+static int __devexit n2rng_remove(struct platform_device *op)
 {
        struct n2rng *np = dev_get_drvdata(&op->dev);
 
index a2b81e7bfc180f983b23a85c8350ec079398646e..4bea07f30978e7ae95a2a94f69c8b3d03955dd7f 100644 (file)
@@ -65,7 +65,7 @@ struct n2rng_unit {
 };
 
 struct n2rng {
-       struct of_device        *op;
+       struct platform_device  *op;
 
        unsigned long           flags;
 #define N2RNG_FLAG_VF          0x00000001 /* Victoria Falls RNG, else N2 */
index 261ba8f22b8ba57872d4b15f1f71b5da05b009bd..a31c830ca8cd72f853298477ae55dd34192920bd 100644 (file)
@@ -94,7 +94,7 @@ static struct hwrng pasemi_rng = {
        .data_read      = pasemi_rng_data_read,
 };
 
-static int __devinit rng_probe(struct of_device *ofdev,
+static int __devinit rng_probe(struct platform_device *ofdev,
                               const struct of_device_id *match)
 {
        void __iomem *rng_regs;
@@ -123,7 +123,7 @@ static int __devinit rng_probe(struct of_device *ofdev,
        return err;
 }
 
-static int __devexit rng_remove(struct of_device *dev)
+static int __devexit rng_remove(struct platform_device *dev)
 {
        void __iomem *rng_regs = (void __iomem *)pasemi_rng.priv;
 
index 094bdc355b1fe753c003d30277fbf9a038281444..b532d613fb5bf0b7b5af8e20c44d81e7200607d4 100644 (file)
@@ -2502,7 +2502,7 @@ static struct pci_driver ipmi_pci_driver = {
 
 
 #ifdef CONFIG_PPC_OF
-static int __devinit ipmi_of_probe(struct of_device *dev,
+static int __devinit ipmi_of_probe(struct platform_device *dev,
                         const struct of_device_id *match)
 {
        struct smi_info *info;
@@ -2576,7 +2576,7 @@ static int __devinit ipmi_of_probe(struct of_device *dev,
        return add_smi(info);
 }
 
-static int __devexit ipmi_of_remove(struct of_device *dev)
+static int __devexit ipmi_of_remove(struct platform_device *dev)
 {
        cleanup_one_si(dev_get_drvdata(&dev->dev));
        return 0;
index 95acb8c880f4f1ad61766b13d7235ecdc6367811..dfa8b3062fdad831485c7c8ee1f36839b6377a2f 100644 (file)
@@ -961,7 +961,7 @@ static int __init rtc_init(void)
 #endif
 #ifdef CONFIG_SPARC32
        struct device_node *ebus_dp;
-       struct of_device *op;
+       struct platform_device *op;
 #else
        void *r;
 #ifdef RTC_IRQ
index ed8a9cec2a05ebefc7b171828bd08b2b6a677e1c..0ed763cd2e77499471bc6f4abc0da36e199ec3dd 100644 (file)
@@ -761,7 +761,7 @@ static struct platform_driver hwicap_platform_driver = {
 
 #if defined(CONFIG_OF)
 static int __devinit
-hwicap_of_probe(struct of_device *op, const struct of_device_id *match)
+hwicap_of_probe(struct platform_device *op, const struct of_device_id *match)
 {
        struct resource res;
        const unsigned int *id;
@@ -798,7 +798,7 @@ hwicap_of_probe(struct of_device *op, const struct of_device_id *match)
                        regs);
 }
 
-static int __devexit hwicap_of_remove(struct of_device *op)
+static int __devexit hwicap_of_remove(struct platform_device *op)
 {
        return hwicap_remove(&op->dev);
 }
index 983530ba04a7e932c3a70ec692e719fe44cccb21..2b1baee525bcc6023ce065c699b3f0fa0642fa1b 100644 (file)
@@ -1150,7 +1150,7 @@ struct crypto4xx_alg_common crypto4xx_alg[] = {
 /**
  * Module Initialization Routine
  */
-static int __init crypto4xx_probe(struct of_device *ofdev,
+static int __init crypto4xx_probe(struct platform_device *ofdev,
                                  const struct of_device_id *match)
 {
        int rc;
@@ -1258,7 +1258,7 @@ err_alloc_dev:
        return rc;
 }
 
-static int __exit crypto4xx_remove(struct of_device *ofdev)
+static int __exit crypto4xx_remove(struct platform_device *ofdev)
 {
        struct device *dev = &ofdev->dev;
        struct crypto4xx_core_device *core_dev = dev_get_drvdata(dev);
index da9cbe3b9fc3a9a9585788d95bb8d6e0c6fe4ef0..bac0bdeb4b5f9955c193e6896a7f5bb182c19e63 100644 (file)
@@ -104,7 +104,7 @@ struct crypto4xx_device {
 
 struct crypto4xx_core_device {
        struct device *device;
-       struct of_device *ofdev;
+       struct platform_device *ofdev;
        struct crypto4xx_device *dev;
        u32 int_status;
        u32 irq;
index 26af2dd5d8316e73cf95f966aa215ae7ebb1dd37..931fdd471d6d60d89d7a9f9449b23738b8df22b2 100644 (file)
@@ -1552,7 +1552,7 @@ static void __exit n2_unregister_algs(void)
 
 /* To map CWQ queues to interrupt sources, the hypervisor API provides
  * a devino.  This isn't very useful to us because all of the
- * interrupts listed in the of_device node have been translated to
+ * interrupts listed in the device_node have been translated to
  * Linux virtual IRQ cookie numbers.
  *
  * So we have to back-translate, going through the 'intr' and 'ino'
@@ -1560,7 +1560,7 @@ static void __exit n2_unregister_algs(void)
  * 'interrupts' property entries, in order to to figure out which
  * devino goes to which already-translated IRQ.
  */
-static int find_devino_index(struct of_device *dev, struct spu_mdesc_info *ip,
+static int find_devino_index(struct platform_device *dev, struct spu_mdesc_info *ip,
                             unsigned long dev_ino)
 {
        const unsigned int *dev_intrs;
@@ -1588,7 +1588,7 @@ static int find_devino_index(struct of_device *dev, struct spu_mdesc_info *ip,
        return -ENODEV;
 }
 
-static int spu_map_ino(struct of_device *dev, struct spu_mdesc_info *ip,
+static int spu_map_ino(struct platform_device *dev, struct spu_mdesc_info *ip,
                       const char *irq_name, struct spu_queue *p,
                       irq_handler_t handler)
 {
@@ -1736,7 +1736,7 @@ static void spu_list_destroy(struct list_head *list)
  * gathering cpu membership information.
  */
 static int spu_mdesc_walk_arcs(struct mdesc_handle *mdesc,
-                              struct of_device *dev,
+                              struct platform_device *dev,
                               u64 node, struct spu_queue *p,
                               struct spu_queue **table)
 {
@@ -1763,7 +1763,7 @@ static int spu_mdesc_walk_arcs(struct mdesc_handle *mdesc,
 
 /* Process an 'exec-unit' MDESC node of type 'cwq'.  */
 static int handle_exec_unit(struct spu_mdesc_info *ip, struct list_head *list,
-                           struct of_device *dev, struct mdesc_handle *mdesc,
+                           struct platform_device *dev, struct mdesc_handle *mdesc,
                            u64 node, const char *iname, unsigned long q_type,
                            irq_handler_t handler, struct spu_queue **table)
 {
@@ -1794,7 +1794,7 @@ static int handle_exec_unit(struct spu_mdesc_info *ip, struct list_head *list,
        return spu_map_ino(dev, ip, iname, p, handler);
 }
 
-static int spu_mdesc_scan(struct mdesc_handle *mdesc, struct of_device *dev,
+static int spu_mdesc_scan(struct mdesc_handle *mdesc, struct platform_device *dev,
                          struct spu_mdesc_info *ip, struct list_head *list,
                          const char *exec_name, unsigned long q_type,
                          irq_handler_t handler, struct spu_queue **table)
@@ -1855,7 +1855,7 @@ static int __devinit get_irq_props(struct mdesc_handle *mdesc, u64 node,
 }
 
 static int __devinit grab_mdesc_irq_props(struct mdesc_handle *mdesc,
-                                         struct of_device *dev,
+                                         struct platform_device *dev,
                                          struct spu_mdesc_info *ip,
                                          const char *node_name)
 {
@@ -2004,7 +2004,7 @@ static void __devinit n2_spu_driver_version(void)
                pr_info("%s", version);
 }
 
-static int __devinit n2_crypto_probe(struct of_device *dev,
+static int __devinit n2_crypto_probe(struct platform_device *dev,
                                     const struct of_device_id *match)
 {
        struct mdesc_handle *mdesc;
@@ -2081,7 +2081,7 @@ out_free_n2cp:
        return err;
 }
 
-static int __devexit n2_crypto_remove(struct of_device *dev)
+static int __devexit n2_crypto_remove(struct platform_device *dev)
 {
        struct n2_crypto *np = dev_get_drvdata(&dev->dev);
 
@@ -2116,7 +2116,7 @@ static void free_ncp(struct n2_mau *mp)
        kfree(mp);
 }
 
-static int __devinit n2_mau_probe(struct of_device *dev,
+static int __devinit n2_mau_probe(struct platform_device *dev,
                                     const struct of_device_id *match)
 {
        struct mdesc_handle *mdesc;
@@ -2184,7 +2184,7 @@ out_free_ncp:
        return err;
 }
 
-static int __devexit n2_mau_remove(struct of_device *dev)
+static int __devexit n2_mau_remove(struct platform_device *dev)
 {
        struct n2_mau *mp = dev_get_drvdata(&dev->dev);
 
index 97f4af1d8a64415ff32de856381781997223284d..4bcd825b573940b99f50add143d22bfed4f9f373 100644 (file)
@@ -118,7 +118,7 @@ struct talitos_channel {
 
 struct talitos_private {
        struct device *dev;
-       struct of_device *ofdev;
+       struct platform_device *ofdev;
        void __iomem *reg;
        int irq;
 
@@ -2308,7 +2308,7 @@ static int hw_supports(struct device *dev, __be32 desc_hdr_template)
        return ret;
 }
 
-static int talitos_remove(struct of_device *ofdev)
+static int talitos_remove(struct platform_device *ofdev)
 {
        struct device *dev = &ofdev->dev;
        struct talitos_private *priv = dev_get_drvdata(dev);
@@ -2401,7 +2401,7 @@ static struct talitos_crypto_alg *talitos_alg_alloc(struct device *dev,
        return t_alg;
 }
 
-static int talitos_probe(struct of_device *ofdev,
+static int talitos_probe(struct platform_device *ofdev,
                         const struct of_device_id *match)
 {
        struct device *dev = &ofdev->dev;
index f0fd6db6063cd0b2d81264d469fdb4afe6c6f15b..cea08bed9cf96f10ec9072c9c3a6aa6cf92fe506 100644 (file)
@@ -1297,7 +1297,7 @@ static void fsl_dma_chan_remove(struct fsldma_chan *chan)
        kfree(chan);
 }
 
-static int __devinit fsldma_of_probe(struct of_device *op,
+static int __devinit fsldma_of_probe(struct platform_device *op,
                        const struct of_device_id *match)
 {
        struct fsldma_device *fdev;
@@ -1382,7 +1382,7 @@ out_return:
        return err;
 }
 
-static int fsldma_of_remove(struct of_device *op)
+static int fsldma_of_remove(struct platform_device *op)
 {
        struct fsldma_device *fdev;
        unsigned int i;
index 14a8c0f1698e4fd1c5e33e33b6f28244741273be..4e9cbf3005947a519e8d69ee6126753d2feaf287 100644 (file)
@@ -627,7 +627,7 @@ mpc_dma_prep_memcpy(struct dma_chan *chan, dma_addr_t dst, dma_addr_t src,
        return &mdesc->desc;
 }
 
-static int __devinit mpc_dma_probe(struct of_device *op,
+static int __devinit mpc_dma_probe(struct platform_device *op,
                                        const struct of_device_id *match)
 {
        struct device_node *dn = op->dev.of_node;
@@ -753,7 +753,7 @@ static int __devinit mpc_dma_probe(struct of_device *op,
        return retval;
 }
 
-static int __devexit mpc_dma_remove(struct of_device *op)
+static int __devexit mpc_dma_remove(struct platform_device *op)
 {
        struct device *dev = &op->dev;
        struct mpc_dma *mdma = dev_get_drvdata(dev);
index 7c3747902a37ad29f7a1031dd7039c69556d3ea3..0d58a4a4487fbbaefc167182a627c6b0b0f222b3 100644 (file)
@@ -4257,11 +4257,11 @@ static int ppc440spe_adma_setup_irqs(struct ppc440spe_adma_device *adev,
                                     struct ppc440spe_adma_chan *chan,
                                     int *initcode)
 {
-       struct of_device *ofdev;
+       struct platform_device *ofdev;
        struct device_node *np;
        int ret;
 
-       ofdev = container_of(adev->dev, struct of_device, dev);
+       ofdev = container_of(adev->dev, struct platform_device, dev);
        np = ofdev->dev.of_node;
        if (adev->id != PPC440SPE_XOR_ID) {
                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,
 /**
  * ppc440spe_adma_probe - probe the asynch device
  */
-static int __devinit ppc440spe_adma_probe(struct of_device *ofdev,
+static int __devinit ppc440spe_adma_probe(struct platform_device *ofdev,
                                          const struct of_device_id *match)
 {
        struct device_node *np = ofdev->dev.of_node;
@@ -4625,7 +4625,7 @@ out:
 /**
  * ppc440spe_adma_remove - remove the asynch device
  */
-static int __devexit ppc440spe_adma_remove(struct of_device *ofdev)
+static int __devexit ppc440spe_adma_remove(struct platform_device *ofdev)
 {
        struct ppc440spe_adma_device *adev = dev_get_drvdata(&ofdev->dev);
        struct device_node *np = ofdev->dev.of_node;
index 1052340e6802658db085627f501f3c6102347e67..8ea07b01954323c1c7995803c224ddac459eec7d 100644 (file)
@@ -200,7 +200,7 @@ static irqreturn_t mpc85xx_pci_isr(int irq, void *dev_id)
        return IRQ_HANDLED;
 }
 
-static int __devinit mpc85xx_pci_err_probe(struct of_device *op,
+static int __devinit mpc85xx_pci_err_probe(struct platform_device *op,
                                           const struct of_device_id *match)
 {
        struct edac_pci_ctl_info *pci;
@@ -305,7 +305,7 @@ err:
        return res;
 }
 
-static int mpc85xx_pci_err_remove(struct of_device *op)
+static int mpc85xx_pci_err_remove(struct platform_device *op)
 {
        struct edac_pci_ctl_info *pci = dev_get_drvdata(&op->dev);
        struct mpc85xx_pci_pdata *pdata = pci->pvt_info;
@@ -503,7 +503,7 @@ static irqreturn_t mpc85xx_l2_isr(int irq, void *dev_id)
        return IRQ_HANDLED;
 }
 
-static int __devinit mpc85xx_l2_err_probe(struct of_device *op,
+static int __devinit mpc85xx_l2_err_probe(struct platform_device *op,
                                          const struct of_device_id *match)
 {
        struct edac_device_ctl_info *edac_dev;
@@ -613,7 +613,7 @@ err:
        return res;
 }
 
-static int mpc85xx_l2_err_remove(struct of_device *op)
+static int mpc85xx_l2_err_remove(struct platform_device *op)
 {
        struct edac_device_ctl_info *edac_dev = dev_get_drvdata(&op->dev);
        struct mpc85xx_l2_pdata *pdata = edac_dev->pvt_info;
@@ -953,7 +953,7 @@ static void __devinit mpc85xx_init_csrows(struct mem_ctl_info *mci)
        }
 }
 
-static int __devinit mpc85xx_mc_err_probe(struct of_device *op,
+static int __devinit mpc85xx_mc_err_probe(struct platform_device *op,
                                          const struct of_device_id *match)
 {
        struct mem_ctl_info *mci;
@@ -1085,7 +1085,7 @@ err:
        return res;
 }
 
-static int mpc85xx_mc_err_remove(struct of_device *op)
+static int mpc85xx_mc_err_remove(struct platform_device *op)
 {
        struct mem_ctl_info *mci = dev_get_drvdata(&op->dev);
        struct mpc85xx_mc_pdata *pdata = mci->pvt_info;
index e78839e89a067400726b26a302eb05f317200b02..070cea41b66117e88bef54e89afe34f2568c1f22 100644 (file)
@@ -184,9 +184,9 @@ struct ppc4xx_ecc_status {
 
 /* Function Prototypes */
 
-static int ppc4xx_edac_probe(struct of_device *device,
+static int ppc4xx_edac_probe(struct platform_device *device,
                             const struct of_device_id *device_id);
-static int ppc4xx_edac_remove(struct of_device *device);
+static int ppc4xx_edac_remove(struct platform_device *device);
 
 /* Global Variables */
 
@@ -1014,7 +1014,7 @@ ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1)
  */
 static int __devinit
 ppc4xx_edac_mc_init(struct mem_ctl_info *mci,
-                   struct of_device *op,
+                   struct platform_device *op,
                    const struct of_device_id *match,
                    const dcr_host_t *dcr_host,
                    u32 mcopt1)
@@ -1108,7 +1108,7 @@ ppc4xx_edac_mc_init(struct mem_ctl_info *mci,
  * mapped and assigned.
  */
 static int __devinit
-ppc4xx_edac_register_irq(struct of_device *op, struct mem_ctl_info *mci)
+ppc4xx_edac_register_irq(struct platform_device *op, struct mem_ctl_info *mci)
 {
        int status = 0;
        int ded_irq, sec_irq;
@@ -1238,7 +1238,7 @@ ppc4xx_edac_map_dcrs(const struct device_node *np, dcr_host_t *dcr_host)
  * driver; otherwise, < 0 on error.
  */
 static int __devinit
-ppc4xx_edac_probe(struct of_device *op, const struct of_device_id *match)
+ppc4xx_edac_probe(struct platform_device *op, const struct of_device_id *match)
 {
        int status = 0;
        u32 mcopt1, memcheck;
@@ -1359,7 +1359,7 @@ ppc4xx_edac_probe(struct of_device *op, const struct of_device_id *match)
  * Unconditionally returns 0.
  */
 static int
-ppc4xx_edac_remove(struct of_device *op)
+ppc4xx_edac_remove(struct platform_device *op)
 {
        struct mem_ctl_info *mci = dev_get_drvdata(&op->dev);
        struct ppc4xx_edac_pdata *pdata = mci->pvt_info;
index b28d7e27a031727bc7cc83c18d28b9fc15b2160a..90f094d454501eb1a9fe843466e3e42ac9471f9f 100644 (file)
@@ -23,7 +23,7 @@ struct ams {
 
        /* General properties */
        struct device_node *of_node;
-       struct of_device *of_dev;
+       struct platform_device *of_dev;
        char has_device;
        char vflag;
        u32 orient1;
index 89643261ccdb93aecc42eb5d735bda668b64c0eb..d863e13a50b8a8a7dfb8339e64ad19cc060404ba 100644 (file)
@@ -234,7 +234,7 @@ static const struct attribute_group env_group = {
        .attrs = env_attributes,
 };
 
-static int __devinit env_probe(struct of_device *op,
+static int __devinit env_probe(struct platform_device *op,
                               const struct of_device_id *match)
 {
        struct env *p = kzalloc(sizeof(*p), GFP_KERNEL);
@@ -276,7 +276,7 @@ out_free:
        goto out;
 }
 
-static int __devexit env_remove(struct of_device *op)
+static int __devexit env_remove(struct platform_device *op)
 {
        struct env *p = dev_get_drvdata(&op->dev);
 
index e591de1bc7044260f0735731cf6b6981e3f075bc..f7bd2613ceccbc69e4d04b69432fdc40638b2555 100644 (file)
@@ -105,7 +105,7 @@ struct i2c_reg {
 
 struct cpm_i2c {
        char *base;
-       struct of_device *ofdev;
+       struct platform_device *ofdev;
        struct i2c_adapter adap;
        uint dp_addr;
        int version; /* CPM1=1, CPM2=2 */
@@ -428,7 +428,7 @@ static const struct i2c_adapter cpm_ops = {
 
 static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm)
 {
-       struct of_device *ofdev = cpm->ofdev;
+       struct platform_device *ofdev = cpm->ofdev;
        const u32 *data;
        int len, ret, i;
        void __iomem *i2c_base;
@@ -634,7 +634,7 @@ static void cpm_i2c_shutdown(struct cpm_i2c *cpm)
                cpm_muram_free(cpm->i2c_addr);
 }
 
-static int __devinit cpm_i2c_probe(struct of_device *ofdev,
+static int __devinit cpm_i2c_probe(struct platform_device *ofdev,
                         const struct of_device_id *match)
 {
        int result, len;
@@ -687,7 +687,7 @@ out_free:
        return result;
 }
 
-static int __devexit cpm_i2c_remove(struct of_device *ofdev)
+static int __devexit cpm_i2c_remove(struct platform_device *ofdev)
 {
        struct cpm_i2c *cpm = dev_get_drvdata(&ofdev->dev);
 
index 1168d61418c95a86935729b007a03007dd28b371..43ca32fddde2b77309c92533f9c2c50e44719879 100644 (file)
@@ -661,7 +661,7 @@ static inline u8 iic_clckdiv(unsigned int opb)
        return (u8)((opb + 9) / 10 - 1);
 }
 
-static int __devinit iic_request_irq(struct of_device *ofdev,
+static int __devinit iic_request_irq(struct platform_device *ofdev,
                                     struct ibm_iic_private *dev)
 {
        struct device_node *np = ofdev->dev.of_node;
@@ -692,7 +692,7 @@ static int __devinit iic_request_irq(struct of_device *ofdev,
 /*
  * Register single IIC interface
  */
-static int __devinit iic_probe(struct of_device *ofdev,
+static int __devinit iic_probe(struct platform_device *ofdev,
                               const struct of_device_id *match)
 {
        struct device_node *np = ofdev->dev.of_node;
@@ -780,7 +780,7 @@ error_cleanup:
 /*
  * Cleanup initialized IIC interface
  */
-static int __devexit iic_remove(struct of_device *ofdev)
+static int __devexit iic_remove(struct platform_device *ofdev)
 {
        struct ibm_iic_private *dev = dev_get_drvdata(&ofdev->dev);
 
index 6545d1c99b61e157c3570a9adbb9b42ecc1cd440..a1c419a716af8d24f4a84a680cc93123b6c8bff9 100644 (file)
@@ -560,7 +560,7 @@ static struct i2c_adapter mpc_ops = {
        .timeout = HZ,
 };
 
-static int __devinit fsl_i2c_probe(struct of_device *op,
+static int __devinit fsl_i2c_probe(struct platform_device *op,
                                   const struct of_device_id *match)
 {
        struct mpc_i2c *i2c;
@@ -646,7 +646,7 @@ static int __devinit fsl_i2c_probe(struct of_device *op,
        return result;
 };
 
-static int __devexit fsl_i2c_remove(struct of_device *op)
+static int __devexit fsl_i2c_remove(struct platform_device *op)
 {
        struct mpc_i2c *i2c = dev_get_drvdata(&op->dev);
 
index 0136abd50dd4cc5ff9ca5034589b6ab3cd923d55..aaf6023a4835e79551226a6262678dc83b28d7bb 100644 (file)
@@ -112,7 +112,7 @@ struct ehca_sport {
 
 struct ehca_shca {
        struct ib_device ib_device;
-       struct of_device *ofdev;
+       struct platform_device *ofdev;
        u8 num_ports;
        int hw_level;
        struct list_head shca_list;
index ecb51b396c42d2a3b85e7dd29e40a28e412455cc..67c4534fb94196af2a04b33bbcd181f1264662bc 100644 (file)
@@ -712,7 +712,7 @@ static struct attribute_group ehca_dev_attr_grp = {
        .attrs = ehca_dev_attrs
 };
 
-static int __devinit ehca_probe(struct of_device *dev,
+static int __devinit ehca_probe(struct platform_device *dev,
                                const struct of_device_id *id)
 {
        struct ehca_shca *shca;
@@ -878,7 +878,7 @@ probe1:
        return -EINVAL;
 }
 
-static int __devexit ehca_remove(struct of_device *dev)
+static int __devexit ehca_remove(struct platform_device *dev)
 {
        struct ehca_shca *shca = dev_get_drvdata(&dev->dev);
        unsigned long flags;
index f3bb92e9755fa1d7c9516a93b816006655710f93..8e130bf7d32b9de5bb0da6158f7fa0bf31761911 100644 (file)
@@ -173,7 +173,7 @@ static int __devinit sparcspkr_probe(struct device *dev)
        return 0;
 }
 
-static int sparcspkr_shutdown(struct of_device *dev)
+static int sparcspkr_shutdown(struct platform_device *dev)
 {
        struct sparcspkr_state *state = dev_get_drvdata(&dev->dev);
        struct input_dev *input_dev = state->input_dev;
@@ -184,7 +184,7 @@ static int sparcspkr_shutdown(struct of_device *dev)
        return 0;
 }
 
-static int __devinit bbc_beep_probe(struct of_device *op, const struct of_device_id *match)
+static int __devinit bbc_beep_probe(struct platform_device *op, const struct of_device_id *match)
 {
        struct sparcspkr_state *state;
        struct bbc_beep_info *info;
@@ -231,7 +231,7 @@ out_err:
        return err;
 }
 
-static int __devexit bbc_remove(struct of_device *op)
+static int __devexit bbc_remove(struct platform_device *op)
 {
        struct sparcspkr_state *state = dev_get_drvdata(&op->dev);
        struct input_dev *input_dev = state->input_dev;
@@ -269,7 +269,7 @@ static struct of_platform_driver bbc_beep_driver = {
        .shutdown       = sparcspkr_shutdown,
 };
 
-static int __devinit grover_beep_probe(struct of_device *op, const struct of_device_id *match)
+static int __devinit grover_beep_probe(struct platform_device *op, const struct of_device_id *match)
 {
        struct sparcspkr_state *state;
        struct grover_beep_info *info;
@@ -312,7 +312,7 @@ out_err:
        return err;
 }
 
-static int __devexit grover_remove(struct of_device *op)
+static int __devexit grover_remove(struct platform_device *op)
 {
        struct sparcspkr_state *state = dev_get_drvdata(&op->dev);
        struct grover_beep_info *info = &state->u.grover;
index cb2a24b947464bfb087a4cf43e6ab0ea939dd5ea..c5cc4508d6df4e55f9796ea0e6bd7ed7d8dc672f 100644 (file)
@@ -49,7 +49,7 @@ static inline void i8042_write_command(int val)
 #define OBP_PS2MS_NAME1                "kdmouse"
 #define OBP_PS2MS_NAME2                "mouse"
 
-static int __devinit sparc_i8042_probe(struct of_device *op, const struct of_device_id *match)
+static int __devinit sparc_i8042_probe(struct platform_device *op, const struct of_device_id *match)
 {
        struct device_node *dp = op->dev.of_node;
 
@@ -57,7 +57,7 @@ static int __devinit sparc_i8042_probe(struct of_device *op, const struct of_dev
        while (dp) {
                if (!strcmp(dp->name, OBP_PS2KBD_NAME1) ||
                    !strcmp(dp->name, OBP_PS2KBD_NAME2)) {
-                       struct of_device *kbd = of_find_device_by_node(dp);
+                       struct platform_device *kbd = of_find_device_by_node(dp);
                        unsigned int irq = kbd->archdata.irqs[0];
                        if (irq == 0xffffffff)
                                irq = op->archdata.irqs[0];
@@ -67,7 +67,7 @@ static int __devinit sparc_i8042_probe(struct of_device *op, const struct of_dev
                        kbd_res = &kbd->resource[0];
                } else if (!strcmp(dp->name, OBP_PS2MS_NAME1) ||
                           !strcmp(dp->name, OBP_PS2MS_NAME2)) {
-                       struct of_device *ms = of_find_device_by_node(dp);
+                       struct platform_device *ms = of_find_device_by_node(dp);
                        unsigned int irq = ms->archdata.irqs[0];
                        if (irq == 0xffffffff)
                                irq = op->archdata.irqs[0];
@@ -80,7 +80,7 @@ static int __devinit sparc_i8042_probe(struct of_device *op, const struct of_dev
        return 0;
 }
 
-static int __devexit sparc_i8042_remove(struct of_device *op)
+static int __devexit sparc_i8042_remove(struct platform_device *op)
 {
        of_iounmap(kbd_res, kbd_iobase, 8);
 
index e2c028d2638fce0e49d41912f91f1a3260cb16a0..bb14449fb0223d784ab233690df5932208965b88 100644 (file)
@@ -232,7 +232,7 @@ static void sxps2_close(struct serio *pserio)
  * It returns 0, if the driver is bound to the PS/2 device, or a negative
  * value if there is an error.
  */
-static int __devinit xps2_of_probe(struct of_device *ofdev,
+static int __devinit xps2_of_probe(struct platform_device *ofdev,
                                   const struct of_device_id *match)
 {
        struct resource r_irq; /* Interrupt resources */
@@ -332,7 +332,7 @@ failed1:
  * if the driver module is being unloaded. It frees any resources allocated to
  * the device.
  */
-static int __devexit xps2_of_remove(struct of_device *of_dev)
+static int __devexit xps2_of_remove(struct platform_device *of_dev)
 {
        struct device *dev = &of_dev->dev;
        struct xps2data *drvdata = dev_get_drvdata(dev);
index cc22eeefa10bb1845b700771cf4b4317e05f0ba2..ea57e05d08f3f757e67f7a3ed7c5d2c5c0a28aae 100644 (file)
@@ -224,7 +224,7 @@ struct gpio_led_of_platform_data {
        struct gpio_led_data led_data[];
 };
 
-static int __devinit of_gpio_leds_probe(struct of_device *ofdev,
+static int __devinit of_gpio_leds_probe(struct platform_device *ofdev,
                                        const struct of_device_id *match)
 {
        struct device_node *np = ofdev->dev.of_node, *child;
@@ -283,7 +283,7 @@ err:
        return ret;
 }
 
-static int __devexit of_gpio_leds_remove(struct of_device *ofdev)
+static int __devexit of_gpio_leds_remove(struct platform_device *ofdev)
 {
        struct gpio_led_of_platform_data *pdata = dev_get_drvdata(&ofdev->dev);
        int i;
index 6024038a5b9dc9a450b6ff655205ea266b632f04..8eb40afbd0f511fd5a7b09c8fc48b1b295eb9ea5 100644 (file)
@@ -15,7 +15,7 @@ field##_show (struct device *dev, struct device_attribute *attr,      \
 static ssize_t
 compatible_show (struct device *dev, struct device_attribute *attr, char *buf)
 {
-       struct of_device *of;
+       struct platform_device *of;
        const char *compat;
        int cplen;
        int length = 0;
@@ -52,9 +52,9 @@ static ssize_t modalias_show (struct device *dev, struct device_attribute *attr,
 static ssize_t devspec_show(struct device *dev,
                                struct device_attribute *attr, char *buf)
 {
-       struct of_device *ofdev;
+       struct platform_device *ofdev;
 
-       ofdev = to_of_device(dev);
+       ofdev = to_platform_device(dev);
        return sprintf(buf, "%s\n", ofdev->dev.of_node->full_name);
 }
 
index 2506c957712e894479e48ced054b5eb4bf532873..e58c3d33e035e4cba5e5213417e08d9a6be91c2f 100644 (file)
@@ -75,7 +75,7 @@ struct smu_cmd_buf {
 struct smu_device {
        spinlock_t              lock;
        struct device_node      *of_node;
-       struct of_device        *of_dev;
+       struct platform_device  *of_dev;
        int                     doorbell;       /* doorbell gpio */
        u32 __iomem             *db_buf;        /* doorbell buffer */
        struct device_node      *db_node;
@@ -645,7 +645,7 @@ static void smu_expose_childs(struct work_struct *unused)
 
 static DECLARE_WORK(smu_expose_childs_work, smu_expose_childs);
 
-static int smu_platform_probe(struct of_device* dev,
+static int smu_platform_probe(struct platform_device* dev,
                              const struct of_device_id *match)
 {
        if (!smu)
@@ -695,7 +695,7 @@ static int __init smu_init_sysfs(void)
 
 device_initcall(smu_init_sysfs);
 
-struct of_device *smu_get_ofdev(void)
+struct platform_device *smu_get_ofdev(void)
 {
        if (!smu)
                return NULL;
index c42eeb43042daa92d9f04e22b2205ce6d1d2a33d..d0d221332db0562e424cf8e98304e8fbd2013947 100644 (file)
@@ -84,7 +84,7 @@ struct thermostat {
 
 static enum {ADT7460, ADT7467} therm_type;
 static int therm_bus, therm_address;
-static struct of_device * of_dev;
+static struct platform_device * of_dev;
 static struct thermostat* thermostat;
 static struct task_struct *thread_therm = NULL;
 
index e60605bd0ea980a5928d0349df3fdb29eb09bb0c..44549272333c565ad2aca2987778f165c251f3d4 100644 (file)
  * Driver statics
  */
 
-static struct of_device *              of_dev;
+static struct platform_device *                of_dev;
 static struct i2c_adapter *            u3_0;
 static struct i2c_adapter *            u3_1;
 static struct i2c_adapter *            k2;
@@ -2210,7 +2210,7 @@ static void fcu_lookup_fans(struct device_node *fcu_node)
        }
 }
 
-static int fcu_of_probe(struct of_device* dev, const struct of_device_id *match)
+static int fcu_of_probe(struct platform_device* dev, const struct of_device_id *match)
 {
        state = state_detached;
 
@@ -2221,7 +2221,7 @@ static int fcu_of_probe(struct of_device* dev, const struct of_device_id *match)
        return i2c_add_driver(&therm_pm72_driver);
 }
 
-static int fcu_of_remove(struct of_device* dev)
+static int fcu_of_remove(struct platform_device* dev)
 {
        i2c_del_driver(&therm_pm72_driver);
 
index 5c9367acf0cf2c6a3411fe691f12540caab7ffd7..133f195de1fd1211871db80a78d8149780cb82b5 100644 (file)
@@ -52,7 +52,7 @@ static struct {
        struct task_struct      *poll_task;
        
        struct mutex            lock;
-       struct of_device        *of_dev;
+       struct platform_device  *of_dev;
        
        struct i2c_client       *thermostat;
        struct i2c_client       *fan;
@@ -444,13 +444,13 @@ static struct i2c_driver g4fan_driver = {
 /************************************************************************/
 
 static int
-therm_of_probe( struct of_device *dev, const struct of_device_id *match )
+therm_of_probe( struct platform_device *dev, const struct of_device_id *match )
 {
        return i2c_add_driver( &g4fan_driver );
 }
 
 static int
-therm_of_remove( struct of_device *dev )
+therm_of_remove( struct platform_device *dev )
 {
        i2c_del_driver( &g4fan_driver );
        return 0;
index 8f1c94f7e00cc7b1d2713998b4dcd4359fe0a2a9..43d208f1f586bd1592beacce7d9c96fa999b9596 100644 (file)
@@ -1418,7 +1418,7 @@ static struct video_device viu_template = {
        .current_norm   = V4L2_STD_NTSC_M,
 };
 
-static int __devinit viu_of_probe(struct of_device *op,
+static int __devinit viu_of_probe(struct platform_device *op,
                                  const struct of_device_id *match)
 {
        struct viu_dev *viu_dev;
@@ -1549,7 +1549,7 @@ err:
        return ret;
 }
 
-static int __devexit viu_of_remove(struct of_device *op)
+static int __devexit viu_of_remove(struct platform_device *op)
 {
        struct v4l2_device *v4l2_dev = dev_get_drvdata(&op->dev);
        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)
 }
 
 #ifdef CONFIG_PM
-static int viu_suspend(struct of_device *op, pm_message_t state)
+static int viu_suspend(struct platform_device *op, pm_message_t state)
 {
        struct v4l2_device *v4l2_dev = dev_get_drvdata(&op->dev);
        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)
        return 0;
 }
 
-static int viu_resume(struct of_device *op)
+static int viu_resume(struct platform_device *op)
 {
        struct v4l2_device *v4l2_dev = dev_get_drvdata(&op->dev);
        struct viu_dev *dev = container_of(v4l2_dev, struct viu_dev, v4l2_dev);
index a2e9820cd42f75e9de5942eb4ef7c0f37cbc0db5..a6bd448a3b46eb7e8b7cfd3443e6e37ceec056ea 100644 (file)
@@ -85,14 +85,14 @@ void sdhci_be32bs_writeb(struct sdhci_host *host, u8 val, int reg)
 
 #ifdef CONFIG_PM
 
-static int sdhci_of_suspend(struct of_device *ofdev, pm_message_t state)
+static int sdhci_of_suspend(struct platform_device *ofdev, pm_message_t state)
 {
        struct sdhci_host *host = dev_get_drvdata(&ofdev->dev);
 
        return mmc_suspend_host(host->mmc);
 }
 
-static int sdhci_of_resume(struct of_device *ofdev)
+static int sdhci_of_resume(struct platform_device *ofdev)
 {
        struct sdhci_host *host = dev_get_drvdata(&ofdev->dev);
 
@@ -115,7 +115,7 @@ static bool __devinit sdhci_of_wp_inverted(struct device_node *np)
        return machine_is(mpc837x_rdb) || machine_is(mpc837x_mds);
 }
 
-static int __devinit sdhci_of_probe(struct of_device *ofdev,
+static int __devinit sdhci_of_probe(struct platform_device *ofdev,
                                 const struct of_device_id *match)
 {
        struct device_node *np = ofdev->dev.of_node;
@@ -179,7 +179,7 @@ err_addr_map:
        return ret;
 }
 
-static int __devexit sdhci_of_remove(struct of_device *ofdev)
+static int __devexit sdhci_of_remove(struct platform_device *ofdev)
 {
        struct sdhci_host *host = dev_get_drvdata(&ofdev->dev);
 
index ba124baa646d7af1fe54cf958d2e26c2af5a00d9..8f9bab8dc8da32426dee85e244dd78ff3b5262a8 100644 (file)
@@ -43,7 +43,7 @@ struct of_flash {
 #ifdef CONFIG_MTD_PARTITIONS
 #define OF_FLASH_PARTS(info)   ((info)->parts)
 
-static int parse_obsolete_partitions(struct of_device *dev,
+static int parse_obsolete_partitions(struct platform_device *dev,
                                     struct of_flash *info,
                                     struct device_node *dp)
 {
@@ -93,7 +93,7 @@ static int parse_obsolete_partitions(struct of_device *dev,
 #define parse_partitions(info, dev)    (0)
 #endif /* MTD_PARTITIONS */
 
-static int of_flash_remove(struct of_device *dev)
+static int of_flash_remove(struct platform_device *dev)
 {
        struct of_flash *info;
        int i;
@@ -140,7 +140,7 @@ static int of_flash_remove(struct of_device *dev)
 /* Helper function to handle probing of the obsolete "direct-mapped"
  * compatible binding, which has an extra "probe-type" property
  * describing the type of flash probe necessary. */
-static struct mtd_info * __devinit obsolete_probe(struct of_device *dev,
+static struct mtd_info * __devinit obsolete_probe(struct platform_device *dev,
                                                  struct map_info *map)
 {
        struct device_node *dp = dev->dev.of_node;
@@ -215,7 +215,7 @@ static void __devinit of_free_probes(const char **probes)
 }
 #endif
 
-static int __devinit of_flash_probe(struct of_device *dev,
+static int __devinit of_flash_probe(struct platform_device *dev,
                                    const struct of_device_id *match)
 {
 #ifdef CONFIG_MTD_PARTITIONS
index 8984236a8d0a5f93f4d31ba0d26d81abdcd9dea2..3582ba1f9b0916b54a13f31dbf970bcfbe7093b0 100644 (file)
@@ -48,7 +48,7 @@ struct map_info uflash_map_templ = {
        .bankwidth =    UFLASH_BUSWIDTH,
 };
 
-int uflash_devinit(struct of_device *op, struct device_node *dp)
+int uflash_devinit(struct platform_device *op, struct device_node *dp)
 {
        struct uflash_dev *up;
 
@@ -108,7 +108,7 @@ int uflash_devinit(struct of_device *op, struct device_node *dp)
        return 0;
 }
 
-static int __devinit uflash_probe(struct of_device *op, const struct of_device_id *match)
+static int __devinit uflash_probe(struct platform_device *op, const struct of_device_id *match)
 {
        struct device_node *dp = op->dev.of_node;
 
@@ -121,7 +121,7 @@ static int __devinit uflash_probe(struct of_device *op, const struct of_device_i
        return uflash_devinit(op, dp);
 }
 
-static int __devexit uflash_remove(struct of_device *op)
+static int __devexit uflash_remove(struct platform_device *op)
 {
        struct uflash_dev *up = dev_get_drvdata(&op->dev);
 
index 5084cc51794421c10eb2067dc151a22511b12968..80de0bff6c3a0e7727a0fd1c35fcdaa0d0cea714 100644 (file)
@@ -958,7 +958,7 @@ static int __devinit fsl_elbc_ctrl_init(struct fsl_elbc_ctrl *ctrl)
        return 0;
 }
 
-static int fsl_elbc_ctrl_remove(struct of_device *ofdev)
+static int fsl_elbc_ctrl_remove(struct platform_device *ofdev)
 {
        struct fsl_elbc_ctrl *ctrl = dev_get_drvdata(&ofdev->dev);
        int i;
@@ -1013,7 +1013,7 @@ static irqreturn_t fsl_elbc_ctrl_irq(int irqno, void *data)
  * in the chip probe function.
 */
 
-static int __devinit fsl_elbc_ctrl_probe(struct of_device *ofdev,
+static int __devinit fsl_elbc_ctrl_probe(struct platform_device *ofdev,
                                          const struct of_device_id *match)
 {
        struct device_node *child;
index 1312eda57ba6621c335fe592f7a7d963a5d05a5d..4eff8b25e5af2f8ca82fbaa50e2d6ae02bc6aa7e 100644 (file)
@@ -217,7 +217,7 @@ err:
        return ret;
 }
 
-static int __devinit fun_probe(struct of_device *ofdev,
+static int __devinit fun_probe(struct platform_device *ofdev,
                               const struct of_device_id *ofid)
 {
        struct fsl_upm_nand *fun;
@@ -335,7 +335,7 @@ err1:
        return ret;
 }
 
-static int __devexit fun_remove(struct of_device *ofdev)
+static int __devexit fun_remove(struct platform_device *ofdev)
 {
        struct fsl_upm_nand *fun = dev_get_drvdata(&ofdev->dev);
        int i;
index 0a130dcaa1292974b264199824ec602fe002b677..df0c1da4ff49b5b36357bb8a6ccbea9c420728e5 100644 (file)
@@ -647,7 +647,7 @@ static void mpc5121_nfc_free(struct device *dev, struct mtd_info *mtd)
                iounmap(prv->csreg);
 }
 
-static int __devinit mpc5121_nfc_probe(struct of_device *op,
+static int __devinit mpc5121_nfc_probe(struct platform_device *op,
                                        const struct of_device_id *match)
 {
        struct device_node *rootnode, *dn = op->dev.of_node;
@@ -869,7 +869,7 @@ error:
        return retval;
 }
 
-static int __devexit mpc5121_nfc_remove(struct of_device *op)
+static int __devexit mpc5121_nfc_remove(struct platform_device *op)
 {
        struct device *dev = &op->dev;
        struct mtd_info *mtd = dev_get_drvdata(dev);
index 98fd2bdf8be15df36be2dd264e56ea27282bd20b..510554e6c115d9ad751a783bcb1e725dee7aba2a 100644 (file)
@@ -35,7 +35,7 @@
 
 
 struct ndfc_controller {
-       struct of_device *ofdev;
+       struct platform_device *ofdev;
        void __iomem *ndfcbase;
        struct mtd_info mtd;
        struct nand_chip chip;
@@ -225,7 +225,7 @@ err:
        return ret;
 }
 
-static int __devinit ndfc_probe(struct of_device *ofdev,
+static int __devinit ndfc_probe(struct platform_device *ofdev,
                                const struct of_device_id *match)
 {
        struct ndfc_controller *ndfc = &ndfc_ctrl;
@@ -277,7 +277,7 @@ static int __devinit ndfc_probe(struct of_device *ofdev,
        return 0;
 }
 
-static int __devexit ndfc_remove(struct of_device *ofdev)
+static int __devexit ndfc_remove(struct platform_device *ofdev)
 {
        struct ndfc_controller *ndfc = dev_get_drvdata(&ofdev->dev);
 
index f02af24d033a73341b7490acec7f2255e8ed67c9..6ddb2461d740d26ded22005f15d3d6de8beb6349 100644 (file)
@@ -89,7 +89,7 @@ int pasemi_device_ready(struct mtd_info *mtd)
        return !!(inl(lpcctl) & LBICTRL_LPCCTL_NR);
 }
 
-static int __devinit pasemi_nand_probe(struct of_device *ofdev,
+static int __devinit pasemi_nand_probe(struct platform_device *ofdev,
                                      const struct of_device_id *match)
 {
        struct pci_dev *pdev;
@@ -185,7 +185,7 @@ static int __devinit pasemi_nand_probe(struct of_device *ofdev,
        return err;
 }
 
-static int __devexit pasemi_nand_remove(struct of_device *ofdev)
+static int __devexit pasemi_nand_remove(struct platform_device *ofdev)
 {
        struct nand_chip *chip;
 
index cc728b12de82d4446315f91c165a032aa15f1c4b..a8e403eebedb558dc8d77308b47572aa0d4fcd79 100644 (file)
@@ -162,7 +162,7 @@ static const char *part_probes[] = { "cmdlinepart", NULL };
 /*
  * Probe for the NAND device.
  */
-static int __devinit socrates_nand_probe(struct of_device *ofdev,
+static int __devinit socrates_nand_probe(struct platform_device *ofdev,
                                         const struct of_device_id *ofid)
 {
        struct socrates_nand_host *host;
@@ -276,7 +276,7 @@ out:
 /*
  * Remove a NAND device.
  */
-static int __devexit socrates_nand_remove(struct of_device *ofdev)
+static int __devexit socrates_nand_remove(struct platform_device *ofdev)
 {
        struct socrates_nand_host *host = dev_get_drvdata(&ofdev->dev);
        struct mtd_info *mtd = &host->mtd;
index af753936e835840ac0127ea78f6421893887b37d..b1bdc909090f7130ccf88cbb6e5257542623b9d2 100644 (file)
@@ -38,7 +38,7 @@
 
 struct mpc5xxx_can_data {
        unsigned int type;
-       u32 (*get_clock)(struct of_device *ofdev, const char *clock_name,
+       u32 (*get_clock)(struct platform_device *ofdev, const char *clock_name,
                         int *mscan_clksrc);
 };
 
@@ -48,7 +48,7 @@ static struct of_device_id __devinitdata mpc52xx_cdm_ids[] = {
        {}
 };
 
-static u32 __devinit mpc52xx_can_get_clock(struct of_device *ofdev,
+static u32 __devinit mpc52xx_can_get_clock(struct platform_device *ofdev,
                                           const char *clock_name,
                                           int *mscan_clksrc)
 {
@@ -101,7 +101,7 @@ static u32 __devinit mpc52xx_can_get_clock(struct of_device *ofdev,
        return freq;
 }
 #else /* !CONFIG_PPC_MPC52xx */
-static u32 __devinit mpc52xx_can_get_clock(struct of_device *ofdev,
+static u32 __devinit mpc52xx_can_get_clock(struct platform_device *ofdev,
                                           const char *clock_name,
                                           int *mscan_clksrc)
 {
@@ -129,7 +129,7 @@ static struct of_device_id __devinitdata mpc512x_clock_ids[] = {
        {}
 };
 
-static u32 __devinit mpc512x_can_get_clock(struct of_device *ofdev,
+static u32 __devinit mpc512x_can_get_clock(struct platform_device *ofdev,
                                           const char *clock_name,
                                           int *mscan_clksrc)
 {
@@ -239,7 +239,7 @@ exit_unmap:
        return freq;
 }
 #else /* !CONFIG_PPC_MPC512x */
-static u32 __devinit mpc512x_can_get_clock(struct of_device *ofdev,
+static u32 __devinit mpc512x_can_get_clock(struct platform_device *ofdev,
                                           const char *clock_name,
                                           int *mscan_clksrc)
 {
@@ -247,7 +247,7 @@ static u32 __devinit mpc512x_can_get_clock(struct of_device *ofdev,
 }
 #endif /* CONFIG_PPC_MPC512x */
 
-static int __devinit mpc5xxx_can_probe(struct of_device *ofdev,
+static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev,
                                       const struct of_device_id *id)
 {
        struct mpc5xxx_can_data *data = (struct mpc5xxx_can_data *)id->data;
@@ -317,7 +317,7 @@ exit_unmap_mem:
        return err;
 }
 
-static int __devexit mpc5xxx_can_remove(struct of_device *ofdev)
+static int __devexit mpc5xxx_can_remove(struct platform_device *ofdev)
 {
        struct net_device *dev = dev_get_drvdata(&ofdev->dev);
        struct mscan_priv *priv = netdev_priv(dev);
@@ -334,7 +334,7 @@ static int __devexit mpc5xxx_can_remove(struct of_device *ofdev)
 
 #ifdef CONFIG_PM
 static struct mscan_regs saved_regs;
-static int mpc5xxx_can_suspend(struct of_device *ofdev, pm_message_t state)
+static int mpc5xxx_can_suspend(struct platform_device *ofdev, pm_message_t state)
 {
        struct net_device *dev = dev_get_drvdata(&ofdev->dev);
        struct mscan_priv *priv = netdev_priv(dev);
@@ -345,7 +345,7 @@ static int mpc5xxx_can_suspend(struct of_device *ofdev, pm_message_t state)
        return 0;
 }
 
-static int mpc5xxx_can_resume(struct of_device *ofdev)
+static int mpc5xxx_can_resume(struct platform_device *ofdev)
 {
        struct net_device *dev = dev_get_drvdata(&ofdev->dev);
        struct mscan_priv *priv = netdev_priv(dev);
index ac1a83d7c2044fdd20c5b42063de62231b7d2725..5bfccfdf3bbb37d5bde186a6f5103d2d53c96a94 100644 (file)
@@ -67,7 +67,7 @@ static void sja1000_ofp_write_reg(const struct sja1000_priv *priv,
        out_8(priv->reg_base + reg, val);
 }
 
-static int __devexit sja1000_ofp_remove(struct of_device *ofdev)
+static int __devexit sja1000_ofp_remove(struct platform_device *ofdev)
 {
        struct net_device *dev = dev_get_drvdata(&ofdev->dev);
        struct sja1000_priv *priv = netdev_priv(dev);
@@ -87,7 +87,7 @@ static int __devexit sja1000_ofp_remove(struct of_device *ofdev)
        return 0;
 }
 
-static int __devinit sja1000_ofp_probe(struct of_device *ofdev,
+static int __devinit sja1000_ofp_probe(struct platform_device *ofdev,
                                       const struct of_device_id *id)
 {
        struct device_node *np = ofdev->dev.of_node;
index 0060e422f171bda3c385ef757fce13ee39d0a517..99a929964e3cebde15667e59d913debd6d205b20 100644 (file)
@@ -413,7 +413,7 @@ struct ehea_port_res {
 
 struct ehea_adapter {
        u64 handle;
-       struct of_device *ofdev;
+       struct platform_device *ofdev;
        struct ehea_port *port[EHEA_MAX_PORTS];
        struct ehea_eq *neq;       /* notification event queue */
        struct tasklet_struct neq_tasklet;
@@ -465,7 +465,7 @@ struct ehea_port {
        struct net_device *netdev;
        struct net_device_stats stats;
        struct ehea_port_res port_res[EHEA_MAX_PORT_RES];
-       struct of_device  ofdev; /* Open Firmware Device */
+       struct platform_device  ofdev; /* Open Firmware Device */
        struct ehea_mc_list *mc_list;    /* Multicast MAC addresses */
        struct vlan_group *vgrp;
        struct ehea_eq *qp_eq;
index 3beba70b7dea5827c45927d2c9b550bb68d148f5..897719b49f96859b11a1f01f4f45e46c03c4cd71 100644 (file)
@@ -107,10 +107,10 @@ struct ehea_fw_handle_array ehea_fw_handles;
 struct ehea_bcmc_reg_array ehea_bcmc_regs;
 
 
-static int __devinit ehea_probe_adapter(struct of_device *dev,
+static int __devinit ehea_probe_adapter(struct platform_device *dev,
                                        const struct of_device_id *id);
 
-static int __devexit ehea_remove(struct of_device *dev);
+static int __devexit ehea_remove(struct platform_device *dev);
 
 static struct of_device_id ehea_device_table[] = {
        {
@@ -3376,7 +3376,7 @@ static ssize_t ehea_remove_port(struct device *dev,
 static DEVICE_ATTR(probe_port, S_IWUSR, NULL, ehea_probe_port);
 static DEVICE_ATTR(remove_port, S_IWUSR, NULL, ehea_remove_port);
 
-int ehea_create_device_sysfs(struct of_device *dev)
+int ehea_create_device_sysfs(struct platform_device *dev)
 {
        int ret = device_create_file(&dev->dev, &dev_attr_probe_port);
        if (ret)
@@ -3387,13 +3387,13 @@ out:
        return ret;
 }
 
-void ehea_remove_device_sysfs(struct of_device *dev)
+void ehea_remove_device_sysfs(struct platform_device *dev)
 {
        device_remove_file(&dev->dev, &dev_attr_probe_port);
        device_remove_file(&dev->dev, &dev_attr_remove_port);
 }
 
-static int __devinit ehea_probe_adapter(struct of_device *dev,
+static int __devinit ehea_probe_adapter(struct platform_device *dev,
                                        const struct of_device_id *id)
 {
        struct ehea_adapter *adapter;
@@ -3492,7 +3492,7 @@ out:
        return ret;
 }
 
-static int __devexit ehea_remove(struct of_device *dev)
+static int __devexit ehea_remove(struct platform_device *dev)
 {
        struct ehea_adapter *adapter = dev_get_drvdata(&dev->dev);
        int i;
index d1a5b17b2a95567b3466674ec61acdc85657a5b2..e3e10b4add9ce3e2f1f55adf54707190a6622ea9 100644 (file)
@@ -850,7 +850,7 @@ static const struct net_device_ops mpc52xx_fec_netdev_ops = {
 /* ======================================================================== */
 
 static int __devinit
-mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match)
+mpc52xx_fec_probe(struct platform_device *op, const struct of_device_id *match)
 {
        int rv;
        struct net_device *ndev;
@@ -995,7 +995,7 @@ err_netdev:
 }
 
 static int
-mpc52xx_fec_remove(struct of_device *op)
+mpc52xx_fec_remove(struct platform_device *op)
 {
        struct net_device *ndev;
        struct mpc52xx_fec_priv *priv;
@@ -1025,7 +1025,7 @@ mpc52xx_fec_remove(struct of_device *op)
 }
 
 #ifdef CONFIG_PM
-static int mpc52xx_fec_of_suspend(struct of_device *op, pm_message_t state)
+static int mpc52xx_fec_of_suspend(struct platform_device *op, pm_message_t state)
 {
        struct net_device *dev = dev_get_drvdata(&op->dev);
 
@@ -1035,7 +1035,7 @@ static int mpc52xx_fec_of_suspend(struct of_device *op, pm_message_t state)
        return 0;
 }
 
-static int mpc52xx_fec_of_resume(struct of_device *op)
+static int mpc52xx_fec_of_resume(struct platform_device *op)
 {
        struct net_device *dev = dev_get_drvdata(&op->dev);
 
index dbaf72cbb23383d431a201672d195b73fdc51bc8..0b4cb6f1598443cb566fae02279a3e45a455dc5c 100644 (file)
@@ -61,7 +61,7 @@ static int mpc52xx_fec_mdio_write(struct mii_bus *bus, int phy_id, int reg,
                data | FEC_MII_WRITE_FRAME);
 }
 
-static int mpc52xx_fec_mdio_probe(struct of_device *of,
+static int mpc52xx_fec_mdio_probe(struct platform_device *of,
                const struct of_device_id *match)
 {
        struct device *dev = &of->dev;
@@ -122,7 +122,7 @@ static int mpc52xx_fec_mdio_probe(struct of_device *of,
        return err;
 }
 
-static int mpc52xx_fec_mdio_remove(struct of_device *of)
+static int mpc52xx_fec_mdio_remove(struct platform_device *of)
 {
        struct device *dev = &of->dev;
        struct mii_bus *bus = dev_get_drvdata(dev);
index f08cff9020bdc4972b0f76dbaa2b61eb880d0f95..d6e3111959abc49d82849fc22dd2ad6a3ec62b1b 100644 (file)
@@ -997,7 +997,7 @@ static const struct net_device_ops fs_enet_netdev_ops = {
 #endif
 };
 
-static int __devinit fs_enet_probe(struct of_device *ofdev,
+static int __devinit fs_enet_probe(struct platform_device *ofdev,
                                    const struct of_device_id *match)
 {
        struct net_device *ndev;
@@ -1105,7 +1105,7 @@ out_free_fpi:
        return ret;
 }
 
-static int fs_enet_remove(struct of_device *ofdev)
+static int fs_enet_remove(struct platform_device *ofdev)
 {
        struct net_device *ndev = dev_get_drvdata(&ofdev->dev);
        struct fs_enet_private *fep = netdev_priv(ndev);
index 48e91b6242ce99b8382aeb4d55ec17c3af682cc7..7a84e45487e83ba184dcccf4def37529c4607ba9 100644 (file)
@@ -84,7 +84,7 @@ static inline int fcc_cr_cmd(struct fs_enet_private *fep, u32 op)
 
 static int do_pd_setup(struct fs_enet_private *fep)
 {
-       struct of_device *ofdev = to_of_device(fep->dev);
+       struct platform_device *ofdev = to_platform_device(fep->dev);
        struct fs_platform_info *fpi = fep->fpi;
        int ret = -EINVAL;
 
index 7ca1642276d02e44949a966f3107c7b36c82ea03..61035fc5599b1bd552bf05e1a77289bd24bee53f 100644 (file)
@@ -96,7 +96,7 @@ static int whack_reset(struct fec __iomem *fecp)
 
 static int do_pd_setup(struct fs_enet_private *fep)
 {
-       struct of_device *ofdev = to_of_device(fep->dev);
+       struct platform_device *ofdev = to_platform_device(fep->dev);
 
        fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL);
        if (fep->interrupt == NO_IRQ)
index a3c44544846d5ab2ef1a54e205c51e4e79310688..22a02a76706933938c4b39f09404edaef2d763d7 100644 (file)
@@ -96,7 +96,7 @@ static inline int scc_cr_cmd(struct fs_enet_private *fep, u32 op)
 
 static int do_pd_setup(struct fs_enet_private *fep)
 {
-       struct of_device *ofdev = to_of_device(fep->dev);
+       struct platform_device *ofdev = to_platform_device(fep->dev);
 
        fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL);
        if (fep->interrupt == NO_IRQ)
index 3607340f3da7ce93a671a964366758780f7bc038..3cda2b515471e83ca8cde7b1c5c26f9701b43f01 100644 (file)
@@ -150,7 +150,7 @@ static int __devinit fs_mii_bitbang_init(struct mii_bus *bus,
        return 0;
 }
 
-static int __devinit fs_enet_mdio_probe(struct of_device *ofdev,
+static int __devinit fs_enet_mdio_probe(struct platform_device *ofdev,
                                         const struct of_device_id *match)
 {
        struct mii_bus *new_bus;
@@ -200,7 +200,7 @@ out:
        return ret;
 }
 
-static int fs_enet_mdio_remove(struct of_device *ofdev)
+static int fs_enet_mdio_remove(struct platform_device *ofdev)
 {
        struct mii_bus *bus = dev_get_drvdata(&ofdev->dev);
        struct bb_info *bitbang = bus->priv;
index bddffd169b93888cfab8d97f05de9136063a81cb..dbb9c48623dfbad9b5b6e36b39c7308295e95ee8 100644 (file)
@@ -101,7 +101,7 @@ static int fs_enet_fec_mii_reset(struct mii_bus *bus)
        return 0;
 }
 
-static int __devinit fs_enet_mdio_probe(struct of_device *ofdev,
+static int __devinit fs_enet_mdio_probe(struct platform_device *ofdev,
                                         const struct of_device_id *match)
 {
        struct resource res;
@@ -192,7 +192,7 @@ out:
        return ret;
 }
 
-static int fs_enet_mdio_remove(struct of_device *ofdev)
+static int fs_enet_mdio_remove(struct platform_device *ofdev)
 {
        struct mii_bus *bus = dev_get_drvdata(&ofdev->dev);
        struct fec_info *fec = bus->priv;
index f53f850b641888acb1080d6f08402caf2094eccb..d4bf91aac25f003f99d1531ef1ef26f5a29cbda6 100644 (file)
@@ -265,7 +265,7 @@ static int get_ucc_id_for_range(u64 start, u64 end, u32 *ucc_id)
 #endif
 
 
-static int fsl_pq_mdio_probe(struct of_device *ofdev,
+static int fsl_pq_mdio_probe(struct platform_device *ofdev,
                const struct of_device_id *match)
 {
        struct device_node *np = ofdev->dev.of_node;
@@ -425,7 +425,7 @@ err_free_priv:
 }
 
 
-static int fsl_pq_mdio_remove(struct of_device *ofdev)
+static int fsl_pq_mdio_remove(struct platform_device *ofdev)
 {
        struct device *device = &ofdev->dev;
        struct mii_bus *bus = dev_get_drvdata(device);
index a1b6301bc674be434560ee6f43954d53dd752631..4f7c3f3ca234634203c246d4e6494930de5f7247 100644 (file)
@@ -122,9 +122,9 @@ static irqreturn_t gfar_interrupt(int irq, void *dev_id);
 static void adjust_link(struct net_device *dev);
 static void init_registers(struct net_device *dev);
 static int init_phy(struct net_device *dev);
-static int gfar_probe(struct of_device *ofdev,
+static int gfar_probe(struct platform_device *ofdev,
                const struct of_device_id *match);
-static int gfar_remove(struct of_device *ofdev);
+static int gfar_remove(struct platform_device *ofdev);
 static void free_skb_resources(struct gfar_private *priv);
 static void gfar_set_multi(struct net_device *dev);
 static 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,
        return 0;
 }
 
-static int gfar_of_init(struct of_device *ofdev, struct net_device **pdev)
+static int gfar_of_init(struct platform_device *ofdev, struct net_device **pdev)
 {
        const char *model;
        const char *ctype;
@@ -959,7 +959,7 @@ static void gfar_detect_errata(struct gfar_private *priv)
 
 /* Set up the ethernet device structure, private data,
  * and anything else we need before we start */
-static int gfar_probe(struct of_device *ofdev,
+static int gfar_probe(struct platform_device *ofdev,
                const struct of_device_id *match)
 {
        u32 tempval;
@@ -1238,7 +1238,7 @@ register_fail:
        return err;
 }
 
-static int gfar_remove(struct of_device *ofdev)
+static int gfar_remove(struct platform_device *ofdev)
 {
        struct gfar_private *priv = dev_get_drvdata(&ofdev->dev);
 
index 710810e2adb4aedc86f9c96051a3ee76980970a7..68984eb88ae03ed519ca9ce8dfdcaa2df7f827a8 100644 (file)
@@ -1054,7 +1054,7 @@ struct gfar_private {
 
        struct device_node *node;
        struct net_device *ndev;
-       struct of_device *ofdev;
+       struct platform_device *ofdev;
        enum gfar_errata errata;
 
        struct gfar_priv_grp gfargrp[MAXGROUPS];
index 4d09eab3548e9d6c563ee06356d6b951ee5adb8c..9ec4b7f28ca40f8003b5a0147458fa0b9e6f6fec 100644 (file)
@@ -1373,7 +1373,7 @@ error:
 }
 
 /* Initialize the GRETH MAC */
-static int __devinit greth_of_probe(struct of_device *ofdev, const struct of_device_id *match)
+static int __devinit greth_of_probe(struct platform_device *ofdev, const struct of_device_id *match)
 {
        struct net_device *dev;
        struct greth_private *greth;
@@ -1572,7 +1572,7 @@ error1:
        return err;
 }
 
-static int __devexit greth_of_remove(struct of_device *of_dev)
+static int __devexit greth_of_remove(struct platform_device *of_dev)
 {
        struct net_device *ndev = dev_get_drvdata(&of_dev->dev);
        struct greth_private *greth = netdev_priv(ndev);
index 973388d6abca0a1be2b85738d6be87f6198be75e..03ad903cd676a1dd8f65e55a491aa8cb45c8956e 100644 (file)
@@ -118,7 +118,7 @@ struct greth_private {
 
        int irq;
 
-       struct device *dev;             /* Pointer to of_device->dev */
+       struct device *dev;             /* Pointer to platform_device->dev */
        struct net_device *netdev;
        struct napi_struct napi;
        spinlock_t devlock;
index eeec7bc2ce74bf9c472c9179f621d2e43930ece3..3506fd6ad7263be467b9128938b248bbaf3dd054 100644 (file)
@@ -2245,7 +2245,7 @@ static int emac_ioctl(struct net_device *ndev, struct ifreq *rq, int cmd)
 struct emac_depentry {
        u32                     phandle;
        struct device_node      *node;
-       struct of_device        *ofdev;
+       struct platform_device  *ofdev;
        void                    *drvdata;
 };
 
@@ -2719,7 +2719,7 @@ static const struct net_device_ops emac_gige_netdev_ops = {
        .ndo_change_mtu         = emac_change_mtu,
 };
 
-static int __devinit emac_probe(struct of_device *ofdev,
+static int __devinit emac_probe(struct platform_device *ofdev,
                                const struct of_device_id *match)
 {
        struct net_device *ndev;
@@ -2941,7 +2941,7 @@ static int __devinit emac_probe(struct of_device *ofdev,
        return err;
 }
 
-static int __devexit emac_remove(struct of_device *ofdev)
+static int __devexit emac_remove(struct platform_device *ofdev)
 {
        struct emac_instance *dev = dev_get_drvdata(&ofdev->dev);
 
index b1cbe6fdfc7a05802294c5bbcd8926aad4e0b7f4..9e37e3d9c51d778c072a5a7b417e6af743794944 100644 (file)
@@ -170,12 +170,12 @@ struct emac_instance {
        struct net_device               *ndev;
        struct resource                 rsrc_regs;
        struct emac_regs                __iomem *emacp;
-       struct of_device                *ofdev;
+       struct platform_device          *ofdev;
        struct device_node              **blist; /* bootlist entry */
 
        /* MAL linkage */
        u32                             mal_ph;
-       struct of_device                *mal_dev;
+       struct platform_device          *mal_dev;
        u32                             mal_rx_chan;
        u32                             mal_tx_chan;
        struct mal_instance             *mal;
@@ -196,24 +196,24 @@ struct emac_instance {
 
        /* Shared MDIO if any */
        u32                             mdio_ph;
-       struct of_device                *mdio_dev;
+       struct platform_device          *mdio_dev;
        struct emac_instance            *mdio_instance;
        struct mutex                    mdio_lock;
 
        /* ZMII infos if any */
        u32                             zmii_ph;
        u32                             zmii_port;
-       struct of_device                *zmii_dev;
+       struct platform_device          *zmii_dev;
 
        /* RGMII infos if any */
        u32                             rgmii_ph;
        u32                             rgmii_port;
-       struct of_device                *rgmii_dev;
+       struct platform_device          *rgmii_dev;
 
        /* TAH infos if any */
        u32                             tah_ph;
        u32                             tah_port;
-       struct of_device                *tah_dev;
+       struct platform_device          *tah_dev;
 
        /* IRQs */
        int                             wol_irq;
index fcff9e0bd3827396546398c5f5feb2cc4269c90f..d5717e2123e19d421259a66096f154fe862324ec 100644 (file)
@@ -517,7 +517,7 @@ void *mal_dump_regs(struct mal_instance *mal, void *buf)
        return regs + 1;
 }
 
-static int __devinit mal_probe(struct of_device *ofdev,
+static int __devinit mal_probe(struct platform_device *ofdev,
                               const struct of_device_id *match)
 {
        struct mal_instance *mal;
@@ -730,7 +730,7 @@ static int __devinit mal_probe(struct of_device *ofdev,
        return err;
 }
 
-static int __devexit mal_remove(struct of_device *ofdev)
+static int __devexit mal_remove(struct platform_device *ofdev)
 {
        struct mal_instance *mal = dev_get_drvdata(&ofdev->dev);
 
index 9ededfbf0726d3814e55e8c9fe44c003cef72c1d..66084214bf455ff56f0f4fae0c1110f84d99c502 100644 (file)
@@ -210,7 +210,7 @@ struct mal_instance {
        dma_addr_t              bd_dma;
        struct mal_descriptor   *bd_virt;
 
-       struct of_device        *ofdev;
+       struct platform_device  *ofdev;
        int                     index;
        spinlock_t              lock;
 
index 108919bcdf137959d9bb2b5957607132ebabb407..dd61798897ac97957598722fe6873770204c5f08 100644 (file)
@@ -93,7 +93,7 @@ static inline u32 rgmii_mode_mask(int mode, int input)
        }
 }
 
-int __devinit rgmii_attach(struct of_device *ofdev, int input, int mode)
+int __devinit rgmii_attach(struct platform_device *ofdev, int input, int mode)
 {
        struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev);
        struct rgmii_regs __iomem *p = dev->base;
@@ -122,7 +122,7 @@ int __devinit rgmii_attach(struct of_device *ofdev, int input, int mode)
        return 0;
 }
 
-void rgmii_set_speed(struct of_device *ofdev, int input, int speed)
+void rgmii_set_speed(struct platform_device *ofdev, int input, int speed)
 {
        struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev);
        struct rgmii_regs __iomem *p = dev->base;
@@ -144,7 +144,7 @@ void rgmii_set_speed(struct of_device *ofdev, int input, int speed)
        mutex_unlock(&dev->lock);
 }
 
-void rgmii_get_mdio(struct of_device *ofdev, int input)
+void rgmii_get_mdio(struct platform_device *ofdev, int input)
 {
        struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev);
        struct rgmii_regs __iomem *p = dev->base;
@@ -165,7 +165,7 @@ void rgmii_get_mdio(struct of_device *ofdev, int input)
        DBG2(dev, " fer = 0x%08x\n", fer);
 }
 
-void rgmii_put_mdio(struct of_device *ofdev, int input)
+void rgmii_put_mdio(struct platform_device *ofdev, int input)
 {
        struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev);
        struct rgmii_regs __iomem *p = dev->base;
@@ -186,7 +186,7 @@ void rgmii_put_mdio(struct of_device *ofdev, int input)
        mutex_unlock(&dev->lock);
 }
 
-void rgmii_detach(struct of_device *ofdev, int input)
+void rgmii_detach(struct platform_device *ofdev, int input)
 {
        struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev);
        struct rgmii_regs __iomem *p;
@@ -206,13 +206,13 @@ void rgmii_detach(struct of_device *ofdev, int input)
        mutex_unlock(&dev->lock);
 }
 
-int rgmii_get_regs_len(struct of_device *ofdev)
+int rgmii_get_regs_len(struct platform_device *ofdev)
 {
        return sizeof(struct emac_ethtool_regs_subhdr) +
                sizeof(struct rgmii_regs);
 }
 
-void *rgmii_dump_regs(struct of_device *ofdev, void *buf)
+void *rgmii_dump_regs(struct platform_device *ofdev, void *buf)
 {
        struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev);
        struct emac_ethtool_regs_subhdr *hdr = buf;
@@ -228,7 +228,7 @@ void *rgmii_dump_regs(struct of_device *ofdev, void *buf)
 }
 
 
-static int __devinit rgmii_probe(struct of_device *ofdev,
+static int __devinit rgmii_probe(struct platform_device *ofdev,
                                 const struct of_device_id *match)
 {
        struct device_node *np = ofdev->dev.of_node;
@@ -293,7 +293,7 @@ static int __devinit rgmii_probe(struct of_device *ofdev,
        return rc;
 }
 
-static int __devexit rgmii_remove(struct of_device *ofdev)
+static int __devexit rgmii_remove(struct platform_device *ofdev)
 {
        struct rgmii_instance *dev = dev_get_drvdata(&ofdev->dev);
 
index c4a4b358a2708e2281a7f5c46129412e37d3fb7a..d69799049865c9ab8c3861208ca201c5bbe14494 100644 (file)
@@ -51,20 +51,20 @@ struct rgmii_instance {
        int                             users;
 
        /* OF device instance */
-       struct of_device                *ofdev;
+       struct platform_device          *ofdev;
 };
 
 #ifdef CONFIG_IBM_NEW_EMAC_RGMII
 
 extern int rgmii_init(void);
 extern void rgmii_exit(void);
-extern int rgmii_attach(struct of_device *ofdev, int input, int mode);
-extern void rgmii_detach(struct of_device *ofdev, int input);
-extern void rgmii_get_mdio(struct of_device *ofdev, int input);
-extern void rgmii_put_mdio(struct of_device *ofdev, int input);
-extern void rgmii_set_speed(struct of_device *ofdev, int input, int speed);
-extern int rgmii_get_regs_len(struct of_device *ofdev);
-extern void *rgmii_dump_regs(struct of_device *ofdev, void *buf);
+extern int rgmii_attach(struct platform_device *ofdev, int input, int mode);
+extern void rgmii_detach(struct platform_device *ofdev, int input);
+extern void rgmii_get_mdio(struct platform_device *ofdev, int input);
+extern void rgmii_put_mdio(struct platform_device *ofdev, int input);
+extern void rgmii_set_speed(struct platform_device *ofdev, int input, int speed);
+extern int rgmii_get_regs_len(struct platform_device *ofdev);
+extern void *rgmii_dump_regs(struct platform_device *ofdev, void *buf);
 
 #else
 
index 044637144c4349b4291351fc38772b17f0355830..299aa49490c0cf239fda0f18d0e3a213edbb8c83 100644 (file)
@@ -23,7 +23,7 @@
 #include "emac.h"
 #include "core.h"
 
-int __devinit tah_attach(struct of_device *ofdev, int channel)
+int __devinit tah_attach(struct platform_device *ofdev, int channel)
 {
        struct tah_instance *dev = dev_get_drvdata(&ofdev->dev);
 
@@ -35,7 +35,7 @@ int __devinit tah_attach(struct of_device *ofdev, int channel)
        return 0;
 }
 
-void tah_detach(struct of_device *ofdev, int channel)
+void tah_detach(struct platform_device *ofdev, int channel)
 {
        struct tah_instance *dev = dev_get_drvdata(&ofdev->dev);
 
@@ -44,7 +44,7 @@ void tah_detach(struct of_device *ofdev, int channel)
        mutex_unlock(&dev->lock);
 }
 
-void tah_reset(struct of_device *ofdev)
+void tah_reset(struct platform_device *ofdev)
 {
        struct tah_instance *dev = dev_get_drvdata(&ofdev->dev);
        struct tah_regs __iomem *p = dev->base;
@@ -66,13 +66,13 @@ void tah_reset(struct of_device *ofdev)
                 TAH_MR_DIG);
 }
 
-int tah_get_regs_len(struct of_device *ofdev)
+int tah_get_regs_len(struct platform_device *ofdev)
 {
        return sizeof(struct emac_ethtool_regs_subhdr) +
                sizeof(struct tah_regs);
 }
 
-void *tah_dump_regs(struct of_device *ofdev, void *buf)
+void *tah_dump_regs(struct platform_device *ofdev, void *buf)
 {
        struct tah_instance *dev = dev_get_drvdata(&ofdev->dev);
        struct emac_ethtool_regs_subhdr *hdr = buf;
@@ -87,7 +87,7 @@ void *tah_dump_regs(struct of_device *ofdev, void *buf)
        return regs + 1;
 }
 
-static int __devinit tah_probe(struct of_device *ofdev,
+static int __devinit tah_probe(struct platform_device *ofdev,
                               const struct of_device_id *match)
 {
        struct device_node *np = ofdev->dev.of_node;
@@ -139,7 +139,7 @@ static int __devinit tah_probe(struct of_device *ofdev,
        return rc;
 }
 
-static int __devexit tah_remove(struct of_device *ofdev)
+static int __devexit tah_remove(struct platform_device *ofdev)
 {
        struct tah_instance *dev = dev_get_drvdata(&ofdev->dev);
 
index a068b5658dad5088464fa94f6abaaf92a1d0a1ee..61dbeca006d14707f0f66f7e37f4975f6b4eeabf 100644 (file)
@@ -48,7 +48,7 @@ struct tah_instance {
        int                             users;
 
        /* OF device instance */
-       struct of_device                *ofdev;
+       struct platform_device          *ofdev;
 };
 
 
@@ -74,11 +74,11 @@ struct tah_instance {
 
 extern int tah_init(void);
 extern void tah_exit(void);
-extern int tah_attach(struct of_device *ofdev, int channel);
-extern void tah_detach(struct of_device *ofdev, int channel);
-extern void tah_reset(struct of_device *ofdev);
-extern int tah_get_regs_len(struct of_device *ofdev);
-extern void *tah_dump_regs(struct of_device *ofdev, void *buf);
+extern int tah_attach(struct platform_device *ofdev, int channel);
+extern void tah_detach(struct platform_device *ofdev, int channel);
+extern void tah_reset(struct platform_device *ofdev);
+extern int tah_get_regs_len(struct platform_device *ofdev);
+extern void *tah_dump_regs(struct platform_device *ofdev, void *buf);
 
 #else
 
index 046dcd069c4556c2cddf68eb772577b3ca6e00ff..34ed6ee8ca8a415e43e3607791b4bc986d10016e 100644 (file)
@@ -82,7 +82,7 @@ static inline u32 zmii_mode_mask(int mode, int input)
        }
 }
 
-int __devinit zmii_attach(struct of_device *ofdev, int input, int *mode)
+int __devinit zmii_attach(struct platform_device *ofdev, int input, int *mode)
 {
        struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev);
        struct zmii_regs __iomem *p = dev->base;
@@ -148,7 +148,7 @@ int __devinit zmii_attach(struct of_device *ofdev, int input, int *mode)
        return 0;
 }
 
-void zmii_get_mdio(struct of_device *ofdev, int input)
+void zmii_get_mdio(struct platform_device *ofdev, int input)
 {
        struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev);
        u32 fer;
@@ -161,7 +161,7 @@ void zmii_get_mdio(struct of_device *ofdev, int input)
        out_be32(&dev->base->fer, fer | ZMII_FER_MDI(input));
 }
 
-void zmii_put_mdio(struct of_device *ofdev, int input)
+void zmii_put_mdio(struct platform_device *ofdev, int input)
 {
        struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev);
 
@@ -170,7 +170,7 @@ void zmii_put_mdio(struct of_device *ofdev, int input)
 }
 
 
-void zmii_set_speed(struct of_device *ofdev, int input, int speed)
+void zmii_set_speed(struct platform_device *ofdev, int input, int speed)
 {
        struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev);
        u32 ssr;
@@ -191,7 +191,7 @@ void zmii_set_speed(struct of_device *ofdev, int input, int speed)
        mutex_unlock(&dev->lock);
 }
 
-void zmii_detach(struct of_device *ofdev, int input)
+void zmii_detach(struct platform_device *ofdev, int input)
 {
        struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev);
 
@@ -210,13 +210,13 @@ void zmii_detach(struct of_device *ofdev, int input)
        mutex_unlock(&dev->lock);
 }
 
-int zmii_get_regs_len(struct of_device *ofdev)
+int zmii_get_regs_len(struct platform_device *ofdev)
 {
        return sizeof(struct emac_ethtool_regs_subhdr) +
                sizeof(struct zmii_regs);
 }
 
-void *zmii_dump_regs(struct of_device *ofdev, void *buf)
+void *zmii_dump_regs(struct platform_device *ofdev, void *buf)
 {
        struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev);
        struct emac_ethtool_regs_subhdr *hdr = buf;
@@ -231,7 +231,7 @@ void *zmii_dump_regs(struct of_device *ofdev, void *buf)
        return regs + 1;
 }
 
-static int __devinit zmii_probe(struct of_device *ofdev,
+static int __devinit zmii_probe(struct platform_device *ofdev,
                                const struct of_device_id *match)
 {
        struct device_node *np = ofdev->dev.of_node;
@@ -286,7 +286,7 @@ static int __devinit zmii_probe(struct of_device *ofdev,
        return rc;
 }
 
-static int __devexit zmii_remove(struct of_device *ofdev)
+static int __devexit zmii_remove(struct platform_device *ofdev)
 {
        struct zmii_instance *dev = dev_get_drvdata(&ofdev->dev);
 
index 6c9beba0c4b6d6a6a480ce2bad36f48863ce9732..1333fa2b278182d20eaa2b119959b8a4d935c2de 100644 (file)
@@ -48,20 +48,20 @@ struct zmii_instance {
        u32                             fer_save;
 
        /* OF device instance */
-       struct of_device                *ofdev;
+       struct platform_device          *ofdev;
 };
 
 #ifdef CONFIG_IBM_NEW_EMAC_ZMII
 
 extern int zmii_init(void);
 extern void zmii_exit(void);
-extern int zmii_attach(struct of_device *ofdev, int input, int *mode);
-extern void zmii_detach(struct of_device *ofdev, int input);
-extern void zmii_get_mdio(struct of_device *ofdev, int input);
-extern void zmii_put_mdio(struct of_device *ofdev, int input);
-extern void zmii_set_speed(struct of_device *ofdev, int input, int speed);
-extern int zmii_get_regs_len(struct of_device *ocpdev);
-extern void *zmii_dump_regs(struct of_device *ofdev, void *buf);
+extern int zmii_attach(struct platform_device *ofdev, int input, int *mode);
+extern void zmii_detach(struct platform_device *ofdev, int input);
+extern void zmii_get_mdio(struct platform_device *ofdev, int input);
+extern void zmii_put_mdio(struct platform_device *ofdev, int input);
+extern void zmii_set_speed(struct platform_device *ofdev, int input, int speed);
+extern int zmii_get_regs_len(struct platform_device *ocpdev);
+extern void *zmii_dump_regs(struct platform_device *ofdev, void *buf);
 
 #else
 # define zmii_init()           0
index 4eea3f70c5cf1865415b22b6464635af98858136..c7b624711f5ecfc51981845857bda27ef264fa3e 100644 (file)
@@ -159,7 +159,7 @@ static void temac_dma_dcr_out(struct temac_local *lp, int reg, u32 value)
  * temac_dcr_setup - If the DMA is DCR based, then setup the address and
  * I/O  functions
  */
-static int temac_dcr_setup(struct temac_local *lp, struct of_device *op,
+static int temac_dcr_setup(struct temac_local *lp, struct platform_device *op,
                                struct device_node *np)
 {
        unsigned int dcrs;
@@ -184,7 +184,7 @@ static int temac_dcr_setup(struct temac_local *lp, struct of_device *op,
  * temac_dcr_setup - This is a stub for when DCR is not supported,
  * such as with MicroBlaze
  */
-static int temac_dcr_setup(struct temac_local *lp, struct of_device *op,
+static int temac_dcr_setup(struct temac_local *lp, struct platform_device *op,
                                struct device_node *np)
 {
        return -1;
@@ -952,7 +952,7 @@ static const struct attribute_group temac_attr_group = {
 };
 
 static int __init
-temac_of_probe(struct of_device *op, const struct of_device_id *match)
+temac_of_probe(struct platform_device *op, const struct of_device_id *match)
 {
        struct device_node *np;
        struct temac_local *lp;
@@ -1094,7 +1094,7 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match)
        return rc;
 }
 
-static int __devexit temac_of_remove(struct of_device *op)
+static int __devexit temac_of_remove(struct platform_device *op)
 {
        struct net_device *ndev = dev_get_drvdata(&op->dev);
        struct temac_local *lp = netdev_priv(ndev);
index 04e552aa14ec40a756a4155cd787056ee86f5646..617f898ba5f017d1d3439a3e3ea63ed14f67db8f 100644 (file)
@@ -926,7 +926,7 @@ static const struct net_device_ops myri_ops = {
        .ndo_validate_addr      = eth_validate_addr,
 };
 
-static int __devinit myri_sbus_probe(struct of_device *op, const struct of_device_id *match)
+static int __devinit myri_sbus_probe(struct platform_device *op, const struct of_device_id *match)
 {
        struct device_node *dp = op->dev.of_node;
        static unsigned version_printed;
@@ -1124,7 +1124,7 @@ err:
        return -ENODEV;
 }
 
-static int __devexit myri_sbus_remove(struct of_device *op)
+static int __devexit myri_sbus_remove(struct platform_device *op)
 {
        struct myri_eth *mp = dev_get_drvdata(&op->dev);
        struct net_device *net_dev = mp->dev;
index ff363e95d9cfadd7504544904042f114d4041d57..80a2fa5cf7578279372e198ba28d914fd8967c45 100644 (file)
@@ -288,7 +288,7 @@ struct myri_eth {
        struct myri_eeprom              eeprom;         /* Local copy of EEPROM.      */
        unsigned int                    reg_size;       /* Size of register space.    */
        unsigned int                    shmem_base;     /* Offset to shared ram.      */
-       struct of_device                *myri_op;       /* Our OF device struct.    */
+       struct platform_device          *myri_op;       /* Our OF device struct.    */
 };
 
 /* We use this to acquire receive skb's that we can DMA directly into. */
index 404f2d552888c4b563472dacae939400de47d6b1..bc695d53cdccbcca3eb1c2ccb30018acb3c8bde6 100644 (file)
@@ -9103,7 +9103,7 @@ retry:
 static int __devinit niu_n2_irq_init(struct niu *np, u8 *ldg_num_map)
 {
 #ifdef CONFIG_SPARC64
-       struct of_device *op = np->op;
+       struct platform_device *op = np->op;
        const u32 *int_prop;
        int i;
 
@@ -9688,7 +9688,7 @@ static void __devinit niu_driver_version(void)
 
 static struct net_device * __devinit niu_alloc_and_init(
        struct device *gen_dev, struct pci_dev *pdev,
-       struct of_device *op, const struct niu_ops *ops,
+       struct platform_device *op, const struct niu_ops *ops,
        u8 port)
 {
        struct net_device *dev;
@@ -10064,7 +10064,7 @@ static const struct niu_ops niu_phys_ops = {
        .unmap_single   = niu_phys_unmap_single,
 };
 
-static int __devinit niu_of_probe(struct of_device *op,
+static int __devinit niu_of_probe(struct platform_device *op,
                                  const struct of_device_id *match)
 {
        union niu_parent_id parent_id;
@@ -10179,7 +10179,7 @@ err_out:
        return err;
 }
 
-static int __devexit niu_of_remove(struct of_device *op)
+static int __devexit niu_of_remove(struct platform_device *op)
 {
        struct net_device *dev = dev_get_drvdata(&op->dev);
 
index fc5fef2a81752c17249c66609923eddb5af046da..f62c7b717bc88e18a346da6d9390c612dacd5d44 100644 (file)
@@ -188,7 +188,7 @@ static int __devexit mdio_gpio_remove(struct platform_device *pdev)
 
 #ifdef CONFIG_OF_GPIO
 
-static int __devinit mdio_ofgpio_probe(struct of_device *ofdev,
+static int __devinit mdio_ofgpio_probe(struct platform_device *ofdev,
                                         const struct of_device_id *match)
 {
        struct mdio_gpio_platform_data *pdata;
@@ -224,7 +224,7 @@ out_free:
        return -ENODEV;
 }
 
-static int __devexit mdio_ofgpio_remove(struct of_device *ofdev)
+static int __devexit mdio_ofgpio_remove(struct platform_device *ofdev)
 {
        mdio_gpio_bus_destroy(&ofdev->dev);
        kfree(ofdev->dev.platform_data);
index 09c071bd6ad421cc5439d87b5727d1810089fe8b..618643e3ca3ed36b64cc405e352d21babb35599f 100644 (file)
@@ -97,7 +97,7 @@ static int qec_global_reset(void __iomem *gregs)
 
 static void qec_init(struct bigmac *bp)
 {
-       struct of_device *qec_op = bp->qec_op;
+       struct platform_device *qec_op = bp->qec_op;
        void __iomem *gregs = bp->gregs;
        u8 bsizes = bp->bigmac_bursts;
        u32 regval;
@@ -1083,8 +1083,8 @@ static const struct net_device_ops bigmac_ops = {
        .ndo_validate_addr      = eth_validate_addr,
 };
 
-static int __devinit bigmac_ether_init(struct of_device *op,
-                                      struct of_device *qec_op)
+static int __devinit bigmac_ether_init(struct platform_device *op,
+                                      struct platform_device *qec_op)
 {
        static int version_printed;
        struct net_device *dev;
@@ -1242,25 +1242,25 @@ fail_and_cleanup:
 /* QEC can be the parent of either QuadEthernet or a BigMAC.  We want
  * the latter.
  */
-static int __devinit bigmac_sbus_probe(struct of_device *op,
+static int __devinit bigmac_sbus_probe(struct platform_device *op,
                                       const struct of_device_id *match)
 {
        struct device *parent = op->dev.parent;
-       struct of_device *qec_op;
+       struct platform_device *qec_op;
 
-       qec_op = to_of_device(parent);
+       qec_op = to_platform_device(parent);
 
        return bigmac_ether_init(op, qec_op);
 }
 
-static int __devexit bigmac_sbus_remove(struct of_device *op)
+static int __devexit bigmac_sbus_remove(struct platform_device *op)
 {
        struct bigmac *bp = dev_get_drvdata(&op->dev);
        struct device *parent = op->dev.parent;
        struct net_device *net_dev = bp->dev;
-       struct of_device *qec_op;
+       struct platform_device *qec_op;
 
-       qec_op = to_of_device(parent);
+       qec_op = to_platform_device(parent);
 
        unregister_netdev(net_dev);
 
index 8840bc0b840b34e6e34817f3f9dc0d9d3b6d9ffa..8db88945b8899d83cb5dc2ab387d9d885a2810ba 100644 (file)
@@ -329,8 +329,8 @@ struct bigmac {
        unsigned int            timer_ticks;
 
        struct net_device_stats enet_stats;
-       struct of_device        *qec_op;
-       struct of_device        *bigmac_op;
+       struct platform_device  *qec_op;
+       struct platform_device  *bigmac_op;
        struct net_device       *dev;
 };
 
index eec443f640790ccde8def34cfd06bd6cf77a6700..bd0df1c1495587e9f6cf5f03ed85f98fbce5c2c7 100644 (file)
@@ -1591,7 +1591,7 @@ static int happy_meal_init(struct happy_meal *hp)
                 */
 #ifdef CONFIG_SBUS
                if ((hp->happy_flags & HFLAG_PCI) == 0) {
-                       struct of_device *op = hp->happy_dev;
+                       struct platform_device *op = hp->happy_dev;
                        if (sbus_can_dma_64bit()) {
                                sbus_set_sbus64(&op->dev,
                                                hp->happy_bursts);
@@ -2480,7 +2480,7 @@ static void hme_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info
 #ifdef CONFIG_SBUS
        else {
                const struct linux_prom_registers *regs;
-               struct of_device *op = hp->happy_dev;
+               struct platform_device *op = hp->happy_dev;
                regs = of_get_property(op->dev.of_node, "regs", NULL);
                if (regs)
                        sprintf(info->bus_info, "SBUS:%d",
@@ -2515,13 +2515,13 @@ static int hme_version_printed;
  *
  * Return NULL on failure.
  */
-static struct quattro * __devinit quattro_sbus_find(struct of_device *child)
+static struct quattro * __devinit quattro_sbus_find(struct platform_device *child)
 {
        struct device *parent = child->dev.parent;
-       struct of_device *op;
+       struct platform_device *op;
        struct quattro *qp;
 
-       op = to_of_device(parent);
+       op = to_platform_device(parent);
        qp = dev_get_drvdata(&op->dev);
        if (qp)
                return qp;
@@ -2551,7 +2551,7 @@ static int __init quattro_sbus_register_irqs(void)
        struct quattro *qp;
 
        for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) {
-               struct of_device *op = qp->quattro_dev;
+               struct platform_device *op = qp->quattro_dev;
                int err, qfe_slot, skip = 0;
 
                for (qfe_slot = 0; qfe_slot < 4; qfe_slot++) {
@@ -2580,7 +2580,7 @@ static void quattro_sbus_free_irqs(void)
        struct quattro *qp;
 
        for (qp = qfe_sbus_list; qp != NULL; qp = qp->next) {
-               struct of_device *op = qp->quattro_dev;
+               struct platform_device *op = qp->quattro_dev;
                int qfe_slot, skip = 0;
 
                for (qfe_slot = 0; qfe_slot < 4; qfe_slot++) {
@@ -2639,7 +2639,7 @@ static const struct net_device_ops hme_netdev_ops = {
 };
 
 #ifdef CONFIG_SBUS
-static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe)
+static int __devinit happy_meal_sbus_probe_one(struct platform_device *op, int is_qfe)
 {
        struct device_node *dp = op->dev.of_node, *sbus_dp;
        struct quattro *qp = NULL;
@@ -2648,7 +2648,7 @@ static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe)
        int i, qfe_slot = -1;
        int err = -ENODEV;
 
-       sbus_dp = to_of_device(op->dev.parent)->dev.of_node;
+       sbus_dp = op->dev.parent->of_node;
 
        /* We can match PCI devices too, do not accept those here. */
        if (strcmp(sbus_dp->name, "sbus"))
@@ -3235,7 +3235,7 @@ static void happy_meal_pci_exit(void)
 #endif
 
 #ifdef CONFIG_SBUS
-static int __devinit hme_sbus_probe(struct of_device *op, const struct of_device_id *match)
+static int __devinit hme_sbus_probe(struct platform_device *op, const struct of_device_id *match)
 {
        struct device_node *dp = op->dev.of_node;
        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
        return happy_meal_sbus_probe_one(op, is_qfe);
 }
 
-static int __devexit hme_sbus_remove(struct of_device *op)
+static int __devexit hme_sbus_remove(struct platform_device *op)
 {
        struct happy_meal *hp = dev_get_drvdata(&op->dev);
        struct net_device *net_dev = hp->dev;
index efd2ca0fcad30d85362d9f0d1e2412ab49b5e7fc..756b5bf3aa89b40a6c40530e61c929a269ed05c9 100644 (file)
@@ -407,7 +407,7 @@ struct happy_meal {
        void (*write_rxd)(struct happy_meal_rxd *, u32, u32);
 #endif
 
-       /* This is either an of_device or a pci_dev. */
+       /* This is either an platform_device or a pci_dev. */
        void                      *happy_dev;
        struct device             *dma_dev;
 
index ee364fa756342686d12618775790ea37a97f6e49..8dcb858f216859c600a8c251ac5d714bc938976b 100644 (file)
@@ -250,7 +250,7 @@ struct lance_private {
        int             rx_new, tx_new;
        int             rx_old, tx_old;
 
-       struct of_device *ledma;        /* If set this points to ledma  */
+       struct platform_device *ledma;  /* If set this points to ledma  */
        char            tpe;            /* cable-selection is TPE       */
        char            auto_select;    /* cable-selection by carrier   */
        char            burst_sizes;    /* ledma SBus burst sizes       */
@@ -265,8 +265,8 @@ struct lance_private {
        char                   *name;
        dma_addr_t              init_block_dvma;
        struct net_device      *dev;              /* Backpointer        */
-       struct of_device       *op;
-       struct of_device       *lebuffer;
+       struct platform_device       *op;
+       struct platform_device       *lebuffer;
        struct timer_list       multicast_timer;
 };
 
@@ -1272,7 +1272,7 @@ static void lance_free_hwresources(struct lance_private *lp)
        if (lp->lregs)
                of_iounmap(&lp->op->resource[0], lp->lregs, LANCE_REG_SIZE);
        if (lp->dregs) {
-               struct of_device *ledma = lp->ledma;
+               struct platform_device *ledma = lp->ledma;
 
                of_iounmap(&ledma->resource[0], lp->dregs,
                           resource_size(&ledma->resource[0]));
@@ -1319,9 +1319,9 @@ static const struct net_device_ops sparc_lance_ops = {
        .ndo_validate_addr      = eth_validate_addr,
 };
 
-static int __devinit sparc_lance_probe_one(struct of_device *op,
-                                          struct of_device *ledma,
-                                          struct of_device *lebuffer)
+static int __devinit sparc_lance_probe_one(struct platform_device *op,
+                                          struct platform_device *ledma,
+                                          struct platform_device *lebuffer)
 {
        struct device_node *dp = op->dev.of_node;
        static unsigned version_printed;
@@ -1503,9 +1503,9 @@ fail:
        return -ENODEV;
 }
 
-static int __devinit sunlance_sbus_probe(struct of_device *op, const struct of_device_id *match)
+static int __devinit sunlance_sbus_probe(struct platform_device *op, const struct of_device_id *match)
 {
-       struct of_device *parent = to_of_device(op->dev.parent);
+       struct platform_device *parent = to_platform_device(op->dev.parent);
        struct device_node *parent_dp = parent->dev.of_node;
        int err;
 
@@ -1519,7 +1519,7 @@ static int __devinit sunlance_sbus_probe(struct of_device *op, const struct of_d
        return err;
 }
 
-static int __devexit sunlance_sbus_remove(struct of_device *op)
+static int __devexit sunlance_sbus_remove(struct platform_device *op)
 {
        struct lance_private *lp = dev_get_drvdata(&op->dev);
        struct net_device *net_dev = lp->dev;
index 5f84a5dadeddd90feca5e72221506c001c416314..72e65d4666ef2e09bfc86c369860e12c3018fc31 100644 (file)
@@ -689,7 +689,7 @@ static void qe_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
 {
        const struct linux_prom_registers *regs;
        struct sunqe *qep = netdev_priv(dev);
-       struct of_device *op;
+       struct platform_device *op;
 
        strcpy(info->driver, "sunqe");
        strcpy(info->version, "3.0");
@@ -720,7 +720,7 @@ static const struct ethtool_ops qe_ethtool_ops = {
 };
 
 /* This is only called once at boot time for each card probed. */
-static void qec_init_once(struct sunqec *qecp, struct of_device *op)
+static void qec_init_once(struct sunqec *qecp, struct platform_device *op)
 {
        u8 bsizes = qecp->qec_bursts;
 
@@ -770,9 +770,9 @@ static u8 __devinit qec_get_burst(struct device_node *dp)
        return bsizes;
 }
 
-static struct sunqec * __devinit get_qec(struct of_device *child)
+static struct sunqec * __devinit get_qec(struct platform_device *child)
 {
-       struct of_device *op = to_of_device(child->dev.parent);
+       struct platform_device *op = to_platform_device(child->dev.parent);
        struct sunqec *qecp;
 
        qecp = dev_get_drvdata(&op->dev);
@@ -836,7 +836,7 @@ static const struct net_device_ops qec_ops = {
        .ndo_validate_addr      = eth_validate_addr,
 };
 
-static int __devinit qec_ether_init(struct of_device *op)
+static int __devinit qec_ether_init(struct platform_device *op)
 {
        static unsigned version_printed;
        struct net_device *dev;
@@ -941,12 +941,12 @@ fail:
        return res;
 }
 
-static int __devinit qec_sbus_probe(struct of_device *op, const struct of_device_id *match)
+static int __devinit qec_sbus_probe(struct platform_device *op, const struct of_device_id *match)
 {
        return qec_ether_init(op);
 }
 
-static int __devexit qec_sbus_remove(struct of_device *op)
+static int __devexit qec_sbus_remove(struct platform_device *op)
 {
        struct sunqe *qp = dev_get_drvdata(&op->dev);
        struct net_device *net_dev = qp->dev;
@@ -997,7 +997,7 @@ static void __exit qec_exit(void)
 
        while (root_qec_dev) {
                struct sunqec *next = root_qec_dev->next_module;
-               struct of_device *op = root_qec_dev->op;
+               struct platform_device *op = root_qec_dev->op;
 
                free_irq(op->archdata.irqs[0], (void *) root_qec_dev);
                of_iounmap(&op->resource[0], root_qec_dev->gregs,
index 5813a7b2faa5692eb935c7387393771daa3b672b..581781b6b2fac9d6bfb4bfae9735d674f6d46eec 100644 (file)
@@ -314,7 +314,7 @@ struct sunqec {
        void __iomem            *gregs;         /* QEC Global Registers         */
        struct sunqe            *qes[4];        /* Each child MACE              */
        unsigned int            qec_bursts;     /* Support burst sizes          */
-       struct of_device        *op;            /* QEC's OF device              */
+       struct platform_device  *op;            /* QEC's OF device              */
        struct sunqec           *next_module;   /* List of all QECs in system   */
 };
 
@@ -342,7 +342,7 @@ struct sunqe {
        __u32                           buffers_dvma;   /* DVMA visible address.       */
        struct sunqec                   *parent;
        u8                              mconfig;        /* Base MACE mconfig value     */
-       struct of_device                *op;            /* QE's OF device struct       */
+       struct platform_device          *op;            /* QE's OF device struct       */
        struct net_device               *dev;           /* QE's netdevice struct       */
        int                             channel;        /* Who am I?                   */
 };
index 8d532f9b50d073069bbcb109b10767f7c3c09395..a4c3f5708246e9038ac716c4b8e9b7b06abeb28e 100644 (file)
@@ -3601,7 +3601,7 @@ static void ucc_geth_timeout(struct net_device *dev)
 
 #ifdef CONFIG_PM
 
-static int ucc_geth_suspend(struct of_device *ofdev, pm_message_t state)
+static int ucc_geth_suspend(struct platform_device *ofdev, pm_message_t state)
 {
        struct net_device *ndev = dev_get_drvdata(&ofdev->dev);
        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)
        return 0;
 }
 
-static int ucc_geth_resume(struct of_device *ofdev)
+static int ucc_geth_resume(struct platform_device *ofdev)
 {
        struct net_device *ndev = dev_get_drvdata(&ofdev->dev);
        struct ucc_geth_private *ugeth = netdev_priv(ndev);
@@ -3732,7 +3732,7 @@ static const struct net_device_ops ucc_geth_netdev_ops = {
 #endif
 };
 
-static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *match)
+static int ucc_geth_probe(struct platform_device* ofdev, const struct of_device_id *match)
 {
        struct device *device = &ofdev->dev;
        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
        return 0;
 }
 
-static int ucc_geth_remove(struct of_device* ofdev)
+static int ucc_geth_remove(struct platform_device* ofdev)
 {
        struct device *device = &ofdev->dev;
        struct net_device *dev = dev_get_drvdata(device);
index b2c2f391b29db5e025e94381e8d5f97438ff1fc8..ecbbb688eba08a1b337447a406284c5fd42d7fe2 100644 (file)
@@ -1086,7 +1086,7 @@ static void xemaclite_remove_ndev(struct net_device *ndev)
  *
  * Return:     Value of the parameter if the parameter is found, or 0 otherwise
  */
-static bool get_bool(struct of_device *ofdev, const char *s)
+static bool get_bool(struct platform_device *ofdev, const char *s)
 {
        u32 *p = (u32 *)of_get_property(ofdev->dev.of_node, s, NULL);
 
@@ -1115,7 +1115,7 @@ static struct net_device_ops xemaclite_netdev_ops;
  * Return:     0, if the driver is bound to the Emaclite device, or
  *             a negative error if there is failure.
  */
-static int __devinit xemaclite_of_probe(struct of_device *ofdev,
+static int __devinit xemaclite_of_probe(struct platform_device *ofdev,
                                        const struct of_device_id *match)
 {
        struct resource r_irq; /* Interrupt resources */
@@ -1240,7 +1240,7 @@ error2:
  *
  * Return:     0, always.
  */
-static int __devexit xemaclite_of_remove(struct of_device *of_dev)
+static int __devexit xemaclite_of_remove(struct platform_device *of_dev)
 {
        struct device *dev = &of_dev->dev;
        struct net_device *ndev = dev_get_drvdata(dev);
index 0d8a0644f54018810129479244c975be57f2c34c..92de0eb74aea9ebfb5825129d8dcd38b2e3bb232 100644 (file)
@@ -14,7 +14,7 @@
  * @ids: array of of device match structures to search in
  * @dev: the of device structure to match against
  *
- * Used by a driver to check whether an of_device present in the
+ * Used by a driver to check whether an platform_device present in the
  * system is in its list of supported devices.
  */
 const struct of_device_id *of_match_device(const struct of_device_id *matches,
index 210a6441a0662c08953b510d813ef15af8c865ac..55ba118f1cf12aeef1de93981b2ecec7bfafcb74 100644 (file)
@@ -286,7 +286,7 @@ static struct parport_operations parport_sunbpp_ops =
        .owner          = THIS_MODULE,
 };
 
-static int __devinit bpp_probe(struct of_device *op, const struct of_device_id *match)
+static int __devinit bpp_probe(struct platform_device *op, const struct of_device_id *match)
 {
        struct parport_operations *ops;
        struct bpp_regs __iomem *regs;
@@ -351,7 +351,7 @@ out_unmap:
        return err;
 }
 
-static int __devexit bpp_remove(struct of_device *op)
+static int __devexit bpp_remove(struct platform_device *op)
 {
        struct parport *p = dev_get_drvdata(&op->dev);
        struct parport_operations *ops = p->ops;
index f94d8281cfb04df3fd06582c61e1e2f654c877dd..546d3024b6f01f07c8cf1315e964cb855f6d0baf 100644 (file)
@@ -44,7 +44,7 @@ struct electra_cf_socket {
        unsigned                present:1;
        unsigned                active:1;
 
-       struct of_device        *ofdev;
+       struct platform_device  *ofdev;
        unsigned long           mem_phys;
        void __iomem *          mem_base;
        unsigned long           mem_size;
@@ -181,7 +181,7 @@ static struct pccard_operations electra_cf_ops = {
        .set_mem_map            = electra_cf_set_mem_map,
 };
 
-static int __devinit electra_cf_probe(struct of_device *ofdev,
+static int __devinit electra_cf_probe(struct platform_device *ofdev,
                                      const struct of_device_id *match)
 {
        struct device *device = &ofdev->dev;
@@ -325,7 +325,7 @@ fail1:
 
 }
 
-static int __devexit electra_cf_remove(struct of_device *ofdev)
+static int __devexit electra_cf_remove(struct platform_device *ofdev)
 {
        struct device *device = &ofdev->dev;
        struct electra_cf_socket *cf;
index 25e5e30a18afdd6bafaae72e1c06314f42c9efb0..84a70a59ef95fdf16dba44962d871abedad6d0af 100644 (file)
@@ -1150,7 +1150,7 @@ static struct pccard_operations m8xx_services = {
        .set_mem_map = m8xx_set_mem_map,
 };
 
-static int __init m8xx_probe(struct of_device *ofdev,
+static int __init m8xx_probe(struct platform_device *ofdev,
                             const struct of_device_id *match)
 {
        struct pcmcia_win *w;
@@ -1250,7 +1250,7 @@ static int __init m8xx_probe(struct of_device *ofdev,
        return 0;
 }
 
-static int m8xx_remove(struct of_device *ofdev)
+static int m8xx_remove(struct platform_device *ofdev)
 {
        u32 m, i;
        struct pcmcia_win *w;
index db5d8c416d26a18e6fdb141c3bfa1d7c106e18d9..dfcdf0901d21e74ec4995d7b957fba2675a00537 100644 (file)
@@ -268,7 +268,7 @@ static const struct rtc_class_ops mpc5121_rtc_ops = {
        .update_irq_enable = mpc5121_rtc_update_irq_enable,
 };
 
-static int __devinit mpc5121_rtc_probe(struct of_device *op,
+static int __devinit mpc5121_rtc_probe(struct platform_device *op,
                                        const struct of_device_id *match)
 {
        struct mpc5121_rtc_data *rtc;
@@ -338,7 +338,7 @@ out_free:
        return err;
 }
 
-static int __devexit mpc5121_rtc_remove(struct of_device *op)
+static int __devexit mpc5121_rtc_remove(struct platform_device *op)
 {
        struct mpc5121_rtc_data *rtc = dev_get_drvdata(&op->dev);
        struct mpc5121_rtc_regs __iomem *regs = rtc->regs;
index 103fdf6b0b89650cc207f3d24f8b5ceb116cc709..160e7510aca694913e407e03dd2bb1408c6cf0b7 100644 (file)
@@ -443,7 +443,7 @@ static int kenvctrld(void *__unused)
        return 0;
 }
 
-static void attach_one_temp(struct bbc_i2c_bus *bp, struct of_device *op,
+static void attach_one_temp(struct bbc_i2c_bus *bp, struct platform_device *op,
                            int temp_idx)
 {
        struct bbc_cpu_temperature *tp;
@@ -488,7 +488,7 @@ static void attach_one_temp(struct bbc_i2c_bus *bp, struct of_device *op,
        tp->fan_todo[FAN_CPU] = FAN_SAME;
 }
 
-static void attach_one_fan(struct bbc_i2c_bus *bp, struct of_device *op,
+static void attach_one_fan(struct bbc_i2c_bus *bp, struct platform_device *op,
                           int fan_idx)
 {
        struct bbc_fan_control *fp;
@@ -559,7 +559,7 @@ static void destroy_all_fans(struct bbc_i2c_bus *bp)
 
 int bbc_envctrl_init(struct bbc_i2c_bus *bp)
 {
-       struct of_device *op;
+       struct platform_device *op;
        int temp_index = 0;
        int fan_index = 0;
        int devidx = 0;
index 3e89c313e98dddeab4b405a70007eb98aee4be31..614a5e114a19a1f37eed1d4ab2ea1e510300c6b7 100644 (file)
@@ -51,7 +51,7 @@
  * The second controller also connects to the smartcard reader, if present.
  */
 
-static void set_device_claimage(struct bbc_i2c_bus *bp, struct of_device *op, int val)
+static void set_device_claimage(struct bbc_i2c_bus *bp, struct platform_device *op, int val)
 {
        int i;
 
@@ -66,9 +66,9 @@ static void set_device_claimage(struct bbc_i2c_bus *bp, struct of_device *op, in
 #define claim_device(BP,ECHILD)                set_device_claimage(BP,ECHILD,1)
 #define release_device(BP,ECHILD)      set_device_claimage(BP,ECHILD,0)
 
-struct of_device *bbc_i2c_getdev(struct bbc_i2c_bus *bp, int index)
+struct platform_device *bbc_i2c_getdev(struct bbc_i2c_bus *bp, int index)
 {
-       struct of_device *op = NULL;
+       struct platform_device *op = NULL;
        int curidx = 0, i;
 
        for (i = 0; i < NUM_CHILDREN; i++) {
@@ -86,7 +86,7 @@ out:
        return NULL;
 }
 
-struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct of_device *op)
+struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct platform_device *op)
 {
        struct bbc_i2c_client *client;
        const u32 *reg;
@@ -114,7 +114,7 @@ struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct of_device *
 void bbc_i2c_detach(struct bbc_i2c_client *client)
 {
        struct bbc_i2c_bus *bp = client->bp;
-       struct of_device *op = client->op;
+       struct platform_device *op = client->op;
 
        release_device(bp, op);
        kfree(client);
@@ -297,7 +297,7 @@ static void __init reset_one_i2c(struct bbc_i2c_bus *bp)
        writeb(I2C_PCF_IDLE, bp->i2c_control_regs + 0x0);
 }
 
-static struct bbc_i2c_bus * __init attach_one_i2c(struct of_device *op, int index)
+static struct bbc_i2c_bus * __init attach_one_i2c(struct platform_device *op, int index)
 {
        struct bbc_i2c_bus *bp;
        struct device_node *dp;
@@ -330,7 +330,7 @@ static struct bbc_i2c_bus * __init attach_one_i2c(struct of_device *op, int inde
        for (dp = op->dev.of_node->child;
             dp && entry < 8;
             dp = dp->sibling, entry++) {
-               struct of_device *child_op;
+               struct platform_device *child_op;
 
                child_op = of_find_device_by_node(dp);
                bp->devs[entry].device = child_op;
@@ -361,7 +361,7 @@ fail:
 extern int bbc_envctrl_init(struct bbc_i2c_bus *bp);
 extern void bbc_envctrl_cleanup(struct bbc_i2c_bus *bp);
 
-static int __devinit bbc_i2c_probe(struct of_device *op,
+static int __devinit bbc_i2c_probe(struct platform_device *op,
                                   const struct of_device_id *match)
 {
        struct bbc_i2c_bus *bp;
@@ -386,7 +386,7 @@ static int __devinit bbc_i2c_probe(struct of_device *op,
        return err;
 }
 
-static int __devexit bbc_i2c_remove(struct of_device *op)
+static int __devexit bbc_i2c_remove(struct platform_device *op)
 {
        struct bbc_i2c_bus *bp = dev_get_drvdata(&op->dev);
 
index 83c4811b7b5e5badda8ff5cb02966db8d4bf24f4..4b4531066e75a4dd68380abe28d019c2caed2b24 100644 (file)
@@ -7,7 +7,7 @@
 
 struct bbc_i2c_client {
        struct bbc_i2c_bus              *bp;
-       struct of_device                *op;
+       struct platform_device          *op;
        int                             bus;
        int                             address;
 };
@@ -64,16 +64,16 @@ struct bbc_i2c_bus {
        struct list_head                temps;
        struct list_head                fans;
 
-       struct of_device                *op;
+       struct platform_device          *op;
        struct {
-               struct of_device        *device;
+               struct platform_device  *device;
                int                     client_claimed;
        } devs[NUM_CHILDREN];
 };
 
 /* Probing and attachment. */
-extern struct of_device *bbc_i2c_getdev(struct bbc_i2c_bus *, int);
-extern struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct of_device *);
+extern struct platform_device *bbc_i2c_getdev(struct bbc_i2c_bus *, int);
+extern struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct platform_device *);
 extern void bbc_i2c_detach(struct bbc_i2c_client *);
 
 /* Register read/write.  NOTE: Blocking! */
index 47db97583ea7085ff1c74b6774eaa7a3be174c69..1690e53fb84a80e220f32a1cfb0f066b2f47282e 100644 (file)
@@ -170,7 +170,7 @@ static struct miscdevice d7s_miscdev = {
        .fops           = &d7s_fops
 };
 
-static int __devinit d7s_probe(struct of_device *op,
+static int __devinit d7s_probe(struct platform_device *op,
                               const struct of_device_id *match)
 {
        struct device_node *opts;
@@ -236,7 +236,7 @@ out_free:
        goto out;
 }
 
-static int __devexit d7s_remove(struct of_device *op)
+static int __devexit d7s_remove(struct platform_device *op)
 {
        struct d7s *p = dev_get_drvdata(&op->dev);
        u8 regs = readb(p->regs);
index 3c27f45e2b6dd281fca4334cd1a11929ac7d7555..078e5f4520effe3a9e75c3249495574c1de0dff8 100644 (file)
@@ -1027,7 +1027,7 @@ static int kenvctrld(void *__unused)
        return 0;
 }
 
-static int __devinit envctrl_probe(struct of_device *op,
+static int __devinit envctrl_probe(struct platform_device *op,
                                   const struct of_device_id *match)
 {
        struct device_node *dp;
@@ -1104,7 +1104,7 @@ out_iounmap:
        return err;
 }
 
-static int __devexit envctrl_remove(struct of_device *op)
+static int __devexit envctrl_remove(struct platform_device *op)
 {
        int index;
 
index 8bb31c584b64f4bd2dd82a365ebe882cf4404bee..2b4b4b613c48b1b3a0153653e808e865f782d479 100644 (file)
@@ -160,7 +160,7 @@ static const struct file_operations flash_fops = {
 
 static struct miscdevice flash_dev = { FLASH_MINOR, "flash", &flash_fops };
 
-static int __devinit flash_probe(struct of_device *op,
+static int __devinit flash_probe(struct platform_device *op,
                                 const struct of_device_id *match)
 {
        struct device_node *dp = op->dev.of_node;
@@ -192,7 +192,7 @@ static int __devinit flash_probe(struct of_device *op,
        return misc_register(&flash_dev);
 }
 
-static int __devexit flash_remove(struct of_device *op)
+static int __devexit flash_remove(struct platform_device *op)
 {
        misc_deregister(&flash_dev);
 
index 41eb6725ff5f21395829ebebebcece995fc92d1c..1b345be5cc02d184928a6efda53a2639741261c6 100644 (file)
@@ -348,7 +348,7 @@ static void uctrl_get_external_status(struct uctrl_driver *driver)
        
 }
 
-static int __devinit uctrl_probe(struct of_device *op,
+static int __devinit uctrl_probe(struct platform_device *op,
                                 const struct of_device_id *match)
 {
        struct uctrl_driver *p;
@@ -404,7 +404,7 @@ out_free:
        goto out;
 }
 
-static int __devexit uctrl_remove(struct of_device *op)
+static int __devexit uctrl_remove(struct platform_device *op)
 {
        struct uctrl_driver *p = dev_get_drvdata(&op->dev);
 
index 53d7ed0dc169b24c8e4350418817fc7c61819c55..f8c561cf751e46aa62e841a5e1d35920c3f6ecf1 100644 (file)
@@ -704,7 +704,7 @@ static void __devexit qpti_chain_del(struct qlogicpti *qpti)
 
 static int __devinit qpti_map_regs(struct qlogicpti *qpti)
 {
-       struct of_device *op = qpti->op;
+       struct platform_device *op = qpti->op;
 
        qpti->qregs = of_ioremap(&op->resource[0], 0,
                                 resource_size(&op->resource[0]),
@@ -727,7 +727,7 @@ static int __devinit qpti_map_regs(struct qlogicpti *qpti)
 
 static int __devinit qpti_register_irq(struct qlogicpti *qpti)
 {
-       struct of_device *op = qpti->op;
+       struct platform_device *op = qpti->op;
 
        qpti->qhost->irq = qpti->irq = op->archdata.irqs[0];
 
@@ -752,7 +752,7 @@ fail:
 
 static void __devinit qpti_get_scsi_id(struct qlogicpti *qpti)
 {
-       struct of_device *op = qpti->op;
+       struct platform_device *op = qpti->op;
        struct device_node *dp;
 
        dp = op->dev.of_node;
@@ -773,7 +773,7 @@ static void __devinit qpti_get_scsi_id(struct qlogicpti *qpti)
 
 static void qpti_get_bursts(struct qlogicpti *qpti)
 {
-       struct of_device *op = qpti->op;
+       struct platform_device *op = qpti->op;
        u8 bursts, bmask;
 
        bursts = of_getintprop_default(op->dev.of_node, "burst-sizes", 0xff);
@@ -806,7 +806,7 @@ static void qpti_get_clock(struct qlogicpti *qpti)
  */
 static int __devinit qpti_map_queues(struct qlogicpti *qpti)
 {
-       struct of_device *op = qpti->op;
+       struct platform_device *op = qpti->op;
 
 #define QSIZE(entries) (((entries) + 1) * QUEUE_ENTRY_LEN)
        qpti->res_cpu = dma_alloc_coherent(&op->dev,
@@ -1290,7 +1290,7 @@ static struct scsi_host_template qpti_template = {
        .use_clustering         = ENABLE_CLUSTERING,
 };
 
-static int __devinit qpti_sbus_probe(struct of_device *op, const struct of_device_id *match)
+static int __devinit qpti_sbus_probe(struct platform_device *op, const struct of_device_id *match)
 {
        struct scsi_host_template *tpnt = match->data;
        struct device_node *dp = op->dev.of_node;
@@ -1401,7 +1401,7 @@ fail_unlink:
        return -ENODEV;
 }
 
-static int __devexit qpti_sbus_remove(struct of_device *op)
+static int __devexit qpti_sbus_remove(struct platform_device *op)
 {
        struct qlogicpti *qpti = dev_get_drvdata(&op->dev);
 
index e3c74d1ee2db31e513fb33ff67a4a112354cb275..4377e87ee79c360c4bb797b4a93df405b02c1f00 100644 (file)
@@ -342,7 +342,7 @@ struct qlogicpti {
        u_int                     req_in_ptr;           /* index of next request slot */
        u_int                     res_out_ptr;          /* index of next result slot  */
        long                      send_marker;          /* must we send a marker?     */
-       struct of_device         *op;
+       struct platform_device   *op;
        unsigned long             __pad;
 
        int                       cmd_count[MAX_TARGETS];
index 89ba6fe02f80e3e7f9c249ec10f7155b5e13ac4a..193b37ba18344bb6e26a138bbd3e52ff9222fb64 100644 (file)
@@ -44,7 +44,7 @@ enum dvma_rev {
 };
 
 static int __devinit esp_sbus_setup_dma(struct esp *esp,
-                                       struct of_device *dma_of)
+                                       struct platform_device *dma_of)
 {
        esp->dma = dma_of;
 
@@ -81,7 +81,7 @@ static int __devinit esp_sbus_setup_dma(struct esp *esp,
 
 static int __devinit esp_sbus_map_regs(struct esp *esp, int hme)
 {
-       struct of_device *op = esp->dev;
+       struct platform_device *op = esp->dev;
        struct resource *res;
 
        /* 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)
 
 static int __devinit esp_sbus_map_command_block(struct esp *esp)
 {
-       struct of_device *op = esp->dev;
+       struct platform_device *op = esp->dev;
 
        esp->command_block = dma_alloc_coherent(&op->dev, 16,
                                                &esp->command_block_dma,
@@ -114,15 +114,15 @@ static int __devinit esp_sbus_map_command_block(struct esp *esp)
 static int __devinit esp_sbus_register_irq(struct esp *esp)
 {
        struct Scsi_Host *host = esp->host;
-       struct of_device *op = esp->dev;
+       struct platform_device *op = esp->dev;
 
        host->irq = op->archdata.irqs[0];
        return request_irq(host->irq, scsi_esp_intr, IRQF_SHARED, "ESP", esp);
 }
 
-static void __devinit esp_get_scsi_id(struct esp *esp, struct of_device *espdma)
+static void __devinit esp_get_scsi_id(struct esp *esp, struct platform_device *espdma)
 {
-       struct of_device *op = esp->dev;
+       struct platform_device *op = esp->dev;
        struct device_node *dp;
 
        dp = op->dev.of_node;
@@ -144,7 +144,7 @@ done:
 
 static void __devinit esp_get_differential(struct esp *esp)
 {
-       struct of_device *op = esp->dev;
+       struct platform_device *op = esp->dev;
        struct device_node *dp;
 
        dp = op->dev.of_node;
@@ -156,7 +156,7 @@ static void __devinit esp_get_differential(struct esp *esp)
 
 static void __devinit esp_get_clock_params(struct esp *esp)
 {
-       struct of_device *op = esp->dev;
+       struct platform_device *op = esp->dev;
        struct device_node *bus_dp, *dp;
        int fmhz;
 
@@ -170,10 +170,10 @@ static void __devinit esp_get_clock_params(struct esp *esp)
        esp->cfreq = fmhz;
 }
 
-static void __devinit esp_get_bursts(struct esp *esp, struct of_device *dma_of)
+static void __devinit esp_get_bursts(struct esp *esp, struct platform_device *dma_of)
 {
        struct device_node *dma_dp = dma_of->dev.of_node;
-       struct of_device *op = esp->dev;
+       struct platform_device *op = esp->dev;
        struct device_node *dp;
        u8 bursts, val;
 
@@ -195,7 +195,7 @@ static void __devinit esp_get_bursts(struct esp *esp, struct of_device *dma_of)
        esp->bursts = bursts;
 }
 
-static void __devinit esp_sbus_get_props(struct esp *esp, struct of_device *espdma)
+static void __devinit esp_sbus_get_props(struct esp *esp, struct platform_device *espdma)
 {
        esp_get_scsi_id(esp, espdma);
        esp_get_differential(esp);
@@ -216,7 +216,7 @@ static u8 sbus_esp_read8(struct esp *esp, unsigned long reg)
 static dma_addr_t sbus_esp_map_single(struct esp *esp, void *buf,
                                      size_t sz, int dir)
 {
-       struct of_device *op = esp->dev;
+       struct platform_device *op = esp->dev;
 
        return dma_map_single(&op->dev, buf, sz, dir);
 }
@@ -224,7 +224,7 @@ static dma_addr_t sbus_esp_map_single(struct esp *esp, void *buf,
 static int sbus_esp_map_sg(struct esp *esp, struct scatterlist *sg,
                                  int num_sg, int dir)
 {
-       struct of_device *op = esp->dev;
+       struct platform_device *op = esp->dev;
 
        return dma_map_sg(&op->dev, sg, num_sg, dir);
 }
@@ -232,7 +232,7 @@ static int sbus_esp_map_sg(struct esp *esp, struct scatterlist *sg,
 static void sbus_esp_unmap_single(struct esp *esp, dma_addr_t addr,
                                  size_t sz, int dir)
 {
-       struct of_device *op = esp->dev;
+       struct platform_device *op = esp->dev;
 
        dma_unmap_single(&op->dev, addr, sz, dir);
 }
@@ -240,7 +240,7 @@ static void sbus_esp_unmap_single(struct esp *esp, dma_addr_t addr,
 static void sbus_esp_unmap_sg(struct esp *esp, struct scatterlist *sg,
                              int num_sg, int dir)
 {
-       struct of_device *op = esp->dev;
+       struct platform_device *op = esp->dev;
 
        dma_unmap_sg(&op->dev, sg, num_sg, dir);
 }
@@ -256,7 +256,7 @@ static void sbus_esp_reset_dma(struct esp *esp)
 {
        int can_do_burst16, can_do_burst32, can_do_burst64;
        int can_do_sbus64, lim;
-       struct of_device *op;
+       struct platform_device *op;
        u32 val;
 
        can_do_burst16 = (esp->bursts & DMA_BURST16) != 0;
@@ -487,8 +487,8 @@ static const struct esp_driver_ops sbus_esp_ops = {
        .dma_error      =       sbus_esp_dma_error,
 };
 
-static int __devinit esp_sbus_probe_one(struct of_device *op,
-                                       struct of_device *espdma,
+static int __devinit esp_sbus_probe_one(struct platform_device *op,
+                                       struct platform_device *espdma,
                                        int hme)
 {
        struct scsi_host_template *tpnt = &scsi_esp_template;
@@ -562,11 +562,11 @@ fail:
        return err;
 }
 
-static int __devinit esp_sbus_probe(struct of_device *op, const struct of_device_id *match)
+static int __devinit esp_sbus_probe(struct platform_device *op, const struct of_device_id *match)
 {
        struct device_node *dma_node = NULL;
        struct device_node *dp = op->dev.of_node;
-       struct of_device *dma_of = NULL;
+       struct platform_device *dma_of = NULL;
        int hme = 0;
 
        if (dp->parent &&
@@ -585,10 +585,10 @@ static int __devinit esp_sbus_probe(struct of_device *op, const struct of_device
        return esp_sbus_probe_one(op, dma_of, hme);
 }
 
-static int __devexit esp_sbus_remove(struct of_device *op)
+static int __devexit esp_sbus_remove(struct platform_device *op)
 {
        struct esp *esp = dev_get_drvdata(&op->dev);
-       struct of_device *dma_of = esp->dma;
+       struct platform_device *dma_of = esp->dma;
        unsigned int irq = esp->host->irq;
        bool is_hme;
        u32 val;
index 0099b8692b60c7b2f23781b32a530702e56457d7..cc01c650a1447291a13c59af301e076418533067 100644 (file)
@@ -551,7 +551,7 @@ static struct uart_driver grlib_apbuart_driver = {
 /* OF Platform Driver                                                       */
 /* ======================================================================== */
 
-static int __devinit apbuart_probe(struct of_device *op,
+static int __devinit apbuart_probe(struct platform_device *op,
                                   const struct of_device_id *match)
 {
        int i = -1;
index 6016179db533dc1b23100d2491a24adaff9bca05..f2b8adcc6c9245019316867d8670703000a11ad6 100644 (file)
@@ -1340,7 +1340,7 @@ static struct uart_driver cpm_reg = {
 
 static int probe_index;
 
-static int __devinit cpm_uart_probe(struct of_device *ofdev,
+static int __devinit cpm_uart_probe(struct platform_device *ofdev,
                                     const struct of_device_id *match)
 {
        int index = probe_index++;
@@ -1364,7 +1364,7 @@ static int __devinit cpm_uart_probe(struct of_device *ofdev,
        return uart_add_one_port(&cpm_reg, &pinfo->port);
 }
 
-static int __devexit cpm_uart_remove(struct of_device *ofdev)
+static int __devexit cpm_uart_remove(struct platform_device *ofdev)
 {
        struct uart_cpm_port *pinfo = dev_get_drvdata(&ofdev->dev);
        return uart_remove_one_port(&cpm_reg, &pinfo->port);
index 1a88b363005c1ceb81cd589b9f0ee8bd4eeb41f5..8dedb266f143f1cf801d84f34892a999b2dc9934 100644 (file)
@@ -1298,7 +1298,7 @@ static struct of_device_id mpc52xx_uart_of_match[] = {
 };
 
 static int __devinit
-mpc52xx_uart_of_probe(struct of_device *op, const struct of_device_id *match)
+mpc52xx_uart_of_probe(struct platform_device *op, const struct of_device_id *match)
 {
        int idx = -1;
        unsigned int uartclk;
@@ -1369,7 +1369,7 @@ mpc52xx_uart_of_probe(struct of_device *op, const struct of_device_id *match)
 }
 
 static int
-mpc52xx_uart_of_remove(struct of_device *op)
+mpc52xx_uart_of_remove(struct platform_device *op)
 {
        struct uart_port *port = dev_get_drvdata(&op->dev);
        dev_set_drvdata(&op->dev, NULL);
@@ -1382,7 +1382,7 @@ mpc52xx_uart_of_remove(struct of_device *op)
 
 #ifdef CONFIG_PM
 static int
-mpc52xx_uart_of_suspend(struct of_device *op, pm_message_t state)
+mpc52xx_uart_of_suspend(struct platform_device *op, pm_message_t state)
 {
        struct uart_port *port = (struct uart_port *) dev_get_drvdata(&op->dev);
 
@@ -1393,7 +1393,7 @@ mpc52xx_uart_of_suspend(struct of_device *op, pm_message_t state)
 }
 
 static int
-mpc52xx_uart_of_resume(struct of_device *op)
+mpc52xx_uart_of_resume(struct platform_device *op)
 {
        struct uart_port *port = (struct uart_port *) dev_get_drvdata(&op->dev);
 
index e65b0d9202a53c43b4f47abbd2fce230c9f9a7f5..de173671e3d0fbe92dd036cb847b68b7c959f290 100644 (file)
@@ -344,7 +344,7 @@ int nwpserial_register_port(struct uart_port *port)
 
        mutex_lock(&nwpserial_mutex);
 
-       dn = to_of_device(port->dev)->dev.of_node;
+       dn = port->dev->of_node;
        if (dn == NULL)
                goto out;
 
index a48d9080f5525f1c97ac0fff59023f85f19d1b67..659a695bdad6474e832c9d4ffbef7648fe45c4d5 100644 (file)
@@ -27,7 +27,7 @@ struct of_serial_info {
 /*
  * Fill a struct uart_port for a given device node
  */
-static int __devinit of_platform_serial_setup(struct of_device *ofdev,
+static int __devinit of_platform_serial_setup(struct platform_device *ofdev,
                                        int type, struct uart_port *port)
 {
        struct resource resource;
@@ -80,7 +80,7 @@ static int __devinit of_platform_serial_setup(struct of_device *ofdev,
 /*
  * Try to register a serial port
  */
-static int __devinit of_platform_serial_probe(struct of_device *ofdev,
+static int __devinit of_platform_serial_probe(struct platform_device *ofdev,
                                                const struct of_device_id *id)
 {
        struct of_serial_info *info;
@@ -134,7 +134,7 @@ out:
 /*
  * Release a line
  */
-static int of_platform_serial_remove(struct of_device *ofdev)
+static int of_platform_serial_remove(struct platform_device *ofdev)
 {
        struct of_serial_info *info = dev_get_drvdata(&ofdev->dev);
        switch (info->type) {
index a779e22d213ee3abd9f5c1cfa6f267a4fdba96c8..c9014868297d9f20a1a11a36d3361b86a148635c 100644 (file)
@@ -519,7 +519,7 @@ static struct console sunhv_console = {
        .data   =       &sunhv_reg,
 };
 
-static int __devinit hv_probe(struct of_device *op, const struct of_device_id *match)
+static int __devinit hv_probe(struct platform_device *op, const struct of_device_id *match)
 {
        struct uart_port *port;
        unsigned long minor;
@@ -598,7 +598,7 @@ out_free_port:
        return err;
 }
 
-static int __devexit hv_remove(struct of_device *dev)
+static int __devexit hv_remove(struct platform_device *dev)
 {
        struct uart_port *port = dev_get_drvdata(&dev->dev);
 
index 9845fb1cfb1ffea3438681f8c36f2c42fa58556d..5b246b18f42fc06ce1d422c8465f9f7c906577e9 100644 (file)
@@ -883,7 +883,7 @@ static int sunsab_console_setup(struct console *con, char *options)
        printk("Console: ttyS%d (SAB82532)\n",
               (sunsab_reg.minor - 64) + con->index);
 
-       sunserial_console_termios(con, to_of_device(up->port.dev)->dev.of_node);
+       sunserial_console_termios(con, up->port.dev->of_node);
 
        switch (con->cflag & CBAUD) {
        case B150: baud = 150; break;
@@ -954,7 +954,7 @@ static inline struct console *SUNSAB_CONSOLE(void)
 #endif
 
 static int __devinit sunsab_init_one(struct uart_sunsab_port *up,
-                                    struct of_device *op,
+                                    struct platform_device *op,
                                     unsigned long offset,
                                     int line)
 {
@@ -1006,7 +1006,7 @@ static int __devinit sunsab_init_one(struct uart_sunsab_port *up,
        return 0;
 }
 
-static int __devinit sab_probe(struct of_device *op, const struct of_device_id *match)
+static int __devinit sab_probe(struct platform_device *op, const struct of_device_id *match)
 {
        static int inst;
        struct uart_sunsab_port *up;
@@ -1062,7 +1062,7 @@ out:
        return err;
 }
 
-static int __devexit sab_remove(struct of_device *op)
+static int __devexit sab_remove(struct platform_device *op)
 {
        struct uart_sunsab_port *up = dev_get_drvdata(&op->dev);
 
index 3cdf74822db51336f98f955efcbebf95090b47cc..551ebfe3ccbbf729e94964527e1dd3095cfe2170 100644 (file)
@@ -1200,7 +1200,7 @@ static int __devinit sunsu_kbd_ms_init(struct uart_sunsu_port *up)
                return -ENODEV;
 
        printk("%s: %s port at %llx, irq %u\n",
-              to_of_device(up->port.dev)->dev.of_node->full_name,
+              up->port.dev->of_node->full_name,
               (up->su_type == SU_PORT_KBD) ? "Keyboard" : "Mouse",
               (unsigned long long) up->port.mapbase,
               up->port.irq);
@@ -1352,7 +1352,7 @@ static int __init sunsu_console_setup(struct console *co, char *options)
        spin_lock_init(&port->lock);
 
        /* Get firmware console settings.  */
-       sunserial_console_termios(co, to_of_device(port->dev)->dev.of_node);
+       sunserial_console_termios(co, port->dev->of_node);
 
        memset(&termios, 0, sizeof(struct ktermios));
        termios.c_cflag = co->cflag;
@@ -1406,7 +1406,7 @@ static enum su_type __devinit su_get_type(struct device_node *dp)
        return SU_PORT_PORT;
 }
 
-static int __devinit su_probe(struct of_device *op, const struct of_device_id *match)
+static int __devinit su_probe(struct platform_device *op, const struct of_device_id *match)
 {
        static int inst;
        struct device_node *dp = op->dev.of_node;
@@ -1497,7 +1497,7 @@ out_unmap:
        return err;
 }
 
-static int __devexit su_remove(struct of_device *op)
+static int __devexit su_remove(struct platform_device *op)
 {
        struct uart_sunsu_port *up = dev_get_drvdata(&op->dev);
        bool kbdms = false;
index d1e6bcb59546b993128edacac119182b834a01e3..c1967ac1c07fd51c592d15554c024f497072806b 100644 (file)
@@ -1230,7 +1230,7 @@ static int __init sunzilog_console_setup(struct console *con, char *options)
               (sunzilog_reg.minor - 64) + con->index, con->index);
 
        /* Get firmware console settings.  */
-       sunserial_console_termios(con, to_of_device(up->port.dev)->dev.of_node);
+       sunserial_console_termios(con, up->port.dev->of_node);
 
        /* Firmware console speed is limited to 150-->38400 baud so
         * this hackish cflag thing is OK.
@@ -1399,7 +1399,7 @@ static void __devinit sunzilog_init_hw(struct uart_sunzilog_port *up)
 
 static int zilog_irq = -1;
 
-static int __devinit zs_probe(struct of_device *op, const struct of_device_id *match)
+static int __devinit zs_probe(struct platform_device *op, const struct of_device_id *match)
 {
        static int kbm_inst, uart_inst;
        int inst;
@@ -1516,7 +1516,7 @@ static void __devexit zs_remove_one(struct uart_sunzilog_port *up)
                uart_remove_one_port(&sunzilog_reg, &up->port);
 }
 
-static int __devexit zs_remove(struct of_device *op)
+static int __devexit zs_remove(struct platform_device *op)
 {
        struct uart_sunzilog_port *up = dev_get_drvdata(&op->dev);
        struct zilog_layout __iomem *regs;
index caf085d3a76abdc18c8e2cca06e7304a503342d4..9b03d7b3e4567fa54d8c4603cd8eaabdd715ff90 100644 (file)
@@ -584,7 +584,7 @@ static struct platform_driver ulite_platform_driver = {
  */
 #if defined(CONFIG_OF) && (defined(CONFIG_PPC32) || defined(CONFIG_MICROBLAZE))
 static int __devinit
-ulite_of_probe(struct of_device *op, const struct of_device_id *match)
+ulite_of_probe(struct platform_device *op, const struct of_device_id *match)
 {
        struct resource res;
        const unsigned int *id;
@@ -605,7 +605,7 @@ ulite_of_probe(struct of_device *op, const struct of_device_id *match)
        return ulite_assign(&op->dev, id ? *id : -1, res.start, irq);
 }
 
-static int __devexit ulite_of_remove(struct of_device *op)
+static int __devexit ulite_of_remove(struct platform_device *op)
 {
        return ulite_release(&op->dev);
 }
index 907b06f5c447cabb94e4a723e8c58fad37a2ebd5..3f4848e2174a2c50c6f2216a8862066ec10b3fcd 100644 (file)
@@ -1194,7 +1194,7 @@ static void uart_firmware_cont(const struct firmware *fw, void *context)
        release_firmware(fw);
 }
 
-static int ucc_uart_probe(struct of_device *ofdev,
+static int ucc_uart_probe(struct platform_device *ofdev,
        const struct of_device_id *match)
 {
        struct device_node *np = ofdev->dev.of_node;
@@ -1462,7 +1462,7 @@ static int ucc_uart_probe(struct of_device *ofdev,
        return 0;
 }
 
-static int ucc_uart_remove(struct of_device *ofdev)
+static int ucc_uart_remove(struct platform_device *ofdev)
 {
        struct uart_qe_port *qe_port = dev_get_drvdata(&ofdev->dev);
 
index 10baac3f8ea53d1ed3a8cafe6b9d90dd561eb771..cddbfceb324f6ccbef716395ddbf2190e3538435 100644 (file)
@@ -507,7 +507,7 @@ static int __exit mpc512x_psc_spi_do_remove(struct device *dev)
        return 0;
 }
 
-static int __init mpc512x_psc_spi_of_probe(struct of_device *op,
+static int __init mpc512x_psc_spi_of_probe(struct platform_device *op,
                                           const struct of_device_id *match)
 {
        const u32 *regaddr_p;
@@ -539,7 +539,7 @@ static int __init mpc512x_psc_spi_of_probe(struct of_device *op,
                                irq_of_parse_and_map(op->dev.of_node, 0), id);
 }
 
-static int __exit mpc512x_psc_spi_of_remove(struct of_device *op)
+static int __exit mpc512x_psc_spi_of_remove(struct platform_device *op)
 {
        return mpc512x_psc_spi_do_remove(&op->dev);
 }
index 66d170147dccabc9cbb22d5c8e1d50af39225415..983fbbfce76eba3061e073ab5c03aa48d9dd89c3 100644 (file)
@@ -465,7 +465,7 @@ static int __exit mpc52xx_psc_spi_do_remove(struct device *dev)
        return 0;
 }
 
-static int __init mpc52xx_psc_spi_of_probe(struct of_device *op,
+static int __init mpc52xx_psc_spi_of_probe(struct platform_device *op,
        const struct of_device_id *match)
 {
        const u32 *regaddr_p;
@@ -495,7 +495,7 @@ static int __init mpc52xx_psc_spi_of_probe(struct of_device *op,
                                irq_of_parse_and_map(op->dev.of_node, 0), id);
 }
 
-static int __exit mpc52xx_psc_spi_of_remove(struct of_device *op)
+static int __exit mpc52xx_psc_spi_of_remove(struct platform_device *op)
 {
        return mpc52xx_psc_spi_do_remove(&op->dev);
 }
index 56136ff00e01643dbfe46754e0f3aefce01d11dc..ec9f0b1bf86494da73bd8d14cc69fe5927db8065 100644 (file)
@@ -390,7 +390,7 @@ static int mpc52xx_spi_transfer(struct spi_device *spi, struct spi_message *m)
 /*
  * OF Platform Bus Binding
  */
-static int __devinit mpc52xx_spi_probe(struct of_device *op,
+static int __devinit mpc52xx_spi_probe(struct platform_device *op,
                                       const struct of_device_id *match)
 {
        struct spi_master *master;
@@ -530,7 +530,7 @@ static int __devinit mpc52xx_spi_probe(struct of_device *op,
        return rc;
 }
 
-static int __devexit mpc52xx_spi_remove(struct of_device *op)
+static int __devexit mpc52xx_spi_remove(struct platform_device *op)
 {
        struct spi_master *master = dev_get_drvdata(&op->dev);
        struct mpc52xx_spi *ms = spi_master_get_devdata(master);
index aad9ae1b9c69093b829aa09c942b7a8a8b53dd78..d31b57f7baaf3c3bf970294afd13a1396cecf46c 100644 (file)
@@ -1236,7 +1236,7 @@ static int of_mpc8xxx_spi_free_chipselects(struct device *dev)
        return 0;
 }
 
-static int __devinit of_mpc8xxx_spi_probe(struct of_device *ofdev,
+static int __devinit of_mpc8xxx_spi_probe(struct platform_device *ofdev,
                                          const struct of_device_id *ofid)
 {
        struct device *dev = &ofdev->dev;
@@ -1308,7 +1308,7 @@ err_clk:
        return ret;
 }
 
-static int __devexit of_mpc8xxx_spi_remove(struct of_device *ofdev)
+static int __devexit of_mpc8xxx_spi_remove(struct platform_device *ofdev)
 {
        int ret;
 
index 0f5fa7e2a55041f6f4695bcd4f54f2f2167ff6d7..80e172d3e72a7faab0064db66640c815c836e7a2 100644 (file)
@@ -388,9 +388,9 @@ static void free_gpios(struct ppc4xx_spi *hw)
 }
 
 /*
- * of_device layer stuff...
+ * platform_device layer stuff...
  */
-static int __init spi_ppc4xx_of_probe(struct of_device *op,
+static int __init spi_ppc4xx_of_probe(struct platform_device *op,
                                      const struct of_device_id *match)
 {
        struct ppc4xx_spi *hw;
@@ -565,7 +565,7 @@ free_master:
        return ret;
 }
 
-static int __exit spi_ppc4xx_of_remove(struct of_device *op)
+static int __exit spi_ppc4xx_of_remove(struct platform_device *op)
 {
        struct spi_master *master = dev_get_drvdata(&op->dev);
        struct ppc4xx_spi *hw = spi_master_get_devdata(master);
index f53d3f6b9f611671ccc31d6bf5afb847882a9153..b66c2dbf20a59fa7e4ce4071fc0172fe163a939b 100644 (file)
@@ -38,7 +38,7 @@
 #include "xilinx_spi.h"
 
 
-static int __devinit xilinx_spi_of_probe(struct of_device *ofdev,
+static int __devinit xilinx_spi_of_probe(struct platform_device *ofdev,
        const struct of_device_id *match)
 {
        struct spi_master *master;
@@ -84,7 +84,7 @@ static int __devinit xilinx_spi_of_probe(struct of_device *ofdev,
        return 0;
 }
 
-static int __devexit xilinx_spi_remove(struct of_device *ofdev)
+static int __devexit xilinx_spi_remove(struct platform_device *ofdev)
 {
        xilinx_spi_deinit(dev_get_drvdata(&ofdev->dev));
        dev_set_drvdata(&ofdev->dev, 0);
@@ -93,7 +93,7 @@ static int __devexit xilinx_spi_remove(struct of_device *ofdev)
        return 0;
 }
 
-static int __exit xilinx_spi_of_remove(struct of_device *op)
+static int __exit xilinx_spi_of_remove(struct platform_device *op)
 {
        return xilinx_spi_remove(op);
 }
index 9648b75f0283e31d9b1c02c618b979fe3472ee41..a5ea2c1d8c93353d68dfe5ef2dbfff597acb5dfe 100644 (file)
@@ -2398,7 +2398,7 @@ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver)
 EXPORT_SYMBOL(usb_gadget_unregister_driver);
 
 /* udc structure's alloc and setup, include ep-param alloc */
-static struct qe_udc __devinit *qe_udc_config(struct of_device *ofdev)
+static struct qe_udc __devinit *qe_udc_config(struct platform_device *ofdev)
 {
        struct qe_udc *udc;
        struct device_node *np = ofdev->dev.of_node;
@@ -2523,7 +2523,7 @@ static void qe_udc_release(struct device *dev)
 }
 
 /* Driver probe functions */
-static int __devinit qe_udc_probe(struct of_device *ofdev,
+static int __devinit qe_udc_probe(struct platform_device *ofdev,
                        const struct of_device_id *match)
 {
        struct device_node *np = ofdev->dev.of_node;
@@ -2679,18 +2679,18 @@ err1:
 }
 
 #ifdef CONFIG_PM
-static int qe_udc_suspend(struct of_device *dev, pm_message_t state)
+static int qe_udc_suspend(struct platform_device *dev, pm_message_t state)
 {
        return -ENOTSUPP;
 }
 
-static int qe_udc_resume(struct of_device *dev)
+static int qe_udc_resume(struct platform_device *dev)
 {
        return -ENOTSUPP;
 }
 #endif
 
-static int __devexit qe_udc_remove(struct of_device *ofdev)
+static int __devexit qe_udc_remove(struct platform_device *ofdev)
 {
        struct qe_ep *ep;
        unsigned int size;
index 5aec92866ab3e1398ac4450ec62f9d9dfe9c195c..335ee699fd85bde5637fc6991809ddfdab8f506d 100644 (file)
@@ -106,7 +106,7 @@ ppc44x_enable_bmt(struct device_node *dn)
 
 
 static int __devinit
-ehci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match)
+ehci_hcd_ppc_of_probe(struct platform_device *op, const struct of_device_id *match)
 {
        struct device_node *dn = op->dev.of_node;
        struct usb_hcd *hcd;
@@ -210,7 +210,7 @@ err_rmr:
 }
 
 
-static int ehci_hcd_ppc_of_remove(struct of_device *op)
+static int ehci_hcd_ppc_of_remove(struct platform_device *op)
 {
        struct usb_hcd *hcd = dev_get_drvdata(&op->dev);
        struct ehci_hcd *ehci = hcd_to_ehci(hcd);
@@ -253,7 +253,7 @@ static int ehci_hcd_ppc_of_remove(struct of_device *op)
 }
 
 
-static int ehci_hcd_ppc_of_shutdown(struct of_device *op)
+static int ehci_hcd_ppc_of_shutdown(struct platform_device *op)
 {
        struct usb_hcd *hcd = dev_get_drvdata(&op->dev);
 
index 4899f451add98f5727cd72710ea8f4751070d868..6c8076ad821d00be913663ea9e641eede9fb4f3b 100644 (file)
@@ -140,7 +140,7 @@ static const struct hc_driver ehci_xilinx_of_hc_driver = {
 
 /**
  * ehci_hcd_xilinx_of_probe - Probe method for the USB host controller
- * @op:                pointer to the of_device to which the host controller bound
+ * @op:                pointer to the platform_device bound to the host controller
  * @match:     pointer to of_device_id structure, not used
  *
  * 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 = {
  * entry, and sets an appropriate value for hcd->has_tt.
  */
 static int __devinit
-ehci_hcd_xilinx_of_probe(struct of_device *op, const struct of_device_id *match)
+ehci_hcd_xilinx_of_probe(struct platform_device *op, const struct of_device_id *match)
 {
        struct device_node *dn = op->dev.of_node;
        struct usb_hcd *hcd;
@@ -242,12 +242,12 @@ err_rmr:
 
 /**
  * ehci_hcd_xilinx_of_remove - shutdown hcd and release resources
- * @op:                pointer to of_device structure that is to be removed
+ * @op:                pointer to platform_device structure that is to be removed
  *
  * Remove the hcd structure, and release resources that has been requested
  * during probe.
  */
-static int ehci_hcd_xilinx_of_remove(struct of_device *op)
+static int ehci_hcd_xilinx_of_remove(struct platform_device *op)
 {
        struct usb_hcd *hcd = dev_get_drvdata(&op->dev);
        dev_set_drvdata(&op->dev, NULL);
@@ -266,11 +266,11 @@ static int ehci_hcd_xilinx_of_remove(struct of_device *op)
 
 /**
  * ehci_hcd_xilinx_of_shutdown - shutdown the hcd
- * @op:                pointer to of_device structure that is to be removed
+ * @op:                pointer to platform_device structure that is to be removed
  *
  * Properly shutdown the hcd, call driver's shutdown routine.
  */
-static int ehci_hcd_xilinx_of_shutdown(struct of_device *op)
+static int ehci_hcd_xilinx_of_shutdown(struct platform_device *op)
 {
        struct usb_hcd *hcd = dev_get_drvdata(&op->dev);
 
index c7c8392a88b9ed02c9dc1ebbd61a190c2cac1ccb..20092a27a1e8bd136a2a774440c63101b49238aa 100644 (file)
@@ -561,7 +561,7 @@ static const struct hc_driver fhci_driver = {
        .hub_control = fhci_hub_control,
 };
 
-static int __devinit of_fhci_probe(struct of_device *ofdev,
+static int __devinit of_fhci_probe(struct platform_device *ofdev,
                                   const struct of_device_id *ofid)
 {
        struct device *dev = &ofdev->dev;
@@ -801,7 +801,7 @@ static int __devexit fhci_remove(struct device *dev)
        return 0;
 }
 
-static int __devexit of_fhci_remove(struct of_device *ofdev)
+static int __devexit of_fhci_remove(struct platform_device *ofdev)
 {
        return fhci_remove(&ofdev->dev);
 }
index ec85d0c3cc3e79de60700bd480f41bfdc1448f6e..3b28dbfca058274d607b5f309a30390d4f5bb8c3 100644 (file)
@@ -27,7 +27,7 @@
 #endif
 
 #ifdef CONFIG_PPC_OF
-static int of_isp1760_probe(struct of_device *dev,
+static int of_isp1760_probe(struct platform_device *dev,
                const struct of_device_id *match)
 {
        struct usb_hcd *hcd;
@@ -95,7 +95,7 @@ release_reg:
        return ret;
 }
 
-static int of_isp1760_remove(struct of_device *dev)
+static int of_isp1760_remove(struct platform_device *dev)
 {
        struct usb_hcd *hcd = dev_get_drvdata(&dev->dev);
 
index df165917412a85d821084dcd37c991522254e4b2..b2c2dbf087662309738ce4f2596de1db52232ae9 100644 (file)
@@ -81,7 +81,7 @@ static const struct hc_driver ohci_ppc_of_hc_driver = {
 
 
 static int __devinit
-ohci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match)
+ohci_hcd_ppc_of_probe(struct platform_device *op, const struct of_device_id *match)
 {
        struct device_node *dn = op->dev.of_node;
        struct usb_hcd *hcd;
@@ -183,7 +183,7 @@ err_rmr:
        return rv;
 }
 
-static int ohci_hcd_ppc_of_remove(struct of_device *op)
+static int ohci_hcd_ppc_of_remove(struct platform_device *op)
 {
        struct usb_hcd *hcd = dev_get_drvdata(&op->dev);
        dev_set_drvdata(&op->dev, NULL);
@@ -201,7 +201,7 @@ static int ohci_hcd_ppc_of_remove(struct of_device *op)
        return 0;
 }
 
-static int ohci_hcd_ppc_of_shutdown(struct of_device *op)
+static int ohci_hcd_ppc_of_shutdown(struct platform_device *op)
 {
        struct usb_hcd *hcd = dev_get_drvdata(&op->dev);
 
index c7796637bafd2c1ae0d6501751e90d362e77e48e..4dc13467281da45b87fac6e8951e4c9dc46106b5 100644 (file)
@@ -273,7 +273,7 @@ static int __devinit bw2_do_default_mode(struct bw2_par *par,
        return 0;
 }
 
-static int __devinit bw2_probe(struct of_device *op, const struct of_device_id *match)
+static int __devinit bw2_probe(struct platform_device *op, const struct of_device_id *match)
 {
        struct device_node *dp = op->dev.of_node;
        struct fb_info *info;
@@ -350,7 +350,7 @@ out_err:
        return err;
 }
 
-static int __devexit bw2_remove(struct of_device *op)
+static int __devexit bw2_remove(struct platform_device *op)
 {
        struct fb_info *info = dev_get_drvdata(&op->dev);
        struct bw2_par *par = info->par;
index d09fde8beb69b548bec3eac39a6399aa29a614a4..24249535ac86abe3926759352722da54246b18a9 100644 (file)
@@ -446,7 +446,7 @@ static struct sbus_mmap_map __cg14_mmap_map[CG14_MMAP_ENTRIES] __devinitdata = {
        { .size = 0 }
 };
 
-static void cg14_unmap_regs(struct of_device *op, struct fb_info *info,
+static void cg14_unmap_regs(struct platform_device *op, struct fb_info *info,
                            struct cg14_par *par)
 {
        if (par->regs)
@@ -463,7 +463,7 @@ static void cg14_unmap_regs(struct of_device *op, struct fb_info *info,
                           info->screen_base, info->fix.smem_len);
 }
 
-static int __devinit cg14_probe(struct of_device *op, const struct of_device_id *match)
+static int __devinit cg14_probe(struct platform_device *op, const struct of_device_id *match)
 {
        struct device_node *dp = op->dev.of_node;
        struct fb_info *info;
@@ -570,7 +570,7 @@ out_err:
        return err;
 }
 
-static int __devexit cg14_remove(struct of_device *op)
+static int __devexit cg14_remove(struct platform_device *op)
 {
        struct fb_info *info = dev_get_drvdata(&op->dev);
        struct cg14_par *par = info->par;
index 64aa29809fb970dcb1740eb72e69cafb5cb62660..09c0c3c42482ba114e459de82dbe7d2ec8e591f0 100644 (file)
@@ -346,7 +346,7 @@ static int __devinit cg3_do_default_mode(struct cg3_par *par)
        return 0;
 }
 
-static int __devinit cg3_probe(struct of_device *op,
+static int __devinit cg3_probe(struct platform_device *op,
                               const struct of_device_id *match)
 {
        struct device_node *dp = op->dev.of_node;
@@ -433,7 +433,7 @@ out_err:
        return err;
 }
 
-static int __devexit cg3_remove(struct of_device *op)
+static int __devexit cg3_remove(struct platform_device *op)
 {
        struct fb_info *info = dev_get_drvdata(&op->dev);
        struct cg3_par *par = info->par;
index 2389a719dcc737e04043f7c6d01a5c172ae65481..2b5a97058b085f1704bfc46d46ebfe3c4278c00e 100644 (file)
@@ -718,7 +718,7 @@ static void __devinit cg6_chip_init(struct fb_info *info)
        sbus_writel(info->var.yres - 1, &fbc->clipmaxy);
 }
 
-static void cg6_unmap_regs(struct of_device *op, struct fb_info *info,
+static void cg6_unmap_regs(struct platform_device *op, struct fb_info *info,
                           struct cg6_par *par)
 {
        if (par->fbc)
@@ -737,7 +737,7 @@ static void cg6_unmap_regs(struct of_device *op, struct fb_info *info,
                           info->fix.smem_len);
 }
 
-static int __devinit cg6_probe(struct of_device *op,
+static int __devinit cg6_probe(struct platform_device *op,
                                const struct of_device_id *match)
 {
        struct device_node *dp = op->dev.of_node;
@@ -827,7 +827,7 @@ out_err:
        return err;
 }
 
-static int __devexit cg6_remove(struct of_device *op)
+static int __devexit cg6_remove(struct platform_device *op)
 {
        struct fb_info *info = dev_get_drvdata(&op->dev);
        struct cg6_par *par = info->par;
index f6ecfab296d39515f3639c3af2f618aa9a702f63..6739b2af3bc0fad9d4b772aed65538d166ca7588 100644 (file)
@@ -893,7 +893,7 @@ static void ffb_init_fix(struct fb_info *info)
        info->fix.accel = FB_ACCEL_SUN_CREATOR;
 }
 
-static int __devinit ffb_probe(struct of_device *op,
+static int __devinit ffb_probe(struct platform_device *op,
                               const struct of_device_id *match)
 {
        struct device_node *dp = op->dev.of_node;
@@ -1023,7 +1023,7 @@ out_err:
        return err;
 }
 
-static int __devexit ffb_remove(struct of_device *op)
+static int __devexit ffb_remove(struct platform_device *op)
 {
        struct fb_info *info = dev_get_drvdata(&op->dev);
        struct ffb_par *par = info->par;
index e38ad22245405e6c327f5d1e734c08538fb322b4..8bbbf08fa3ce0cc3d0163c9dcc1dc9f3f77cc8ad 100644 (file)
@@ -1393,7 +1393,7 @@ static void free_irq_local(int irq)
  * Power management hooks. Note that we won't be called from IRQ context,
  * unlike the blank functions above, so we may sleep.
  */
-static int fsl_diu_suspend(struct of_device *ofdev, pm_message_t state)
+static int fsl_diu_suspend(struct platform_device *ofdev, pm_message_t state)
 {
        struct fsl_diu_data *machine_data;
 
@@ -1403,7 +1403,7 @@ static int fsl_diu_suspend(struct of_device *ofdev, pm_message_t state)
        return 0;
 }
 
-static int fsl_diu_resume(struct of_device *ofdev)
+static int fsl_diu_resume(struct platform_device *ofdev)
 {
        struct fsl_diu_data *machine_data;
 
@@ -1487,7 +1487,7 @@ static ssize_t show_monitor(struct device *device,
        return diu_ops.show_monitor_port(machine_data->monitor_port, buf);
 }
 
-static int __devinit fsl_diu_probe(struct of_device *ofdev,
+static int __devinit fsl_diu_probe(struct platform_device *ofdev,
        const struct of_device_id *match)
 {
        struct device_node *np = ofdev->dev.of_node;
@@ -1667,7 +1667,7 @@ error2:
 }
 
 
-static int fsl_diu_remove(struct of_device *ofdev)
+static int fsl_diu_remove(struct platform_device *ofdev)
 {
        struct fsl_diu_data *machine_data;
        int i;
index ad677637ffbb0e480e6c318e078a5fcae2f484c2..b599e5e36ced7708dc5269cb26b34a265263ff28 100644 (file)
@@ -529,7 +529,7 @@ static void leo_fixup_var_rgb(struct fb_var_screeninfo *var)
        var->transp.length = 0;
 }
 
-static void leo_unmap_regs(struct of_device *op, struct fb_info *info,
+static void leo_unmap_regs(struct platform_device *op, struct fb_info *info,
                           struct leo_par *par)
 {
        if (par->lc_ss0_usr)
@@ -547,7 +547,7 @@ static void leo_unmap_regs(struct of_device *op, struct fb_info *info,
                of_iounmap(&op->resource[0], info->screen_base, 0x800000);
 }
 
-static int __devinit leo_probe(struct of_device *op,
+static int __devinit leo_probe(struct platform_device *op,
                               const struct of_device_id *match)
 {
        struct device_node *dp = op->dev.of_node;
@@ -637,7 +637,7 @@ out_err:
        return err;
 }
 
-static int __devexit leo_remove(struct of_device *op)
+static int __devexit leo_remove(struct platform_device *op)
 {
        struct fb_info *info = dev_get_drvdata(&op->dev);
        struct leo_par *par = info->par;
index 4e2b8cc3d46093299a2ae05178ead6db2e783640..b1c4374cf9405cc5d3553b4e62eb74a8c13ff575 100644 (file)
@@ -550,7 +550,7 @@ static int mb862xx_gdc_init(struct mb862xxfb_par *par)
        return 0;
 }
 
-static int __devinit of_platform_mb862xx_probe(struct of_device *ofdev,
+static int __devinit of_platform_mb862xx_probe(struct platform_device *ofdev,
                                               const struct of_device_id *id)
 {
        struct device_node *np = ofdev->dev.of_node;
@@ -669,7 +669,7 @@ fbrel:
        return ret;
 }
 
-static int __devexit of_platform_mb862xx_remove(struct of_device *ofdev)
+static int __devexit of_platform_mb862xx_remove(struct platform_device *ofdev)
 {
        struct fb_info *fbi = dev_get_drvdata(&ofdev->dev);
        struct mb862xxfb_par *par = fbi->par;
index 688b055abab2066811a3115bf270319f62dd811d..b6c3fc2db6328a2f187e7a35f1ac8448a3abeebd 100644 (file)
@@ -249,7 +249,7 @@ static void p9100_init_fix(struct fb_info *info, int linebytes, struct device_no
        info->fix.accel = FB_ACCEL_SUN_CGTHREE;
 }
 
-static int __devinit p9100_probe(struct of_device *op, const struct of_device_id *match)
+static int __devinit p9100_probe(struct platform_device *op, const struct of_device_id *match)
 {
        struct device_node *dp = op->dev.of_node;
        struct fb_info *info;
@@ -326,7 +326,7 @@ out_err:
        return err;
 }
 
-static int __devexit p9100_remove(struct of_device *op)
+static int __devexit p9100_remove(struct platform_device *op)
 {
        struct fb_info *info = dev_get_drvdata(&op->dev);
        struct p9100_par *par = info->par;
index 72a1f4c047326c1d69634110fa68ec3061c20b48..a50e1977b31637af3204788262bc04776e91b39b 100644 (file)
@@ -533,7 +533,7 @@ static int __init platinumfb_setup(char *options)
 #define invalidate_cache(addr)
 #endif
 
-static int __devinit platinumfb_probe(struct of_device* odev,
+static int __devinit platinumfb_probe(struct platform_device* odev,
                                      const struct of_device_id *match)
 {
        struct device_node      *dp = odev->dev.of_node;
@@ -646,7 +646,7 @@ static int __devinit platinumfb_probe(struct of_device* odev,
        return rc;
 }
 
-static int __devexit platinumfb_remove(struct of_device* odev)
+static int __devexit platinumfb_remove(struct platform_device* odev)
 {
        struct fb_info          *info = dev_get_drvdata(&odev->dev);
        struct fb_info_platinum *pinfo = info->par;
index 7288934c0d49dacfabee368b6498289f2cf635b5..5dbe06af2226f3db9433a27dc3c3b5593c278e95 100644 (file)
@@ -111,7 +111,7 @@ static int __devinit gfb_set_fbinfo(struct gfb_info *gp)
         return 0;
 }
 
-static int __devinit gfb_probe(struct of_device *op,
+static int __devinit gfb_probe(struct platform_device *op,
                               const struct of_device_id *match)
 {
        struct device_node *dp = op->dev.of_node;
@@ -172,7 +172,7 @@ err_out:
        return err;
 }
 
-static int __devexit gfb_remove(struct of_device *op)
+static int __devexit gfb_remove(struct platform_device *op)
 {
        struct fb_info *info = dev_get_drvdata(&op->dev);
        struct gfb_info *gp = info->par;
index f375e0db6776bcefae43c2e26fa08a213c88d6c3..77ad27955cf0422b5c137754593ecfd00e680a31 100644 (file)
@@ -342,7 +342,7 @@ tcx_init_fix(struct fb_info *info, int linebytes)
        info->fix.accel = FB_ACCEL_SUN_TCX;
 }
 
-static void tcx_unmap_regs(struct of_device *op, struct fb_info *info,
+static void tcx_unmap_regs(struct platform_device *op, struct fb_info *info,
                           struct tcx_par *par)
 {
        if (par->tec)
@@ -362,7 +362,7 @@ static void tcx_unmap_regs(struct of_device *op, struct fb_info *info,
                           info->screen_base, info->fix.smem_len);
 }
 
-static int __devinit tcx_probe(struct of_device *op,
+static int __devinit tcx_probe(struct platform_device *op,
                               const struct of_device_id *match)
 {
        struct device_node *dp = op->dev.of_node;
@@ -486,7 +486,7 @@ out_err:
        return err;
 }
 
-static int __devexit tcx_remove(struct of_device *op)
+static int __devexit tcx_remove(struct platform_device *op)
 {
        struct fb_info *info = dev_get_drvdata(&op->dev);
        struct tcx_par *par = info->par;
index 29b5daacc217417ea8b9fd1959d9b55f49ccb6e7..0c9ce88e95e8880b8361973390efb2a989bbe142 100644 (file)
@@ -397,7 +397,7 @@ static int xilinxfb_release(struct device *dev)
  */
 
 static int __devinit
-xilinxfb_of_probe(struct of_device *op, const struct of_device_id *match)
+xilinxfb_of_probe(struct platform_device *op, const struct of_device_id *match)
 {
        const u32 *prop;
        u32 *p;
@@ -477,7 +477,7 @@ xilinxfb_of_probe(struct of_device *op, const struct of_device_id *match)
        return -ENODEV;
 }
 
-static int __devexit xilinxfb_of_remove(struct of_device *op)
+static int __devexit xilinxfb_of_remove(struct platform_device *op)
 {
        return xilinxfb_release(&op->dev);
 }
index 30a2512fd52e30fef23cdac728eae59d4b3803af..566343b3c131fc3f6d3ce17b6bc7bd1e2c724ac4 100644 (file)
@@ -526,7 +526,7 @@ static const struct file_operations cpwd_fops = {
        .release =              cpwd_release,
 };
 
-static int __devinit cpwd_probe(struct of_device *op,
+static int __devinit cpwd_probe(struct platform_device *op,
                                const struct of_device_id *match)
 {
        struct device_node *options;
@@ -639,7 +639,7 @@ out_free:
        goto out;
 }
 
-static int __devexit cpwd_remove(struct of_device *op)
+static int __devexit cpwd_remove(struct platform_device *op)
 {
        struct cpwd *p = dev_get_drvdata(&op->dev);
        int i;
index 1df284f9c2a1b3fcd9e667b49915e4dbc21f5de3..9c21d19043a63980372d032ceee5d2933e3a591f 100644 (file)
@@ -260,7 +260,7 @@ static struct miscdevice gef_wdt_miscdev = {
 };
 
 
-static int __devinit gef_wdt_probe(struct of_device *dev,
+static int __devinit gef_wdt_probe(struct platform_device *dev,
        const struct of_device_id *match)
 {
        int timeout = 10;
index 4cda64dd309c0367208358ef6eb41b73180969cc..8fa213cdb499b0c7e36460c6aa0af09cb1614254 100644 (file)
@@ -185,7 +185,7 @@ static struct miscdevice mpc8xxx_wdt_miscdev = {
        .fops   = &mpc8xxx_wdt_fops,
 };
 
-static int __devinit mpc8xxx_wdt_probe(struct of_device *ofdev,
+static int __devinit mpc8xxx_wdt_probe(struct platform_device *ofdev,
                                       const struct of_device_id *match)
 {
        int ret;
@@ -238,7 +238,7 @@ err_unmap:
        return ret;
 }
 
-static int __devexit mpc8xxx_wdt_remove(struct of_device *ofdev)
+static int __devexit mpc8xxx_wdt_remove(struct platform_device *ofdev)
 {
        mpc8xxx_wdt_pr_warn("watchdog removed");
        del_timer_sync(&wdt_timer);
index 4082b4ace1fce159089924d6718918e182fc67f7..3faee1ae64bd82dda8ebc618250f84e9f3b0c9f8 100644 (file)
@@ -172,7 +172,7 @@ static struct miscdevice riowd_miscdev = {
        .fops   = &riowd_fops
 };
 
-static int __devinit riowd_probe(struct of_device *op,
+static int __devinit riowd_probe(struct platform_device *op,
                                 const struct of_device_id *match)
 {
        struct riowd *p;
@@ -219,7 +219,7 @@ out:
        return err;
 }
 
-static int __devexit riowd_remove(struct of_device *op)
+static int __devexit riowd_remove(struct platform_device *op)
 {
        struct riowd *p = dev_get_drvdata(&op->dev);
 
index 35aa44ad9f2cb21b7ce2422dfbae2fc296aba7cc..835f85ecd2de3eb1331a82a4de24222d5dd98fe1 100644 (file)
@@ -1,20 +1,6 @@
 #ifndef _LINUX_OF_DEVICE_H
 #define _LINUX_OF_DEVICE_H
 
-/*
- * The of_device *was* a kind of "base class" that was a superset of
- * struct device for use by devices attached to an OF node and probed
- * using OF properties.  However, the important bit of OF-style
- * probing, namely the device node pointer, has been moved into the
- * common struct device when CONFIG_OF is set to make OF-style probing
- * available to all bus types.  So now, just make of_device and
- * platform_device equivalent so that current of_platform bus users
- * can be transparently migrated over to using the platform bus.
- *
- * This line will go away once all references to of_device are removed
- * from the kernel.
- */
-#define of_device platform_device
 #include <linux/platform_device.h>
 #include <linux/of_platform.h> /* temporary until merge */
 
@@ -23,8 +9,6 @@
 #include <linux/of.h>
 #include <linux/mod_devicetable.h>
 
-#define        to_of_device(d) container_of(d, struct of_device, dev)
-
 extern const struct of_device_id *of_match_device(
        const struct of_device_id *matches, const struct device *dev);
 extern void of_device_make_bus_id(struct device *dev);
index 4e6d989c06dfe9fdfe2fdd5cd35cc4da22737a33..a68716ad38ced8a7535cddfd7631a35ce0e74ddb 100644 (file)
 #include <linux/of_device.h>
 #include <linux/platform_device.h>
 
-/*
- * An of_platform_driver driver is attached to a basic of_device on
- * the "platform bus" (platform_bus_type).
+/**
+ * of_platform_driver - Legacy of-aware driver for platform devices.
+ *
+ * An of_platform_driver driver is attached to a basic platform_device on
+ * ether the "platform bus" (platform_bus_type), or the ibm ebus
+ * (ibmebus_bus_type).
+ *
+ * of_platform_driver is being phased out when used with the platform_bus_type,
+ * and regular platform_drivers should be used instead.  When the transition
+ * is complete, only ibmebus will be using this structure, and the
+ * platform_driver member of this structure will be removed.
  */
 struct of_platform_driver
 {
index 99ca7120e269fc677eddd608150ce86769bfe78c..7487eb76e034e2c6de6620fbd919562e71071a3c 100644 (file)
@@ -59,7 +59,7 @@ static int soundbus_probe(struct device *dev)
 static int soundbus_uevent(struct device *dev, struct kobj_uevent_env *env)
 {
        struct soundbus_dev * soundbus_dev;
-       struct of_device * of;
+       struct platform_device * of;
        const char *compat;
        int retval = 0;
        int cplen, seen = 0;
index a0f223c13f663ac9f65c92b706aa44ecde4e55cf..adecbf36f4f6281bf435bd7f77ff25d55147582a 100644 (file)
@@ -141,7 +141,7 @@ struct soundbus_dev {
        struct list_head onbuslist;
 
        /* the of device it represents */
-       struct of_device ofdev;
+       struct platform_device ofdev;
 
        /* what modules go by */
        char modalias[32];
index 6496e754f00a2b1bb470f9942cc7d5f1f569b3c9..e0980b5c2cd81c4a628fc3c9b2c4491ea501deea 100644 (file)
@@ -16,7 +16,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
                             char *buf)
 {
        struct soundbus_dev *sdev = to_soundbus_device(dev);
-       struct of_device *of = &sdev->ofdev;
+       struct platform_device *of = &sdev->ofdev;
        int length;
 
        if (*sdev->modalias) {
index 1d4e7164e80af1c4dfd98c057e42b88f52e448f1..3dcd1469f2831939447b60f8410da6c6a0f2e11e 100644 (file)
@@ -369,7 +369,7 @@ struct snd_soc_platform mpc5200_audio_dma_platform = {
 };
 EXPORT_SYMBOL_GPL(mpc5200_audio_dma_platform);
 
-int mpc5200_audio_dma_create(struct of_device *op)
+int mpc5200_audio_dma_create(struct platform_device *op)
 {
        phys_addr_t fifo;
        struct psc_dma *psc_dma;
@@ -488,7 +488,7 @@ out_unmap:
 }
 EXPORT_SYMBOL_GPL(mpc5200_audio_dma_create);
 
-int mpc5200_audio_dma_destroy(struct of_device *op)
+int mpc5200_audio_dma_destroy(struct platform_device *op)
 {
        struct psc_dma *psc_dma = dev_get_drvdata(&op->dev);
 
index e1ec6d91ea3829dfc1d44d4d5995d2a562d54fce..ca99586f2ad993ecc286a0fe4e11a083aa9ee11e 100644 (file)
@@ -81,8 +81,8 @@ to_psc_dma_stream(struct snd_pcm_substream *substream, struct psc_dma *psc_dma)
        return &psc_dma->playback;
 }
 
-int mpc5200_audio_dma_create(struct of_device *op);
-int mpc5200_audio_dma_destroy(struct of_device *op);
+int mpc5200_audio_dma_create(struct platform_device *op);
+int mpc5200_audio_dma_destroy(struct platform_device *op);
 
 extern struct snd_soc_platform mpc5200_audio_dma_platform;
 
index e2ee220bfb7ea86dcd322da92a5025c0ce026f7e..a0310170a170bf32181e87330bef8d5365647ffd 100644 (file)
@@ -263,7 +263,7 @@ EXPORT_SYMBOL_GPL(psc_ac97_dai);
  * - Probe/remove operations
  * - OF device match table
  */
-static int __devinit psc_ac97_of_probe(struct of_device *op,
+static int __devinit psc_ac97_of_probe(struct platform_device *op,
                                      const struct of_device_id *match)
 {
        int rc, i;
@@ -303,7 +303,7 @@ static int __devinit psc_ac97_of_probe(struct of_device *op,
        return 0;
 }
 
-static int __devexit psc_ac97_of_remove(struct of_device *op)
+static int __devexit psc_ac97_of_remove(struct platform_device *op)
 {
        return mpc5200_audio_dma_destroy(op);
 }
index 4f455bd6851ffd87102e6003dfd868b12f5b13f8..9aee748eca7d2df86188333a4cb1865c775d312b 100644 (file)
@@ -153,7 +153,7 @@ EXPORT_SYMBOL_GPL(psc_i2s_dai);
  * - Probe/remove operations
  * - OF device match table
  */
-static int __devinit psc_i2s_of_probe(struct of_device *op,
+static int __devinit psc_i2s_of_probe(struct platform_device *op,
                                      const struct of_device_id *match)
 {
        int rc;
@@ -206,7 +206,7 @@ static int __devinit psc_i2s_of_probe(struct of_device *op,
 
 }
 
-static int __devexit psc_i2s_of_remove(struct of_device *op)
+static int __devexit psc_i2s_of_remove(struct platform_device *op)
 {
        return mpc5200_audio_dma_destroy(op);
 }
index 3a501062c2440d2830f76f297bc4e214b2417c75..3b13b8d65262722d0bfbcc7e8e5d205a47485073 100644 (file)
@@ -200,7 +200,7 @@ static struct snd_soc_ops mpc8610_hpcd_ops = {
  * SSI devices.  We also probably aren't compatible with the generic Elo DMA
  * device driver.
  */
-static int mpc8610_hpcd_probe(struct of_device *ofdev,
+static int mpc8610_hpcd_probe(struct platform_device *ofdev,
        const struct of_device_id *match)
 {
        struct device_node *np = ofdev->dev.of_node;
@@ -534,7 +534,7 @@ error:
  *
  * This function is called when the OF device is removed.
  */
-static int mpc8610_hpcd_remove(struct of_device *ofdev)
+static int mpc8610_hpcd_remove(struct platform_device *ofdev)
 {
        struct platform_device *sound_device = dev_get_drvdata(&ofdev->dev);
        struct mpc8610_hpcd_data *machine_data =
index 9eb1a4e0363be8ba203f78ffde906ea202f0e319..f8bcfc30f800bb9c15e669597d240090de015ac9 100644 (file)
@@ -336,7 +336,7 @@ struct snd_amd7930 {
        int                     pgain;
        int                     mgain;
 
-       struct of_device        *op;
+       struct platform_device  *op;
        unsigned int            irq;
        struct snd_amd7930      *next;
 };
@@ -906,7 +906,7 @@ static int __devinit snd_amd7930_mixer(struct snd_amd7930 *amd)
 
 static int snd_amd7930_free(struct snd_amd7930 *amd)
 {
-       struct of_device *op = amd->op;
+       struct platform_device *op = amd->op;
 
        amd7930_idle(amd);
 
@@ -934,7 +934,7 @@ static struct snd_device_ops snd_amd7930_dev_ops = {
 };
 
 static int __devinit snd_amd7930_create(struct snd_card *card,
-                                       struct of_device *op,
+                                       struct platform_device *op,
                                        int irq, int dev,
                                        struct snd_amd7930 **ramd)
 {
@@ -1002,7 +1002,7 @@ static int __devinit snd_amd7930_create(struct snd_card *card,
        return 0;
 }
 
-static int __devinit amd7930_sbus_probe(struct of_device *op, const struct of_device_id *match)
+static int __devinit amd7930_sbus_probe(struct platform_device *op, const struct of_device_id *match)
 {
        struct resource *rp = &op->resource[0];
        static int dev_num;
index 68570ee2c9bb91079a0948d4832fd0c0a2079eea..c276086c3b5783bc32ae28ffbac8cd9c3fc9473d 100644 (file)
@@ -111,7 +111,7 @@ struct snd_cs4231 {
        struct mutex            mce_mutex;      /* mutex for mce register */
        struct mutex            open_mutex;     /* mutex for ALSA open/close */
 
-       struct of_device        *op;
+       struct platform_device  *op;
        unsigned int            irq[2];
        unsigned int            regs_size;
        struct snd_cs4231       *next;
@@ -1771,7 +1771,7 @@ static unsigned int sbus_dma_addr(struct cs4231_dma_control *dma_cont)
 
 static int snd_cs4231_sbus_free(struct snd_cs4231 *chip)
 {
-       struct of_device *op = chip->op;
+       struct platform_device *op = chip->op;
 
        if (chip->irq[0])
                free_irq(chip->irq[0], chip);
@@ -1794,7 +1794,7 @@ static struct snd_device_ops snd_cs4231_sbus_dev_ops = {
 };
 
 static int __devinit snd_cs4231_sbus_create(struct snd_card *card,
-                                           struct of_device *op,
+                                           struct platform_device *op,
                                            int dev)
 {
        struct snd_cs4231 *chip = card->private_data;
@@ -1856,7 +1856,7 @@ static int __devinit snd_cs4231_sbus_create(struct snd_card *card,
        return 0;
 }
 
-static int __devinit cs4231_sbus_probe(struct of_device *op, const struct of_device_id *match)
+static int __devinit cs4231_sbus_probe(struct platform_device *op, const struct of_device_id *match)
 {
        struct resource *rp = &op->resource[0];
        struct snd_card *card;
@@ -1931,7 +1931,7 @@ static unsigned int _ebus_dma_addr(struct cs4231_dma_control *dma_cont)
 
 static int snd_cs4231_ebus_free(struct snd_cs4231 *chip)
 {
-       struct of_device *op = chip->op;
+       struct platform_device *op = chip->op;
 
        if (chip->c_dma.ebus_info.regs) {
                ebus_dma_unregister(&chip->c_dma.ebus_info);
@@ -1960,7 +1960,7 @@ static struct snd_device_ops snd_cs4231_ebus_dev_ops = {
 };
 
 static int __devinit snd_cs4231_ebus_create(struct snd_card *card,
-                                           struct of_device *op,
+                                           struct platform_device *op,
                                            int dev)
 {
        struct snd_cs4231 *chip = card->private_data;
@@ -2048,7 +2048,7 @@ static int __devinit snd_cs4231_ebus_create(struct snd_card *card,
        return 0;
 }
 
-static int __devinit cs4231_ebus_probe(struct of_device *op, const struct of_device_id *match)
+static int __devinit cs4231_ebus_probe(struct platform_device *op, const struct of_device_id *match)
 {
        struct snd_card *card;
        int err;
@@ -2072,7 +2072,7 @@ static int __devinit cs4231_ebus_probe(struct of_device *op, const struct of_dev
 }
 #endif
 
-static int __devinit cs4231_probe(struct of_device *op, const struct of_device_id *match)
+static int __devinit cs4231_probe(struct platform_device *op, const struct of_device_id *match)
 {
 #ifdef EBUS_SUPPORT
        if (!strcmp(op->dev.of_node->parent->name, "ebus"))
@@ -2086,7 +2086,7 @@ static int __devinit cs4231_probe(struct of_device *op, const struct of_device_i
        return -ENODEV;
 }
 
-static int __devexit cs4231_remove(struct of_device *op)
+static int __devexit cs4231_remove(struct platform_device *op)
 {
        struct snd_cs4231 *chip = dev_get_drvdata(&op->dev);
 
index c421901c48d0f40286da25ae42425e528afc8767..39cd5d69d051a413c6ad77305fef201acfd37605 100644 (file)
@@ -299,7 +299,7 @@ struct dbri_streaminfo {
 /* This structure holds the information for both chips (DBRI & CS4215) */
 struct snd_dbri {
        int regs_size, irq;     /* Needed for unload */
-       struct of_device *op;   /* OF device info */
+       struct platform_device *op;     /* OF device info */
        spinlock_t lock;
 
        struct dbri_dma *dma;   /* Pointer to our DMA block */
@@ -2523,7 +2523,7 @@ static void __devinit snd_dbri_proc(struct snd_card *card)
 static void snd_dbri_free(struct snd_dbri *dbri);
 
 static int __devinit snd_dbri_create(struct snd_card *card,
-                                    struct of_device *op,
+                                    struct platform_device *op,
                                     int irq, int dev)
 {
        struct snd_dbri *dbri = card->private_data;
@@ -2592,7 +2592,7 @@ static void snd_dbri_free(struct snd_dbri *dbri)
                                  (void *)dbri->dma, dbri->dma_dvma);
 }
 
-static int __devinit dbri_probe(struct of_device *op, const struct of_device_id *match)
+static int __devinit dbri_probe(struct platform_device *op, const struct of_device_id *match)
 {
        struct snd_dbri *dbri;
        struct resource *rp;
@@ -2662,7 +2662,7 @@ _err:
        return err;
 }
 
-static int __devexit dbri_remove(struct of_device *op)
+static int __devexit dbri_remove(struct platform_device *op)
 {
        struct snd_card *card = dev_get_drvdata(&op->dev);