Merge remote branch 'origin' into secretlab/next-devicetree
authorGrant Likely <grant.likely@secretlab.ca>
Sat, 22 May 2010 06:36:56 +0000 (00:36 -0600)
committerGrant Likely <grant.likely@secretlab.ca>
Sat, 22 May 2010 06:36:56 +0000 (00:36 -0600)
Merging in current state of Linus' tree to deal with merge conflicts and
build failures in vio.c after merge.

Conflicts:
drivers/i2c/busses/i2c-cpm.c
drivers/i2c/busses/i2c-mpc.c
drivers/net/gianfar.c

Also fixed up one line in arch/powerpc/kernel/vio.c to use the
correct node pointer.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
211 files changed:
arch/microblaze/include/asm/device.h
arch/microblaze/include/asm/of_device.h
arch/microblaze/kernel/of_device.c
arch/microblaze/kernel/of_platform.c
arch/powerpc/include/asm/device.h
arch/powerpc/include/asm/macio.h
arch/powerpc/include/asm/of_device.h
arch/powerpc/kernel/ibmebus.c
arch/powerpc/kernel/of_device.c
arch/powerpc/kernel/of_platform.c
arch/powerpc/kernel/pci-common.c
arch/powerpc/kernel/vio.c
arch/powerpc/platforms/52xx/mpc52xx_gpio.c
arch/powerpc/platforms/52xx/mpc52xx_gpt.c
arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
arch/powerpc/platforms/82xx/ep8248e.c
arch/powerpc/platforms/83xx/suspend.c
arch/powerpc/platforms/cell/axon_msi.c
arch/powerpc/platforms/cell/iommu.c
arch/powerpc/platforms/pasemi/gpio_mdio.c
arch/powerpc/platforms/pasemi/setup.c
arch/powerpc/platforms/ps3/system-bus.c
arch/powerpc/platforms/pseries/iommu.c
arch/powerpc/sysdev/axonram.c
arch/powerpc/sysdev/bestcomm/bestcomm.c
arch/powerpc/sysdev/fsl_msi.c
arch/powerpc/sysdev/fsl_pmc.c
arch/powerpc/sysdev/fsl_rio.c
arch/powerpc/sysdev/pmi.c
arch/powerpc/sysdev/qe_lib/qe.c
arch/sparc/include/asm/device.h
arch/sparc/include/asm/fb.h
arch/sparc/include/asm/floppy_64.h
arch/sparc/include/asm/of_device.h
arch/sparc/include/asm/parport.h
arch/sparc/kernel/apc.c
arch/sparc/kernel/auxio_64.c
arch/sparc/kernel/central.c
arch/sparc/kernel/chmc.c
arch/sparc/kernel/ioport.c
arch/sparc/kernel/of_device_32.c
arch/sparc/kernel/of_device_64.c
arch/sparc/kernel/of_device_common.c
arch/sparc/kernel/pci.c
arch/sparc/kernel/pci_common.c
arch/sparc/kernel/pci_fire.c
arch/sparc/kernel/pci_msi.c
arch/sparc/kernel/pci_psycho.c
arch/sparc/kernel/pci_sabre.c
arch/sparc/kernel/pci_schizo.c
arch/sparc/kernel/pci_sun4v.c
arch/sparc/kernel/pmc.c
arch/sparc/kernel/power.c
arch/sparc/kernel/psycho_common.c
arch/sparc/kernel/sbus.c
arch/sparc/kernel/time_32.c
arch/sparc/kernel/time_64.c
drivers/ata/pata_macio.c
drivers/ata/pata_mpc52xx.c
drivers/ata/pata_of_platform.c
drivers/ata/sata_fsl.c
drivers/atm/fore200e.c
drivers/block/swim3.c
drivers/block/xsysace.c
drivers/cdrom/viocd.c
drivers/char/hw_random/n2-drv.c
drivers/char/hw_random/pasemi-rng.c
drivers/char/ipmi/ipmi_si_intf.c
drivers/char/viotape.c
drivers/char/xilinx_hwicap/xilinx_hwicap.c
drivers/crypto/amcc/crypto4xx_core.c
drivers/crypto/talitos.c
drivers/dma/fsldma.c
drivers/dma/ppc4xx/adma.c
drivers/edac/mpc85xx_edac.c
drivers/edac/ppc4xx_edac.c
drivers/gpio/pca953x.c
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/i2c/i2c-core.c
drivers/ide/pmac.c
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_asic.c
drivers/macintosh/macio_sysfs.c
drivers/macintosh/mediabay.c
drivers/macintosh/rack-meter.c
drivers/macintosh/smu.c
drivers/macintosh/therm_pm72.c
drivers/macintosh/therm_windtunnel.c
drivers/mmc/host/of_mmc_spi.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/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_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/greth.c
drivers/net/ibm_newemac/core.c
drivers/net/ibm_newemac/debug.c
drivers/net/ibm_newemac/debug.h
drivers/net/ibm_newemac/mal.c
drivers/net/ibm_newemac/rgmii.c
drivers/net/ibm_newemac/tah.c
drivers/net/ibm_newemac/zmii.c
drivers/net/ll_temac_main.c
drivers/net/myri_sbus.c
drivers/net/niu.c
drivers/net/phy/mdio-gpio.c
drivers/net/sunbmac.c
drivers/net/sunhme.c
drivers/net/sunlance.c
drivers/net/sunqe.c
drivers/net/ucc_geth.c
drivers/net/xilinx_emaclite.c
drivers/of/device.c
drivers/of/fdt.c
drivers/of/of_i2c.c
drivers/of/of_mdio.c
drivers/of/of_spi.c
drivers/of/platform.c
drivers/parport/parport_sunbpp.c
drivers/pcmcia/electra_cf.c
drivers/pcmcia/m8xx_pcmcia.c
drivers/sbus/char/bbc_envctrl.c
drivers/sbus/char/bbc_i2c.c
drivers/sbus/char/display7seg.c
drivers/sbus/char/envctrl.c
drivers/sbus/char/flash.c
drivers/sbus/char/uctrl.c
drivers/scsi/ibmvscsi/ibmvfc.c
drivers/scsi/ibmvscsi/ibmvscsi.c
drivers/scsi/qlogicpti.c
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/pmac_zilog.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/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/device.h
include/linux/i2c.h
include/linux/of_device.h
include/linux/of_fdt.h
include/linux/of_platform.h
sound/aoa/fabrics/layout.c
sound/aoa/soundbus/core.c
sound/aoa/soundbus/i2sbus/control.c
sound/aoa/soundbus/i2sbus/core.c
sound/aoa/soundbus/sysfs.c
sound/soc/fsl/mpc5200_dma.c
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 402b46e630f6d5acb6490b92a047264ce17ec802..123b2fe72d01f93a82076a87548e1050bead7d07 100644 (file)
 struct device_node;
 
 struct dev_archdata {
-       /* Optional pointer to an OF device node */
-       struct device_node      *of_node;
-
        /* DMA operations on that device */
        struct dma_map_ops      *dma_ops;
        void                    *dma_data;
 };
 
 struct pdev_archdata {
+       u64 dma_mask;
 };
 
-static inline void dev_archdata_set_node(struct dev_archdata *ad,
-                                        struct device_node *np)
-{
-       ad->of_node = np;
-}
-
-static inline struct device_node *
-dev_archdata_get_node(const struct dev_archdata *ad)
-{
-       return ad->of_node;
-}
-
 #endif /* _ASM_MICROBLAZE_DEVICE_H */
 
 
index ba917cfaefe6c4e6027ac46d12970f1168e08e35..73cb98040982434f87c4761616186b3c004bd51d 100644 (file)
@@ -21,9 +21,8 @@
  * probed using OF properties.
  */
 struct of_device {
-       struct device_node      *node; /* to be obsoleted */
-       u64                     dma_mask; /* DMA mask */
        struct device           dev; /* Generic device interface */
+       struct pdev_archdata    archdata;
 };
 
 extern ssize_t of_device_get_modalias(struct of_device *ofdev,
index 9a0f7632c47c92ed471250d4858731531e7bd381..b372787886ed5b5df23beeb663e4ea9067d9b7b1 100644 (file)
@@ -12,7 +12,7 @@
 void of_device_make_bus_id(struct of_device *dev)
 {
        static atomic_t bus_no_reg_magic;
-       struct device_node *node = dev->node;
+       struct device_node *node = dev->dev.of_node;
        const u32 *reg;
        u64 addr;
        int magic;
@@ -49,11 +49,10 @@ struct of_device *of_device_alloc(struct device_node *np,
        if (!dev)
                return NULL;
 
-       dev->node = of_node_get(np);
-       dev->dev.dma_mask = &dev->dma_mask;
+       dev->dev.of_node = of_node_get(np);
+       dev->dev.dma_mask = &dev->archdata.dma_mask;
        dev->dev.parent = parent;
        dev->dev.release = of_release_dev;
-       dev->dev.archdata.of_node = np;
 
        if (bus_id)
                dev_set_name(&dev->dev, bus_id);
@@ -75,17 +74,17 @@ int of_device_uevent(struct device *dev, struct kobj_uevent_env *env)
 
        ofdev = to_of_device(dev);
 
-       if (add_uevent_var(env, "OF_NAME=%s", ofdev->node->name))
+       if (add_uevent_var(env, "OF_NAME=%s", ofdev->dev.of_node->name))
                return -ENOMEM;
 
-       if (add_uevent_var(env, "OF_TYPE=%s", ofdev->node->type))
+       if (add_uevent_var(env, "OF_TYPE=%s", ofdev->dev.of_node->type))
                return -ENOMEM;
 
        /* Since the compatible field can contain pretty much anything
         * it's not really legal to split it out with commas. We split it
         * up using a number of environment variables instead. */
 
-       compat = of_get_property(ofdev->node, "compatible", &cplen);
+       compat = of_get_property(ofdev->dev.of_node, "compatible", &cplen);
        while (compat && *compat && cplen > 0) {
                if (add_uevent_var(env, "OF_COMPATIBLE_%d=%s", seen, compat))
                        return -ENOMEM;
index 0dc755286d38e44b8ff209d05d4d7c2a1c9d1b9a..ccf6f4257f4b83b24893818ad393b251f3f7b5e7 100644 (file)
@@ -47,7 +47,7 @@ struct of_device *of_platform_device_create(struct device_node *np,
        if (!dev)
                return NULL;
 
-       dev->dma_mask = 0xffffffffUL;
+       dev->archdata.dma_mask = 0xffffffffUL;
        dev->dev.bus = &of_platform_bus_type;
 
        /* We do not fill the DMA ops for platform devices by default.
@@ -166,7 +166,7 @@ EXPORT_SYMBOL(of_platform_bus_probe);
 
 static int of_dev_node_match(struct device *dev, void *data)
 {
-       return to_of_device(dev)->node == data;
+       return to_of_device(dev)->dev.of_node == data;
 }
 
 struct of_device *of_find_device_by_node(struct device_node *np)
@@ -184,7 +184,7 @@ EXPORT_SYMBOL(of_find_device_by_node);
 static int of_dev_phandle_match(struct device *dev, void *data)
 {
        phandle *ph = data;
-       return to_of_device(dev)->node->phandle == *ph;
+       return to_of_device(dev)->dev.of_node->phandle == *ph;
 }
 
 struct of_device *of_find_device_by_phandle(phandle ph)
index 6d94d27ed850a7110627f943398e65b885665075..a3954e4fcbe2edbc5466e8d2ff4bffb16ca57312 100644 (file)
@@ -10,9 +10,6 @@ struct dma_map_ops;
 struct device_node;
 
 struct dev_archdata {
-       /* Optional pointer to an OF device node */
-       struct device_node      *of_node;
-
        /* DMA operations on that device */
        struct dma_map_ops      *dma_ops;
 
@@ -30,19 +27,8 @@ struct dev_archdata {
 #endif
 };
 
-static inline void dev_archdata_set_node(struct dev_archdata *ad,
-                                        struct device_node *np)
-{
-       ad->of_node = np;
-}
-
-static inline struct device_node *
-dev_archdata_get_node(const struct dev_archdata *ad)
-{
-       return ad->of_node;
-}
-
 struct pdev_archdata {
+       u64 dma_mask;
 };
 
 #endif /* _ASM_POWERPC_DEVICE_H */
index a062c57696d080b99ae231a70a443ee075e443fc..19a661b4cb98205f6304c3c449062e6ca20e3c94 100644 (file)
@@ -108,7 +108,7 @@ static inline void* macio_get_drvdata(struct macio_dev *dev)
 
 static inline struct device_node *macio_get_of_node(struct macio_dev *mdev)
 {
-       return mdev->ofdev.node;
+       return mdev->ofdev.dev.of_node;
 }
 
 #ifdef CONFIG_PCI
index a64debf177dca8efcbe7534333f81a5b2d3d26d5..444e97e2982ea54cef41240b2ff2ea85ee1db761 100644 (file)
@@ -12,9 +12,8 @@
  */
 struct of_device
 {
-       struct device_node      *node;          /* to be obsoleted */
-       u64                     dma_mask;       /* DMA mask */
        struct device           dev;            /* Generic device interface */
+       struct pdev_archdata    archdata;
 };
 
 extern struct of_device *of_device_alloc(struct device_node *np,
index 71cf280da1847f3255a71d0bb9b9cf439b5852f8..21266abfbda64cb0a11fd2a10aa8f1af47c574a1 100644 (file)
@@ -140,14 +140,14 @@ static struct dma_map_ops ibmebus_dma_ops = {
 
 static int ibmebus_match_path(struct device *dev, void *data)
 {
-       struct device_node *dn = to_of_device(dev)->node;
+       struct device_node *dn = to_of_device(dev)->dev.of_node;
        return (dn->full_name &&
                (strcasecmp((char *)data, dn->full_name) == 0));
 }
 
 static int ibmebus_match_node(struct device *dev, void *data)
 {
-       return to_of_device(dev)->node == data;
+       return to_of_device(dev)->dev.of_node == data;
 }
 
 static int ibmebus_create_device(struct device_node *dn)
@@ -202,7 +202,7 @@ static int ibmebus_create_devices(const struct of_device_id *matches)
 int ibmebus_register_driver(struct of_platform_driver *drv)
 {
        /* If the driver uses devices that ibmebus doesn't know, add them */
-       ibmebus_create_devices(drv->match_table);
+       ibmebus_create_devices(drv->driver.of_match_table);
 
        return of_register_driver(drv, &ibmebus_bus_type);
 }
index a359cb08e9006168a60ba87b9e34df0c02256d51..df78e0236a02b808fe9c863f8721d92c164c0f97 100644 (file)
@@ -13,7 +13,7 @@
 static void of_device_make_bus_id(struct of_device *dev)
 {
        static atomic_t bus_no_reg_magic;
-       struct device_node *node = dev->node;
+       struct device_node *node = dev->dev.of_node;
        const u32 *reg;
        u64 addr;
        int magic;
@@ -69,11 +69,10 @@ struct of_device *of_device_alloc(struct device_node *np,
        if (!dev)
                return NULL;
 
-       dev->node = of_node_get(np);
-       dev->dev.dma_mask = &dev->dma_mask;
+       dev->dev.of_node = of_node_get(np);
+       dev->dev.dma_mask = &dev->archdata.dma_mask;
        dev->dev.parent = parent;
        dev->dev.release = of_release_dev;
-       dev->dev.archdata.of_node = np;
 
        if (bus_id)
                dev_set_name(&dev->dev, "%s", bus_id);
@@ -95,17 +94,17 @@ int of_device_uevent(struct device *dev, struct kobj_uevent_env *env)
 
        ofdev = to_of_device(dev);
 
-       if (add_uevent_var(env, "OF_NAME=%s", ofdev->node->name))
+       if (add_uevent_var(env, "OF_NAME=%s", ofdev->dev.of_node->name))
                return -ENOMEM;
 
-       if (add_uevent_var(env, "OF_TYPE=%s", ofdev->node->type))
+       if (add_uevent_var(env, "OF_TYPE=%s", ofdev->dev.of_node->type))
                return -ENOMEM;
 
         /* Since the compatible field can contain pretty much anything
          * it's not really legal to split it out with commas. We split it
          * up using a number of environment variables instead. */
 
-       compat = of_get_property(ofdev->node, "compatible", &cplen);
+       compat = of_get_property(ofdev->dev.of_node, "compatible", &cplen);
        while (compat && *compat && cplen > 0) {
                if (add_uevent_var(env, "OF_COMPATIBLE_%d=%s", seen, compat))
                        return -ENOMEM;
index 6c1dfc3ff8bc16903d976e73a242c6268eadb3d3..487a98851ba6f04f24fd50d200f712ba29df46ac 100644 (file)
@@ -74,7 +74,7 @@ struct of_device* of_platform_device_create(struct device_node *np,
        if (!dev)
                return NULL;
 
-       dev->dma_mask = 0xffffffffUL;
+       dev->archdata.dma_mask = 0xffffffffUL;
        dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
 
        dev->dev.bus = &of_platform_bus_type;
@@ -195,7 +195,7 @@ EXPORT_SYMBOL(of_platform_bus_probe);
 
 static int of_dev_node_match(struct device *dev, void *data)
 {
-       return to_of_device(dev)->node == data;
+       return to_of_device(dev)->dev.of_node == data;
 }
 
 struct of_device *of_find_device_by_node(struct device_node *np)
@@ -213,7 +213,7 @@ EXPORT_SYMBOL(of_find_device_by_node);
 static int of_dev_phandle_match(struct device *dev, void *data)
 {
        phandle *ph = data;
-       return to_of_device(dev)->node->phandle == *ph;
+       return to_of_device(dev)->dev.of_node->phandle == *ph;
 }
 
 struct of_device *of_find_device_by_phandle(phandle ph)
@@ -246,10 +246,10 @@ static int __devinit of_pci_phb_probe(struct of_device *dev,
        if (ppc_md.pci_setup_phb == NULL)
                return -ENODEV;
 
-       printk(KERN_INFO "Setting up PCI bus %s\n", dev->node->full_name);
+       pr_info("Setting up PCI bus %s\n", dev->dev.of_node->full_name);
 
        /* Alloc and setup PHB data structure */
-       phb = pcibios_alloc_controller(dev->node);
+       phb = pcibios_alloc_controller(dev->dev.of_node);
        if (!phb)
                return -ENODEV;
 
@@ -263,19 +263,19 @@ static int __devinit of_pci_phb_probe(struct of_device *dev,
        }
 
        /* Process "ranges" property */
-       pci_process_bridge_OF_ranges(phb, dev->node, 0);
+       pci_process_bridge_OF_ranges(phb, dev->dev.of_node, 0);
 
        /* Init pci_dn data structures */
        pci_devs_phb_init_dynamic(phb);
 
        /* Register devices with EEH */
 #ifdef CONFIG_EEH
-       if (dev->node->child)
-               eeh_add_device_tree_early(dev->node);
+       if (dev->dev.of_node->child)
+               eeh_add_device_tree_early(dev->dev.of_node);
 #endif /* CONFIG_EEH */
 
        /* Scan the bus */
-       pcibios_scan_phb(phb, dev->node);
+       pcibios_scan_phb(phb, dev->dev.of_node);
        if (phb->bus == NULL)
                return -ENXIO;
 
@@ -306,10 +306,11 @@ static struct of_device_id of_pci_phb_ids[] = {
 };
 
 static struct of_platform_driver of_pci_phb_driver = {
-       .match_table = of_pci_phb_ids,
        .probe = of_pci_phb_probe,
        .driver = {
                .name = "of-pci",
+               .owner = THIS_MODULE,
+               .of_match_table = of_pci_phb_ids,
        },
 };
 
index 0c0567e58409ae006ae4f077d4a54e2a29fb81d4..6646005dffb102b8b57172442aa8a71c5ed85a82 100644 (file)
@@ -1097,8 +1097,8 @@ void __devinit pcibios_setup_bus_devices(struct pci_bus *bus)
                if (dev->is_added)
                        continue;
 
-               /* Setup OF node pointer in archdata */
-               sd->of_node = pci_device_to_OF_node(dev);
+               /* Setup OF node pointer in the device */
+               dev->dev.of_node = pci_device_to_OF_node(dev);
 
                /* Fixup NUMA node as it may not be setup yet by the generic
                 * code and is needed by the DMA init
index 9ce7b62dc3a4f07e76daa301b2df12f52f524a05..00b9436f76525c501ecd8bcfab1abef5911a42d4 100644 (file)
@@ -707,7 +707,7 @@ static int vio_cmo_bus_probe(struct vio_dev *viodev)
         * Check to see that device has a DMA window and configure
         * entitlement for the device.
         */
-       if (of_get_property(viodev->dev.archdata.of_node,
+       if (of_get_property(viodev->dev.of_node,
                            "ibm,my-dma-window", NULL)) {
                /* Check that the driver is CMO enabled and get desired DMA */
                if (!viodrv->get_desired_dma) {
@@ -1054,7 +1054,7 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev)
        if (firmware_has_feature(FW_FEATURE_ISERIES))
                return vio_build_iommu_table_iseries(dev);
 
-       dma_window = of_get_property(dev->dev.archdata.of_node,
+       dma_window = of_get_property(dev->dev.of_node,
                                  "ibm,my-dma-window", NULL);
        if (!dma_window)
                return NULL;
@@ -1063,7 +1063,7 @@ static struct iommu_table *vio_build_iommu_table(struct vio_dev *dev)
        if (tbl == NULL)
                return NULL;
 
-       of_parse_dma_window(dev->dev.archdata.of_node, dma_window,
+       of_parse_dma_window(dev->dev.of_node, dma_window,
                            &tbl->it_index, &offset, &size);
 
        /* TCE table size - measured in tce entries */
@@ -1091,7 +1091,7 @@ static const struct vio_device_id *vio_match_device(
 {
        while (ids->type[0] != '\0') {
                if ((strncmp(dev->type, ids->type, strlen(ids->type)) == 0) &&
-                   of_device_is_compatible(dev->dev.archdata.of_node,
+                   of_device_is_compatible(dev->dev.of_node,
                                         ids->compat))
                        return ids;
                ids++;
@@ -1184,7 +1184,7 @@ EXPORT_SYMBOL(vio_unregister_driver);
 static void __devinit vio_dev_release(struct device *dev)
 {
        /* XXX should free TCE table */
-       of_node_put(dev->archdata.of_node);
+       of_node_put(dev->of_node);
        kfree(to_vio_dev(dev));
 }
 
@@ -1235,7 +1235,7 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node)
                if (unit_address != NULL)
                        viodev->unit_address = *unit_address;
        }
-       viodev->dev.archdata.of_node = of_node_get(of_node);
+       viodev->dev.of_node = of_node_get(of_node);
 
        if (firmware_has_feature(FW_FEATURE_CMO))
                vio_cmo_set_dma_ops(viodev);
@@ -1320,7 +1320,7 @@ static ssize_t name_show(struct device *dev,
 static ssize_t devspec_show(struct device *dev,
                struct device_attribute *attr, char *buf)
 {
-       struct device_node *of_node = dev->archdata.of_node;
+       struct device_node *of_node = dev->of_node;
 
        return sprintf(buf, "%s\n", of_node ? of_node->full_name : "none");
 }
@@ -1332,7 +1332,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
        struct device_node *dn;
        const char *cp;
 
-       dn = dev->archdata.of_node;
+       dn = dev->of_node;
        if (!dn)
                return -ENODEV;
        cp = of_get_property(dn, "compatible", NULL);
@@ -1370,7 +1370,7 @@ static int vio_hotplug(struct device *dev, struct kobj_uevent_env *env)
        struct device_node *dn;
        const char *cp;
 
-       dn = dev->archdata.of_node;
+       dn = dev->of_node;
        if (!dn)
                return -ENODEV;
        cp = of_get_property(dn, "compatible", NULL);
@@ -1402,7 +1402,7 @@ static struct bus_type vio_bus_type = {
 */
 const void *vio_get_attribute(struct vio_dev *vdev, char *which, int *length)
 {
-       return of_get_property(vdev->dev.archdata.of_node, which, length);
+       return of_get_property(vdev->dev.of_node, which, length);
 }
 EXPORT_SYMBOL(vio_get_attribute);
 
index fda7c2a18282613e8847f577bd425f8aa4367537..ca5305a5bd61d8021c50dbb452db5adc376b4a0b 100644 (file)
@@ -168,7 +168,7 @@ static int __devinit mpc52xx_wkup_gpiochip_probe(struct of_device *ofdev,
        ofchip->gc.get              = mpc52xx_wkup_gpio_get;
        ofchip->gc.set              = mpc52xx_wkup_gpio_set;
 
-       ret = of_mm_gpiochip_add(ofdev->node, &chip->mmchip);
+       ret = of_mm_gpiochip_add(ofdev->dev.of_node, &chip->mmchip);
        if (ret)
                return ret;
 
@@ -193,8 +193,11 @@ static const struct of_device_id mpc52xx_wkup_gpiochip_match[] = {
 };
 
 static struct of_platform_driver mpc52xx_wkup_gpiochip_driver = {
-       .name = "gpio_wkup",
-       .match_table = mpc52xx_wkup_gpiochip_match,
+       .driver = {
+               .name = "gpio_wkup",
+               .owner = THIS_MODULE,
+               .of_match_table = mpc52xx_wkup_gpiochip_match,
+       },
        .probe = mpc52xx_wkup_gpiochip_probe,
        .remove = mpc52xx_gpiochip_remove,
 };
@@ -329,7 +332,7 @@ static int __devinit mpc52xx_simple_gpiochip_probe(struct of_device *ofdev,
        ofchip->gc.get              = mpc52xx_simple_gpio_get;
        ofchip->gc.set              = mpc52xx_simple_gpio_set;
 
-       ret = of_mm_gpiochip_add(ofdev->node, &chip->mmchip);
+       ret = of_mm_gpiochip_add(ofdev->dev.of_node, &chip->mmchip);
        if (ret)
                return ret;
 
@@ -349,8 +352,11 @@ static const struct of_device_id mpc52xx_simple_gpiochip_match[] = {
 };
 
 static struct of_platform_driver mpc52xx_simple_gpiochip_driver = {
-       .name = "gpio",
-       .match_table = mpc52xx_simple_gpiochip_match,
+       .driver = {
+               .name = "gpio",
+               .owner = THIS_MODULE,
+               .of_match_table = mpc52xx_simple_gpiochip_match,
+       },
        .probe = mpc52xx_simple_gpiochip_probe,
        .remove = mpc52xx_gpiochip_remove,
 };
index a60ee39d3b783d09ab67f2d3d3280af9bfdaf34d..46c93578cbf048230dc24fcd906a113872eb3bfb 100644 (file)
@@ -734,8 +734,8 @@ static int __devinit mpc52xx_gpt_probe(struct of_device *ofdev,
 
        spin_lock_init(&gpt->lock);
        gpt->dev = &ofdev->dev;
-       gpt->ipb_freq = mpc5xxx_get_bus_frequency(ofdev->node);
-       gpt->regs = of_iomap(ofdev->node, 0);
+       gpt->ipb_freq = mpc5xxx_get_bus_frequency(ofdev->dev.of_node);
+       gpt->regs = of_iomap(ofdev->dev.of_node, 0);
        if (!gpt->regs) {
                kfree(gpt);
                return -ENOMEM;
@@ -743,21 +743,21 @@ static int __devinit mpc52xx_gpt_probe(struct of_device *ofdev,
 
        dev_set_drvdata(&ofdev->dev, gpt);
 
-       mpc52xx_gpt_gpio_setup(gpt, ofdev->node);
-       mpc52xx_gpt_irq_setup(gpt, ofdev->node);
+       mpc52xx_gpt_gpio_setup(gpt, ofdev->dev.of_node);
+       mpc52xx_gpt_irq_setup(gpt, ofdev->dev.of_node);
 
        mutex_lock(&mpc52xx_gpt_list_mutex);
        list_add(&gpt->list, &mpc52xx_gpt_list);
        mutex_unlock(&mpc52xx_gpt_list_mutex);
 
        /* check if this device could be a watchdog */
-       if (of_get_property(ofdev->node, "fsl,has-wdt", NULL) ||
-           of_get_property(ofdev->node, "has-wdt", NULL)) {
+       if (of_get_property(ofdev->dev.of_node, "fsl,has-wdt", NULL) ||
+           of_get_property(ofdev->dev.of_node, "has-wdt", NULL)) {
                const u32 *on_boot_wdt;
 
                gpt->wdt_mode = MPC52xx_GPT_CAN_WDT;
-               on_boot_wdt = of_get_property(ofdev->node, "fsl,wdt-on-boot",
-                                             NULL);
+               on_boot_wdt = of_get_property(ofdev->dev.of_node,
+                                             "fsl,wdt-on-boot", NULL);
                if (on_boot_wdt) {
                        dev_info(gpt->dev, "used as watchdog\n");
                        gpt->wdt_mode |= MPC52xx_GPT_IS_WDT;
@@ -784,8 +784,11 @@ static const struct of_device_id mpc52xx_gpt_match[] = {
 };
 
 static struct of_platform_driver mpc52xx_gpt_driver = {
-       .name = "mpc52xx-gpt",
-       .match_table = mpc52xx_gpt_match,
+       .driver = {
+               .name = "mpc52xx-gpt",
+               .owner = THIS_MODULE,
+               .of_match_table = mpc52xx_gpt_match,
+       },
        .probe = mpc52xx_gpt_probe,
        .remove = mpc52xx_gpt_remove,
 };
index d4f8be307cd5b3aef4adc4b360dbfbf08190a442..e86aec644501b26ff767379dfdc30a07df745e28 100644 (file)
@@ -445,14 +445,14 @@ mpc52xx_lpbfifo_probe(struct of_device *op, const struct of_device_id *match)
        if (lpbfifo.dev != NULL)
                return -ENOSPC;
 
-       lpbfifo.irq = irq_of_parse_and_map(op->node, 0);
+       lpbfifo.irq = irq_of_parse_and_map(op->dev.of_node, 0);
        if (!lpbfifo.irq)
                return -ENODEV;
 
-       if (of_address_to_resource(op->node, 0, &res))
+       if (of_address_to_resource(op->dev.of_node, 0, &res))
                return -ENODEV;
        lpbfifo.regs_phys = res.start;
-       lpbfifo.regs = of_iomap(op->node, 0);
+       lpbfifo.regs = of_iomap(op->dev.of_node, 0);
        if (!lpbfifo.regs)
                return -ENOMEM;
 
@@ -537,9 +537,11 @@ static struct of_device_id mpc52xx_lpbfifo_match[] __devinitconst = {
 };
 
 static struct of_platform_driver mpc52xx_lpbfifo_driver = {
-       .owner = THIS_MODULE,
-       .name = "mpc52xx-lpbfifo",
-       .match_table = mpc52xx_lpbfifo_match,
+       .driver = {
+               .name = "mpc52xx-lpbfifo",
+               .owner = THIS_MODULE,
+               .of_match_table = mpc52xx_lpbfifo_match,
+       },
        .probe = mpc52xx_lpbfifo_probe,
        .remove = __devexit_p(mpc52xx_lpbfifo_remove),
 };
index f21555d3395ae7ab3b5d4c69d600b84fd1a039bc..9f2e52b36f91673c4787c650bb1fe8b31ae3a09f 100644 (file)
@@ -119,12 +119,12 @@ static int __devinit ep8248e_mdio_probe(struct of_device *ofdev,
        struct device_node *node;
        int ret;
 
-       node = of_get_parent(ofdev->node);
+       node = of_get_parent(ofdev->dev.of_node);
        of_node_put(node);
        if (node != ep8248e_bcsr_node)
                return -ENODEV;
 
-       ret = of_address_to_resource(ofdev->node, 0, &res);
+       ret = of_address_to_resource(ofdev->dev.of_node, 0, &res);
        if (ret)
                return ret;
 
@@ -142,7 +142,7 @@ static int __devinit ep8248e_mdio_probe(struct of_device *ofdev,
        bus->parent = &ofdev->dev;
        snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start);
 
-       ret = of_mdiobus_register(bus, ofdev->node);
+       ret = of_mdiobus_register(bus, ofdev->dev.of_node);
        if (ret)
                goto err_free_irq;
 
@@ -170,8 +170,9 @@ static const struct of_device_id ep8248e_mdio_match[] = {
 static struct of_platform_driver ep8248e_mdio_driver = {
        .driver = {
                .name = "ep8248e-mdio-bitbang",
+               .owner = THIS_MODULE,
+               .of_match_table = ep8248e_mdio_match,
        },
-       .match_table = ep8248e_mdio_match,
        .probe = ep8248e_mdio_probe,
        .remove = ep8248e_mdio_remove,
 };
index 43805348b81ee90be3577f9dfd8a08693363cb60..ebe6c353720972f992936da851bff121b651e9f2 100644 (file)
@@ -321,7 +321,7 @@ static struct platform_suspend_ops mpc83xx_suspend_ops = {
 static int pmc_probe(struct of_device *ofdev,
                      const struct of_device_id *match)
 {
-       struct device_node *np = ofdev->node;
+       struct device_node *np = ofdev->dev.of_node;
        struct resource res;
        struct pmc_type *type = match->data;
        int ret = 0;
@@ -423,8 +423,11 @@ static struct of_device_id pmc_match[] = {
 };
 
 static struct of_platform_driver pmc_driver = {
-       .name = "mpc83xx-pmc",
-       .match_table = pmc_match,
+       .driver = {
+               .name = "mpc83xx-pmc",
+               .owner = THIS_MODULE,
+               .of_match_table = pmc_match,
+       },
        .probe = pmc_probe,
        .remove = pmc_remove
 };
index 8efe48192f3f50a0748978641fbad80ca050258c..6257e5378615eeab7c687d7375490a48169c8cc6 100644 (file)
@@ -345,7 +345,7 @@ static int axon_msi_shutdown(struct of_device *device)
 static int axon_msi_probe(struct of_device *device,
                          const struct of_device_id *device_id)
 {
-       struct device_node *dn = device->node;
+       struct device_node *dn = device->dev.of_node;
        struct axon_msic *msic;
        unsigned int virq;
        int dcr_base, dcr_len;
@@ -447,11 +447,12 @@ static const struct of_device_id axon_msi_device_id[] = {
 };
 
 static struct of_platform_driver axon_msi_driver = {
-       .match_table    = axon_msi_device_id,
        .probe          = axon_msi_probe,
        .shutdown       = axon_msi_shutdown,
-       .driver         = {
-               .name   = "axon-msi"
+       .driver = {
+               .name = "axon-msi",
+               .owner = THIS_MODULE,
+               .of_match_table = axon_msi_device_id,
        },
 };
 
index e3ec4976fae7a554c405ce7823d34b09bfbf37c5..22667a09d40eee6276eff723a8e4523e2b2e5bd2 100644 (file)
@@ -545,7 +545,6 @@ static struct iommu_table *cell_get_iommu_table(struct device *dev)
 {
        struct iommu_window *window;
        struct cbe_iommu *iommu;
-       struct dev_archdata *archdata = &dev->archdata;
 
        /* Current implementation uses the first window available in that
         * node's iommu. We -might- do something smarter later though it may
@@ -554,7 +553,7 @@ static struct iommu_table *cell_get_iommu_table(struct device *dev)
        iommu = cell_iommu_for_node(dev_to_node(dev));
        if (iommu == NULL || list_empty(&iommu->windows)) {
                printk(KERN_ERR "iommu: missing iommu for %s (node %d)\n",
-                      archdata->of_node ? archdata->of_node->full_name : "?",
+                      dev->of_node ? dev->of_node->full_name : "?",
                       dev_to_node(dev));
                return NULL;
        }
@@ -897,7 +896,7 @@ static u64 cell_iommu_get_fixed_address(struct device *dev)
        const u32 *ranges = NULL;
        int i, len, best, naddr, nsize, pna, range_size;
 
-       np = of_node_get(dev->archdata.of_node);
+       np = of_node_get(dev->of_node);
        while (1) {
                naddr = of_n_addr_cells(np);
                nsize = of_n_size_cells(np);
index 0f881f64583e97f9436b48c6156d643db7ddead1..627ee089e75d4bde3b04b3d9ab1ee48d54c931d0 100644 (file)
@@ -220,7 +220,7 @@ static int __devinit gpio_mdio_probe(struct of_device *ofdev,
                                     const struct of_device_id *match)
 {
        struct device *dev = &ofdev->dev;
-       struct device_node *np = ofdev->node;
+       struct device_node *np = ofdev->dev.of_node;
        struct mii_bus *new_bus;
        struct gpio_priv *priv;
        const unsigned int *prop;
@@ -301,11 +301,12 @@ MODULE_DEVICE_TABLE(of, gpio_mdio_match);
 
 static struct of_platform_driver gpio_mdio_driver =
 {
-       .match_table    = gpio_mdio_match,
        .probe          = gpio_mdio_probe,
        .remove         = gpio_mdio_remove,
-       .driver         = {
-               .name   = "gpio-mdio-bitbang",
+       .driver = {
+               .name = "gpio-mdio-bitbang",
+               .owner = THIS_MODULE,
+               .of_match_table = gpio_mdio_match,
        },
 };
 
index ac6fdd9732912848dd3cc3ee8d606e9ff8c6a894..f372ec1691a3d79450e6cf64f6f7d72b38e8f590 100644 (file)
@@ -360,10 +360,10 @@ static int pcmcia_notify(struct notifier_block *nb, unsigned long action,
        /* We know electra_cf devices will always have of_node set, since
         * electra_cf is an of_platform driver.
         */
-       if (!parent->archdata.of_node)
+       if (!parent->of_node)
                return 0;
 
-       if (!of_device_is_compatible(parent->archdata.of_node, "electra-cf"))
+       if (!of_device_is_compatible(parent->of_node, "electra-cf"))
                return 0;
 
        /* We use the direct ops for localbus */
index 6d09f5e3e7e49c77bd286dcc22366b4daf53c4b8..23083c397528408e182b2e2cd8be6d5078aafdab 100644 (file)
@@ -766,7 +766,7 @@ int ps3_system_bus_device_register(struct ps3_system_bus_device *dev)
                BUG();
        };
 
-       dev->core.archdata.of_node = NULL;
+       dev->core.of_node = NULL;
        set_dev_node(&dev->core, 0);
 
        pr_debug("%s:%d add %s\n", __func__, __LINE__, dev_name(&dev->core));
index 1a0000a4b6d62636d93babf7b495000413aa000a..d26182d42cbfb5a712fb6803dfdf056f560e0c33 100644 (file)
@@ -468,7 +468,7 @@ static void pci_dma_dev_setup_pSeries(struct pci_dev *dev)
 
        pr_debug("pci_dma_dev_setup_pSeries: %s\n", pci_name(dev));
 
-       dn = dev->dev.archdata.of_node;
+       dn = dev->dev.of_node;
 
        /* If we're the direct child of a root bus, then we need to allocate
         * an iommu table ourselves. The bus setup code should have setup
index 88f4ae787832a270053673b4f0ceb7e5fe1b62cf..402d2212162f6bddc0a79506112448d6f6714461 100644 (file)
@@ -185,7 +185,7 @@ axon_ram_probe(struct of_device *device, const struct of_device_id *device_id)
        axon_ram_bank_id++;
 
        dev_info(&device->dev, "Found memory controller on %s\n",
-                       device->node->full_name);
+                       device->dev.of_node->full_name);
 
        bank = kzalloc(sizeof(struct axon_ram_bank), GFP_KERNEL);
        if (bank == NULL) {
@@ -198,7 +198,7 @@ axon_ram_probe(struct of_device *device, const struct of_device_id *device_id)
 
        bank->device = device;
 
-       if (of_address_to_resource(device->node, 0, &resource) != 0) {
+       if (of_address_to_resource(device->dev.of_node, 0, &resource) != 0) {
                dev_err(&device->dev, "Cannot access device tree\n");
                rc = -EFAULT;
                goto failed;
@@ -253,7 +253,7 @@ axon_ram_probe(struct of_device *device, const struct of_device_id *device_id)
        blk_queue_logical_block_size(bank->disk->queue, AXON_RAM_SECTOR_SIZE);
        add_disk(bank->disk);
 
-       bank->irq_id = irq_of_parse_and_map(device->node, 0);
+       bank->irq_id = irq_of_parse_and_map(device->dev.of_node, 0);
        if (bank->irq_id == NO_IRQ) {
                dev_err(&device->dev, "Cannot access ECC interrupt ID\n");
                rc = -EFAULT;
@@ -327,12 +327,12 @@ static struct of_device_id axon_ram_device_id[] = {
 };
 
 static struct of_platform_driver axon_ram_driver = {
-       .match_table    = axon_ram_device_id,
        .probe          = axon_ram_probe,
        .remove         = axon_ram_remove,
-       .driver         = {
-               .owner  = THIS_MODULE,
-               .name   = AXON_RAM_MODULE_NAME,
+       .driver = {
+               .name = AXON_RAM_MODULE_NAME,
+               .owner = THIS_MODULE,
+               .of_match_table = axon_ram_device_id,
        },
 };
 
index 378ebd9aac18567af6b249c34138e71698a52dd0..a7c5c470af147f73edb4a7448879b20fabf522cc 100644 (file)
@@ -377,7 +377,7 @@ mpc52xx_bcom_probe(struct of_device *op, const struct of_device_id *match)
        printk(KERN_INFO "DMA: MPC52xx BestComm driver\n");
 
        /* Get the bestcomm node */
-       of_node_get(op->node);
+       of_node_get(op->dev.of_node);
 
        /* Prepare SRAM */
        ofn_sram = of_find_matching_node(NULL, mpc52xx_sram_ids);
@@ -406,10 +406,10 @@ mpc52xx_bcom_probe(struct of_device *op, const struct of_device_id *match)
        }
 
        /* Save the node */
-       bcom_eng->ofnode = op->node;
+       bcom_eng->ofnode = op->dev.of_node;
 
        /* Get, reserve & map io */
-       if (of_address_to_resource(op->node, 0, &res_bcom)) {
+       if (of_address_to_resource(op->dev.of_node, 0, &res_bcom)) {
                printk(KERN_ERR DRIVER_NAME ": "
                        "Can't get resource\n");
                rv = -EINVAL;
@@ -453,7 +453,7 @@ error_sramclean:
        kfree(bcom_eng);
        bcom_sram_cleanup();
 error_ofput:
-       of_node_put(op->node);
+       of_node_put(op->dev.of_node);
 
        printk(KERN_ERR "DMA: MPC52xx BestComm init failed !\n");
 
@@ -494,14 +494,12 @@ MODULE_DEVICE_TABLE(of, mpc52xx_bcom_of_match);
 
 
 static struct of_platform_driver mpc52xx_bcom_of_platform_driver = {
-       .owner          = THIS_MODULE,
-       .name           = DRIVER_NAME,
-       .match_table    = mpc52xx_bcom_of_match,
        .probe          = mpc52xx_bcom_probe,
        .remove         = mpc52xx_bcom_remove,
-       .driver         = {
-               .name   = DRIVER_NAME,
-               .owner  = THIS_MODULE,
+       .driver = {
+               .name = DRIVER_NAME,
+               .owner = THIS_MODULE,
+               .of_match_table = mpc52xx_bcom_of_match,
        },
 };
 
index 3482e3fd89c04e99a0205f1fbc82ad7d28313f3e..a7be144f5874335da103e0af4c33b3b3d1e1f3fe 100644 (file)
@@ -249,7 +249,7 @@ static int __devinit fsl_of_msi_probe(struct of_device *dev,
                goto error_out;
        }
 
-       msi->irqhost = irq_alloc_host(dev->node, IRQ_HOST_MAP_LINEAR,
+       msi->irqhost = irq_alloc_host(dev->dev.of_node, IRQ_HOST_MAP_LINEAR,
                                      NR_MSI_IRQS, &fsl_msi_host_ops, 0);
 
        if (msi->irqhost == NULL) {
@@ -259,10 +259,10 @@ static int __devinit fsl_of_msi_probe(struct of_device *dev,
        }
 
        /* Get the MSI reg base */
-       err = of_address_to_resource(dev->node, 0, &res);
+       err = of_address_to_resource(dev->dev.of_node, 0, &res);
        if (err) {
                dev_err(&dev->dev, "%s resource error!\n",
-                               dev->node->full_name);
+                               dev->dev.of_node->full_name);
                goto error_out;
        }
 
@@ -285,16 +285,16 @@ static int __devinit fsl_of_msi_probe(struct of_device *dev,
                goto error_out;
        }
 
-       p = of_get_property(dev->node, "interrupts", &count);
+       p = of_get_property(dev->dev.of_node, "interrupts", &count);
        if (!p) {
                dev_err(&dev->dev, "no interrupts property found on %s\n",
-                               dev->node->full_name);
+                               dev->dev.of_node->full_name);
                err = -ENODEV;
                goto error_out;
        }
        if (count % 8 != 0) {
                dev_err(&dev->dev, "Malformed interrupts property on %s\n",
-                               dev->node->full_name);
+                               dev->dev.of_node->full_name);
                err = -EINVAL;
                goto error_out;
        }
@@ -303,7 +303,7 @@ static int __devinit fsl_of_msi_probe(struct of_device *dev,
        for (i = 0; i < count / 2; i++) {
                if (i > NR_MSI_REG)
                        break;
-               virt_msir = irq_of_parse_and_map(dev->node, i);
+               virt_msir = irq_of_parse_and_map(dev->dev.of_node, i);
                if (virt_msir != NO_IRQ) {
                        set_irq_data(virt_msir, (void *)i);
                        set_irq_chained_handler(virt_msir, fsl_msi_cascade);
@@ -345,8 +345,11 @@ static const struct of_device_id fsl_of_msi_ids[] = {
 };
 
 static struct of_platform_driver fsl_of_msi_driver = {
-       .name = "fsl-msi",
-       .match_table = fsl_of_msi_ids,
+       .driver = {
+               .name = "fsl-msi",
+               .owner = THIS_MODULE,
+               .of_match_table = fsl_of_msi_ids,
+       },
        .probe = fsl_of_msi_probe,
 };
 
index a7635a993dca545c144c3183201337f89997eaa1..9082eb921ad995f7caac8752d00f9dc91cf48381 100644 (file)
@@ -60,7 +60,7 @@ static struct platform_suspend_ops pmc_suspend_ops = {
 
 static int pmc_probe(struct of_device *ofdev, const struct of_device_id *id)
 {
-       pmc_regs = of_iomap(ofdev->node, 0);
+       pmc_regs = of_iomap(ofdev->dev.of_node, 0);
        if (!pmc_regs)
                return -ENOMEM;
 
@@ -76,8 +76,11 @@ static const struct of_device_id pmc_ids[] = {
 };
 
 static struct of_platform_driver pmc_driver = {
-       .driver.name = "fsl-pmc",
-       .match_table = pmc_ids,
+       .driver = {
+               .name = "fsl-pmc",
+               .owner = THIS_MODULE,
+               .of_match_table = pmc_ids,
+       },
        .probe = pmc_probe,
 };
 
index 71fba88f50db86e5946593fe0f8407ffc078974b..6a1fde0d22b04b016ee723ec8baa0c35e0bf0b96 100644 (file)
@@ -1015,41 +1015,41 @@ int fsl_rio_setup(struct of_device *dev)
        u64 law_start, law_size;
        int paw, aw, sw;
 
-       if (!dev->node) {
+       if (!dev->dev.of_node) {
                dev_err(&dev->dev, "Device OF-Node is NULL");
                return -EFAULT;
        }
 
-       rc = of_address_to_resource(dev->node, 0, &regs);
+       rc = of_address_to_resource(dev->dev.of_node, 0, &regs);
        if (rc) {
                dev_err(&dev->dev, "Can't get %s property 'reg'\n",
-                               dev->node->full_name);
+                               dev->dev.of_node->full_name);
                return -EFAULT;
        }
-       dev_info(&dev->dev, "Of-device full name %s\n", dev->node->full_name);
+       dev_info(&dev->dev, "Of-device full name %s\n", dev->dev.of_node->full_name);
        dev_info(&dev->dev, "Regs: %pR\n", &regs);
 
-       dt_range = of_get_property(dev->node, "ranges", &rlen);
+       dt_range = of_get_property(dev->dev.of_node, "ranges", &rlen);
        if (!dt_range) {
                dev_err(&dev->dev, "Can't get %s property 'ranges'\n",
-                               dev->node->full_name);
+                               dev->dev.of_node->full_name);
                return -EFAULT;
        }
 
        /* Get node address wide */
-       cell = of_get_property(dev->node, "#address-cells", NULL);
+       cell = of_get_property(dev->dev.of_node, "#address-cells", NULL);
        if (cell)
                aw = *cell;
        else
-               aw = of_n_addr_cells(dev->node);
+               aw = of_n_addr_cells(dev->dev.of_node);
        /* Get node size wide */
-       cell = of_get_property(dev->node, "#size-cells", NULL);
+       cell = of_get_property(dev->dev.of_node, "#size-cells", NULL);
        if (cell)
                sw = *cell;
        else
-               sw = of_n_size_cells(dev->node);
+               sw = of_n_size_cells(dev->dev.of_node);
        /* Get parent address wide wide */
-       paw = of_n_addr_cells(dev->node);
+       paw = of_n_addr_cells(dev->dev.of_node);
 
        law_start = of_read_number(dt_range + aw, paw);
        law_size = of_read_number(dt_range + aw + paw, sw);
@@ -1089,9 +1089,9 @@ int fsl_rio_setup(struct of_device *dev)
        port->iores.flags = IORESOURCE_MEM;
        port->iores.name = "rio_io_win";
 
-       priv->bellirq = irq_of_parse_and_map(dev->node, 2);
-       priv->txirq = irq_of_parse_and_map(dev->node, 3);
-       priv->rxirq = irq_of_parse_and_map(dev->node, 4);
+       priv->bellirq = irq_of_parse_and_map(dev->dev.of_node, 2);
+       priv->txirq = irq_of_parse_and_map(dev->dev.of_node, 3);
+       priv->rxirq = irq_of_parse_and_map(dev->dev.of_node, 4);
        dev_info(&dev->dev, "bellirq: %d, txirq: %d, rxirq %d\n", priv->bellirq,
                                priv->txirq, priv->rxirq);
 
@@ -1195,7 +1195,7 @@ static int __devinit fsl_of_rio_rpn_probe(struct of_device *dev,
 {
        int rc;
        printk(KERN_INFO "Setting up RapidIO peer-to-peer network %s\n",
-                       dev->node->full_name);
+                       dev->dev.of_node->full_name);
 
        rc = fsl_rio_setup(dev);
        if (rc)
@@ -1215,8 +1215,11 @@ static const struct of_device_id fsl_of_rio_rpn_ids[] = {
 };
 
 static struct of_platform_driver fsl_of_rio_rpn_driver = {
-       .name = "fsl-of-rio",
-       .match_table = fsl_of_rio_rpn_ids,
+       .driver = {
+               .name = "fsl-of-rio",
+               .owner = THIS_MODULE,
+               .of_match_table = fsl_of_rio_rpn_ids,
+       },
        .probe = fsl_of_rio_rpn_probe,
 };
 
index 652652db4ce283f11cee235d689268d0dcfce36d..d07137a07d7509b0e6cf082f5de6e421922f2091 100644 (file)
@@ -124,7 +124,7 @@ static void pmi_notify_handlers(struct work_struct *work)
 static int pmi_of_probe(struct of_device *dev,
                        const struct of_device_id *match)
 {
-       struct device_node *np = dev->node;
+       struct device_node *np = dev->dev.of_node;
        int rc;
 
        if (data) {
@@ -206,11 +206,12 @@ static int pmi_of_remove(struct of_device *dev)
 }
 
 static struct of_platform_driver pmi_of_platform_driver = {
-       .match_table    = pmi_match,
        .probe          = pmi_of_probe,
        .remove         = pmi_of_remove,
-       .driver         = {
-               .name   = "pmi",
+       .driver = {
+               .name = "pmi",
+               .owner = THIS_MODULE,
+               .of_match_table = pmi_match,
        },
 };
 
index 149393c02c3f117b0f2f9d7e2387b5c83fffcdcf..093e0ae1a9418fc0830be5c6bee35041c774d198 100644 (file)
@@ -669,8 +669,11 @@ static const struct of_device_id qe_ids[] = {
 };
 
 static struct of_platform_driver qe_driver = {
-       .driver.name = "fsl-qe",
-       .match_table = qe_ids,
+       .driver = {
+               .name = "fsl-qe",
+               .owner = THIS_MODULE,
+               .of_match_table = qe_ids,
+       },
        .probe = qe_probe,
        .resume = qe_resume,
 };
index f3b85b6b0b764796407f2e2a026a5a45163561e2..d4c45214741252d7327daf0ba0f50c10dcef6f5f 100644 (file)
@@ -13,25 +13,10 @@ struct dev_archdata {
        void                    *iommu;
        void                    *stc;
        void                    *host_controller;
-
-       struct device_node      *prom_node;
        struct of_device        *op;
-
        int                     numa_node;
 };
 
-static inline void dev_archdata_set_node(struct dev_archdata *ad,
-                                        struct device_node *np)
-{
-       ad->prom_node = np;
-}
-
-static inline struct device_node *
-dev_archdata_get_node(const struct dev_archdata *ad)
-{
-       return ad->prom_node;
-}
-
 struct pdev_archdata {
 };
 
index b83e447296553d08b9fd04541e70c024dc6276a2..e834880be2040944783d7b0e31be1158ed788d4c 100644 (file)
@@ -18,7 +18,7 @@ static inline int fb_is_primary_device(struct fb_info *info)
        struct device *dev = info->device;
        struct device_node *node;
 
-       node = dev->archdata.prom_node;
+       node = dev->of_node;
        if (node &&
            node == of_console_device)
                return 1;
index 36439d67ad7111cadbc4cc3810e9577932211094..8fac3ab22f36f6ebde89a140ce08e4fd5d107099 100644 (file)
@@ -589,7 +589,7 @@ static unsigned long __init sun_floppy_init(void)
                if (!op)
                        return 0;
 
-               state_prop = of_get_property(op->node, "status", NULL);
+               state_prop = of_get_property(op->dev.of_node, "status", NULL);
                if (state_prop && !strncmp(state_prop, "disabled", 8))
                        return 0;
 
@@ -716,7 +716,7 @@ static unsigned long __init sun_floppy_init(void)
 
                return sun_floppy_types[0];
        }
-       prop = of_get_property(op->node, "status", NULL);
+       prop = of_get_property(op->dev.of_node, "status", NULL);
        if (prop && !strncmp(state, "disabled", 8))
                return 0;
 
index a5d9811f9697734863510a8b1c7336d228ac45ab..f320246a05863ddfd05d9e107e1aa85f12f24880 100644 (file)
@@ -14,7 +14,6 @@
  */
 struct of_device
 {
-       struct device_node              *node;
        struct device                   dev;
        struct resource                 resource[PROMREG_MAX];
        unsigned int                    irqs[PROMINTR_MAX];
index ff9ead640c4aa090f33de6f9576766b6d639e6d8..c333b8d0949bf199b9a88a8b406ff644ca69c74e 100644 (file)
@@ -113,7 +113,7 @@ static int __devinit ecpp_probe(struct of_device *op, const struct of_device_id
        struct parport *p;
        int slot, err;
 
-       parent = op->node->parent;
+       parent = op->dev.of_node->parent;
        if (!strcmp(parent->name, "dma")) {
                p = parport_pc_probe_port(base, base + 0x400,
                                          op->irqs[0], PARPORT_DMA_NOFIFO,
@@ -232,8 +232,11 @@ static const struct of_device_id ecpp_match[] = {
 };
 
 static struct of_platform_driver ecpp_driver = {
-       .name                   = "ecpp",
-       .match_table            = ecpp_match,
+       .driver = {
+               .name = "ecpp",
+               .owner = THIS_MODULE,
+               .of_match_table = ecpp_match,
+       },
        .probe                  = ecpp_probe,
        .remove                 = __devexit_p(ecpp_remove),
 };
index 71ec90b9e3167d890f9a25bf28b451c2e703c9f8..b27476caa1333d4fbc2a85b380c4eb3c392c4c97 100644 (file)
@@ -174,8 +174,11 @@ static struct of_device_id __initdata apc_match[] = {
 MODULE_DEVICE_TABLE(of, apc_match);
 
 static struct of_platform_driver apc_driver = {
-       .name           = "apc",
-       .match_table    = apc_match,
+       .driver = {
+               .name = "apc",
+               .owner = THIS_MODULE,
+               .of_match_table = apc_match,
+       },
        .probe          = apc_probe,
 };
 
index 9f52db2d441cb035a5e497fe5e2d94c916f9dc0e..ddc84128b3c2e4c9be06129f1aecc04f196a3dab 100644 (file)
@@ -104,7 +104,7 @@ MODULE_DEVICE_TABLE(of, auxio_match);
 
 static int __devinit auxio_probe(struct of_device *dev, const struct of_device_id *match)
 {
-       struct device_node *dp = dev->node;
+       struct device_node *dp = dev->dev.of_node;
        unsigned long size;
 
        if (!strcmp(dp->parent->name, "ebus")) {
@@ -132,10 +132,11 @@ static int __devinit auxio_probe(struct of_device *dev, const struct of_device_i
 }
 
 static struct of_platform_driver auxio_driver = {
-       .match_table    = auxio_match,
        .probe          = auxio_probe,
-       .driver         = {
-               .name   = "auxio",
+       .driver = {
+               .name = "auxio",
+               .owner = THIS_MODULE,
+               .of_match_table = auxio_match,
        },
 };
 
index 415c86d5a8dac990c011309bde3d89afe9a307c7..434335f65823ec944626a9cbe0b9bbccb28bfd86 100644 (file)
@@ -149,10 +149,11 @@ static struct of_device_id __initdata clock_board_match[] = {
 };
 
 static struct of_platform_driver clock_board_driver = {
-       .match_table    = clock_board_match,
        .probe          = clock_board_probe,
-       .driver         = {
-               .name   = "clock_board",
+       .driver = {
+               .name = "clock_board",
+               .owner = THIS_MODULE,
+               .of_match_table = clock_board_match,
        },
 };
 
@@ -168,7 +169,7 @@ static int __devinit fhc_probe(struct of_device *op,
                goto out;
        }
 
-       if (!strcmp(op->node->parent->name, "central"))
+       if (!strcmp(op->dev.of_node->parent->name, "central"))
                p->central = true;
 
        p->pregs = of_ioremap(&op->resource[0], 0,
@@ -183,7 +184,7 @@ static int __devinit fhc_probe(struct of_device *op,
                reg = upa_readl(p->pregs + FHC_PREGS_BSR);
                p->board_num = ((reg >> 16) & 1) | ((reg >> 12) & 0x0e);
        } else {
-               p->board_num = of_getintprop_default(op->node, "board#", -1);
+               p->board_num = of_getintprop_default(op->dev.of_node, "board#", -1);
                if (p->board_num == -1) {
                        printk(KERN_ERR "fhc: No board# property\n");
                        goto out_unmap_pregs;
@@ -254,10 +255,11 @@ static struct of_device_id __initdata fhc_match[] = {
 };
 
 static struct of_platform_driver fhc_driver = {
-       .match_table    = fhc_match,
        .probe          = fhc_probe,
-       .driver         = {
-               .name   = "fhc",
+       .driver = {
+               .name = "fhc",
+               .owner = THIS_MODULE,
+               .of_match_table = fhc_match,
        },
 };
 
index e1a9598e2a4db8b0c0cc36aca1c7ac5addb1dbc5..870cb65b3f216e38b81fc6932afe145067f6aec9 100644 (file)
@@ -425,7 +425,7 @@ static int __devinit jbusmc_probe(struct of_device *op,
        INIT_LIST_HEAD(&p->list);
 
        err = -ENODEV;
-       prop = of_get_property(op->node, "portid", &len);
+       prop = of_get_property(op->dev.of_node, "portid", &len);
        if (!prop || len != 4) {
                printk(KERN_ERR PFX "Cannot find portid.\n");
                goto out_free;
@@ -433,7 +433,7 @@ static int __devinit jbusmc_probe(struct of_device *op,
 
        p->portid = *prop;
 
-       prop = of_get_property(op->node, "memory-control-register-1", &len);
+       prop = of_get_property(op->dev.of_node, "memory-control-register-1", &len);
        if (!prop || len != 8) {
                printk(KERN_ERR PFX "Cannot get memory control register 1.\n");
                goto out_free;
@@ -449,7 +449,7 @@ static int __devinit jbusmc_probe(struct of_device *op,
        }
 
        err = -ENODEV;
-       ml = of_get_property(op->node, "memory-layout", &p->layout_len);
+       ml = of_get_property(op->dev.of_node, "memory-layout", &p->layout_len);
        if (!ml) {
                printk(KERN_ERR PFX "Cannot get memory layout property.\n");
                goto out_iounmap;
@@ -466,7 +466,7 @@ static int __devinit jbusmc_probe(struct of_device *op,
        mc_list_add(&p->list);
 
        printk(KERN_INFO PFX "UltraSPARC-IIIi memory controller at %s\n",
-              op->node->full_name);
+              op->dev.of_node->full_name);
 
        dev_set_drvdata(&op->dev, p);
 
@@ -693,7 +693,7 @@ static void chmc_fetch_decode_regs(struct chmc *p)
 static int __devinit chmc_probe(struct of_device *op,
                                const struct of_device_id *match)
 {
-       struct device_node *dp = op->node;
+       struct device_node *dp = op->dev.of_node;
        unsigned long ver;
        const void *pval;
        int len, portid;
@@ -811,8 +811,11 @@ static const struct of_device_id us3mc_match[] = {
 MODULE_DEVICE_TABLE(of, us3mc_match);
 
 static struct of_platform_driver us3mc_driver = {
-       .name           = "us3mc",
-       .match_table    = us3mc_match,
+       .driver = {
+               .name = "us3mc",
+               .owner = THIS_MODULE,
+               .of_match_table = us3mc_match,
+       },
        .probe          = us3mc_probe,
        .remove         = __devexit_p(us3mc_remove),
 };
index 84e5386714cdbe0f3397d6d6eddc52f8c841ddcc..703e4aa9bc38420fde79f7a7fdbc6b9bb60045b6 100644 (file)
@@ -290,7 +290,7 @@ static void *sbus_alloc_coherent(struct device *dev, size_t len,
        if (mmu_map_dma_area(dev, dma_addrp, va, res->start, len_total) != 0)
                goto err_noiommu;
 
-       res->name = op->node->name;
+       res->name = op->dev.of_node->name;
 
        return (void *)(unsigned long)res->start;
 
index da527b33ebc708ad2693d9932bbae97f671e2d88..47e63f1e719c7a2d9e4d4e757b1bf0a07e16d308 100644 (file)
@@ -254,10 +254,10 @@ static void __init build_device_resources(struct of_device *op,
                return;
 
        p_op = to_of_device(parent);
-       bus = of_match_bus(p_op->node);
-       bus->count_cells(op->node, &na, &ns);
+       bus = of_match_bus(p_op->dev.of_node);
+       bus->count_cells(op->dev.of_node, &na, &ns);
 
-       preg = of_get_property(op->node, bus->addr_prop_name, &num_reg);
+       preg = of_get_property(op->dev.of_node, bus->addr_prop_name, &num_reg);
        if (!preg || num_reg == 0)
                return;
 
@@ -271,8 +271,8 @@ static void __init build_device_resources(struct of_device *op,
                struct resource *r = &op->resource[index];
                u32 addr[OF_MAX_ADDR_CELLS];
                const u32 *reg = (preg + (index * ((na + ns) * 4)));
-               struct device_node *dp = op->node;
-               struct device_node *pp = p_op->node;
+               struct device_node *dp = op->dev.of_node;
+               struct device_node *pp = p_op->dev.of_node;
                struct of_bus *pbus, *dbus;
                u64 size, result = OF_BAD_ADDR;
                unsigned long flags;
@@ -321,7 +321,7 @@ static void __init build_device_resources(struct of_device *op,
 
                if (of_resource_verbose)
                        printk("%s reg[%d] -> %llx\n",
-                              op->node->full_name, index,
+                              op->dev.of_node->full_name, index,
                               result);
 
                if (result != OF_BAD_ADDR) {
@@ -329,7 +329,7 @@ static void __init build_device_resources(struct of_device *op,
                        r->end = result + size - 1;
                        r->flags = flags | ((result >> 32ULL) & 0xffUL);
                }
-               r->name = op->node->name;
+               r->name = op->dev.of_node->name;
        }
 }
 
@@ -345,10 +345,9 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
                return NULL;
 
        sd = &op->dev.archdata;
-       sd->prom_node = dp;
        sd->op = op;
 
-       op->node = dp;
+       op->dev.of_node = dp;
 
        op->clock_freq = of_getintprop_default(dp, "clock-frequency",
                                               (25*1000*1000));
index b3d4cb5d21b333c54fee00998491644397eb92d1..1dae8079f7287a7d52631bb589899c93f3c146d0 100644 (file)
@@ -323,10 +323,10 @@ static void __init build_device_resources(struct of_device *op,
                return;
 
        p_op = to_of_device(parent);
-       bus = of_match_bus(p_op->node);
-       bus->count_cells(op->node, &na, &ns);
+       bus = of_match_bus(p_op->dev.of_node);
+       bus->count_cells(op->dev.of_node, &na, &ns);
 
-       preg = of_get_property(op->node, bus->addr_prop_name, &num_reg);
+       preg = of_get_property(op->dev.of_node, bus->addr_prop_name, &num_reg);
        if (!preg || num_reg == 0)
                return;
 
@@ -340,7 +340,7 @@ static void __init build_device_resources(struct of_device *op,
        if (num_reg > PROMREG_MAX) {
                printk(KERN_WARNING "%s: Too many regs (%d), "
                       "limiting to %d.\n",
-                      op->node->full_name, num_reg, PROMREG_MAX);
+                      op->dev.of_node->full_name, num_reg, PROMREG_MAX);
                num_reg = PROMREG_MAX;
        }
 
@@ -348,8 +348,8 @@ static void __init build_device_resources(struct of_device *op,
                struct resource *r = &op->resource[index];
                u32 addr[OF_MAX_ADDR_CELLS];
                const u32 *reg = (preg + (index * ((na + ns) * 4)));
-               struct device_node *dp = op->node;
-               struct device_node *pp = p_op->node;
+               struct device_node *dp = op->dev.of_node;
+               struct device_node *pp = p_op->dev.of_node;
                struct of_bus *pbus, *dbus;
                u64 size, result = OF_BAD_ADDR;
                unsigned long flags;
@@ -397,7 +397,7 @@ static void __init build_device_resources(struct of_device *op,
 
                if (of_resource_verbose)
                        printk("%s reg[%d] -> %llx\n",
-                              op->node->full_name, index,
+                              op->dev.of_node->full_name, index,
                               result);
 
                if (result != OF_BAD_ADDR) {
@@ -408,7 +408,7 @@ static void __init build_device_resources(struct of_device *op,
                        r->end = result + size - 1;
                        r->flags = flags;
                }
-               r->name = op->node->name;
+               r->name = op->dev.of_node->name;
        }
 }
 
@@ -530,7 +530,7 @@ static unsigned int __init build_one_device_irq(struct of_device *op,
                                                struct device *parent,
                                                unsigned int irq)
 {
-       struct device_node *dp = op->node;
+       struct device_node *dp = op->dev.of_node;
        struct device_node *pp, *ip;
        unsigned int orig_irq = irq;
        int nid;
@@ -575,7 +575,7 @@ static unsigned int __init build_one_device_irq(struct of_device *op,
 
                        if (of_irq_verbose)
                                printk("%s: Apply [%s:%x] imap --> [%s:%x]\n",
-                                      op->node->full_name,
+                                      op->dev.of_node->full_name,
                                       pp->full_name, this_orig_irq,
                                       (iret ? iret->full_name : "NULL"), irq);
 
@@ -594,7 +594,7 @@ static unsigned int __init build_one_device_irq(struct of_device *op,
                                if (of_irq_verbose)
                                        printk("%s: PCI swizzle [%s] "
                                               "%x --> %x\n",
-                                              op->node->full_name,
+                                              op->dev.of_node->full_name,
                                               pp->full_name, this_orig_irq,
                                               irq);
 
@@ -611,11 +611,11 @@ static unsigned int __init build_one_device_irq(struct of_device *op,
        if (!ip)
                return orig_irq;
 
-       irq = ip->irq_trans->irq_build(op->node, irq,
+       irq = ip->irq_trans->irq_build(op->dev.of_node, irq,
                                       ip->irq_trans->data);
        if (of_irq_verbose)
                printk("%s: Apply IRQ trans [%s] %x --> %x\n",
-                      op->node->full_name, ip->full_name, orig_irq, irq);
+                     op->dev.of_node->full_name, ip->full_name, orig_irq, irq);
 
 out:
        nid = of_node_to_nid(dp);
@@ -640,10 +640,9 @@ static struct of_device * __init scan_one_device(struct device_node *dp,
                return NULL;
 
        sd = &op->dev.archdata;
-       sd->prom_node = dp;
        sd->op = op;
 
-       op->node = dp;
+       op->dev.of_node = dp;
 
        op->clock_freq = of_getintprop_default(dp, "clock-frequency",
                                               (25*1000*1000));
index 0247e68210b3417eba430ae12ef98facbf0ab76d..10c6c36a6e7565a7716cb98c7107f089e232f3fa 100644 (file)
@@ -16,7 +16,7 @@ static int node_match(struct device *dev, void *data)
        struct of_device *op = to_of_device(dev);
        struct device_node *dp = data;
 
-       return (op->node == dp);
+       return (op->dev.of_node == dp);
 }
 
 struct of_device *of_find_device_by_node(struct device_node *dp)
@@ -48,7 +48,7 @@ EXPORT_SYMBOL(irq_of_parse_and_map);
 void of_propagate_archdata(struct of_device *bus)
 {
        struct dev_archdata *bus_sd = &bus->dev.archdata;
-       struct device_node *bus_dp = bus->node;
+       struct device_node *bus_dp = bus->dev.of_node;
        struct device_node *dp;
 
        for (dp = bus_dp->child; dp; dp = dp->sibling) {
index 5ac539a5930f5401239d81f2e1bfff217472a60e..8a8363adb8bd1ac68c1ad49e6afba66dc7b43ae5 100644 (file)
@@ -261,7 +261,6 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
        sd->iommu = pbm->iommu;
        sd->stc = &pbm->stc;
        sd->host_controller = pbm;
-       sd->prom_node = node;
        sd->op = op = of_find_device_by_node(node);
        sd->numa_node = pbm->numa_node;
 
@@ -285,6 +284,7 @@ static struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm,
        dev->sysdata = node;
        dev->dev.parent = bus->bridge;
        dev->dev.bus = &pci_bus_type;
+       dev->dev.of_node = node;
        dev->devfn = devfn;
        dev->multifunction = 0;         /* maybe a lie? */
        set_pcie_port_type(dev);
@@ -653,7 +653,7 @@ show_pciobppath_attr(struct device * dev, struct device_attribute * attr, char *
        struct device_node *dp;
 
        pdev = to_pci_dev(dev);
-       dp = pdev->dev.archdata.prom_node;
+       dp = pdev->dev.of_node;
 
        return snprintf (buf, PAGE_SIZE, "%s\n", dp->full_name);
 }
@@ -683,7 +683,7 @@ static void __devinit pci_bus_register_of_sysfs(struct pci_bus *bus)
 struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm,
                                            struct device *parent)
 {
-       struct device_node *node = pbm->op->node;
+       struct device_node *node = pbm->op->dev.of_node;
        struct pci_bus *bus;
 
        printk("PCI: Scanning PBM %s\n", node->full_name);
@@ -1022,7 +1022,7 @@ void arch_teardown_msi_irq(unsigned int virt_irq)
 
 struct device_node *pci_device_to_OF_node(struct pci_dev *pdev)
 {
-       return pdev->dev.archdata.prom_node;
+       return pdev->dev.of_node;
 }
 EXPORT_SYMBOL(pci_device_to_OF_node);
 
@@ -1151,15 +1151,13 @@ static int __init of_pci_slot_init(void)
                struct device_node *node;
 
                if (pbus->self) {
-                       struct dev_archdata *sd = pbus->self->sysdata;
-
                        /* PCI->PCI bridge */
-                       node = sd->prom_node;
+                       node = pbus->self->dev.of_node;
                } else {
                        struct pci_pbm_info *pbm = pbus->sysdata;
 
                        /* Host PCI controller */
-                       node = pbm->op->node;
+                       node = pbm->op->dev.of_node;
                }
 
                pci_bus_slot_names(node, pbus);
index 8a000583b5cf62ef887d419f54528a8080350e6b..6c7a33af3ba625f83c589d025b2aed149f0d5d16 100644 (file)
@@ -314,12 +314,12 @@ struct pci_ops sun4v_pci_ops = {
 
 void pci_get_pbm_props(struct pci_pbm_info *pbm)
 {
-       const u32 *val = of_get_property(pbm->op->node, "bus-range", NULL);
+       const u32 *val = of_get_property(pbm->op->dev.of_node, "bus-range", NULL);
 
        pbm->pci_first_busno = val[0];
        pbm->pci_last_busno = val[1];
 
-       val = of_get_property(pbm->op->node, "ino-bitmap", NULL);
+       val = of_get_property(pbm->op->dev.of_node, "ino-bitmap", NULL);
        if (val) {
                pbm->ino_bitmap = (((u64)val[1] << 32UL) |
                                   ((u64)val[0] <<  0UL));
@@ -365,7 +365,8 @@ static void pci_register_legacy_regions(struct resource *io_res,
 
 static void pci_register_iommu_region(struct pci_pbm_info *pbm)
 {
-       const u32 *vdma = of_get_property(pbm->op->node, "virtual-dma", NULL);
+       const u32 *vdma = of_get_property(pbm->op->dev.of_node, "virtual-dma",
+                                         NULL);
 
        if (vdma) {
                struct resource *rp = kzalloc(sizeof(*rp), GFP_KERNEL);
@@ -394,7 +395,7 @@ void pci_determine_mem_io_space(struct pci_pbm_info *pbm)
        int num_pbm_ranges;
 
        saw_mem = saw_io = 0;
-       pbm_ranges = of_get_property(pbm->op->node, "ranges", &i);
+       pbm_ranges = of_get_property(pbm->op->dev.of_node, "ranges", &i);
        if (!pbm_ranges) {
                prom_printf("PCI: Fatal error, missing PBM ranges property "
                            " for %s\n",
index d53f45bc7dda269b3b488c7117da530c8b1c701f..51cfa09e392ab13f67862c11460e856235b6b9dc 100644 (file)
@@ -413,7 +413,7 @@ static int __devinit pci_fire_pbm_init(struct pci_pbm_info *pbm,
                                       struct of_device *op, u32 portid)
 {
        const struct linux_prom64_registers *regs;
-       struct device_node *dp = op->node;
+       struct device_node *dp = op->dev.of_node;
        int err;
 
        pbm->numa_node = -1;
@@ -458,7 +458,7 @@ static int __devinit pci_fire_pbm_init(struct pci_pbm_info *pbm,
 static int __devinit fire_probe(struct of_device *op,
                                const struct of_device_id *match)
 {
-       struct device_node *dp = op->node;
+       struct device_node *dp = op->dev.of_node;
        struct pci_pbm_info *pbm;
        struct iommu *iommu;
        u32 portid;
@@ -508,8 +508,11 @@ static struct of_device_id __initdata fire_match[] = {
 };
 
 static struct of_platform_driver fire_driver = {
-       .name           = DRIVER_NAME,
-       .match_table    = fire_match,
+       .driver = {
+               .name = DRIVER_NAME,
+               .owner = THIS_MODULE,
+               .of_match_table = fire_match,
+       },
        .probe          = fire_probe,
 };
 
index e0ef847219c3b0f11b3330d15b57a4858549567d..548b8ca9c2106d7b7fa88d602db86a125a2a283e 100644 (file)
@@ -324,7 +324,7 @@ void sparc64_pbm_msi_init(struct pci_pbm_info *pbm,
        const u32 *val;
        int len;
 
-       val = of_get_property(pbm->op->node, "#msi-eqs", &len);
+       val = of_get_property(pbm->op->dev.of_node, "#msi-eqs", &len);
        if (!val || len != 4)
                goto no_msi;
        pbm->msiq_num = *val;
@@ -347,16 +347,16 @@ void sparc64_pbm_msi_init(struct pci_pbm_info *pbm,
                        u32 msi64_len;
                } *arng;
 
-               val = of_get_property(pbm->op->node, "msi-eq-size", &len);
+               val = of_get_property(pbm->op->dev.of_node, "msi-eq-size", &len);
                if (!val || len != 4)
                        goto no_msi;
 
                pbm->msiq_ent_count = *val;
 
-               mqp = of_get_property(pbm->op->node,
+               mqp = of_get_property(pbm->op->dev.of_node,
                                      "msi-eq-to-devino", &len);
                if (!mqp)
-                       mqp = of_get_property(pbm->op->node,
+                       mqp = of_get_property(pbm->op->dev.of_node,
                                              "msi-eq-devino", &len);
                if (!mqp || len != sizeof(struct msiq_prop))
                        goto no_msi;
@@ -364,27 +364,27 @@ void sparc64_pbm_msi_init(struct pci_pbm_info *pbm,
                pbm->msiq_first = mqp->first_msiq;
                pbm->msiq_first_devino = mqp->first_devino;
 
-               val = of_get_property(pbm->op->node, "#msi", &len);
+               val = of_get_property(pbm->op->dev.of_node, "#msi", &len);
                if (!val || len != 4)
                        goto no_msi;
                pbm->msi_num = *val;
 
-               mrng = of_get_property(pbm->op->node, "msi-ranges", &len);
+               mrng = of_get_property(pbm->op->dev.of_node, "msi-ranges", &len);
                if (!mrng || len != sizeof(struct msi_range_prop))
                        goto no_msi;
                pbm->msi_first = mrng->first_msi;
 
-               val = of_get_property(pbm->op->node, "msi-data-mask", &len);
+               val = of_get_property(pbm->op->dev.of_node, "msi-data-mask", &len);
                if (!val || len != 4)
                        goto no_msi;
                pbm->msi_data_mask = *val;
 
-               val = of_get_property(pbm->op->node, "msix-data-width", &len);
+               val = of_get_property(pbm->op->dev.of_node, "msix-data-width", &len);
                if (!val || len != 4)
                        goto no_msi;
                pbm->msix_data_width = *val;
 
-               arng = of_get_property(pbm->op->node, "msi-address-ranges",
+               arng = of_get_property(pbm->op->dev.of_node, "msi-address-ranges",
                                       &len);
                if (!arng || len != sizeof(struct addr_range_prop))
                        goto no_msi;
index 142b9d6984a8d9886b7c25433e75de59205689f0..558a70512824252d00e7e8c61396bc10b266c7a2 100644 (file)
@@ -285,7 +285,7 @@ static irqreturn_t psycho_ce_intr(int irq, void *dev_id)
 #define  PSYCHO_ECCCTRL_CE      0x2000000000000000UL /* Enable CE INterrupts */
 static void psycho_register_error_handlers(struct pci_pbm_info *pbm)
 {
-       struct of_device *op = of_find_device_by_node(pbm->op->node);
+       struct of_device *op = of_find_device_by_node(pbm->op->dev.of_node);
        unsigned long base = pbm->controller_regs;
        u64 tmp;
        int err;
@@ -507,7 +507,7 @@ static int __devinit psycho_probe(struct of_device *op,
                                  const struct of_device_id *match)
 {
        const struct linux_prom64_registers *pr_regs;
-       struct device_node *dp = op->node;
+       struct device_node *dp = op->dev.of_node;
        struct pci_pbm_info *pbm;
        struct iommu *iommu;
        int is_pbm_a, err;
@@ -602,8 +602,11 @@ static struct of_device_id __initdata psycho_match[] = {
 };
 
 static struct of_platform_driver psycho_driver = {
-       .name           = DRIVER_NAME,
-       .match_table    = psycho_match,
+       .driver = {
+               .name = DRIVER_NAME,
+               .owner = THIS_MODULE,
+               .of_match_table = psycho_match,
+       },
        .probe          = psycho_probe,
 };
 
index ba6fbeba3e2cf7e2e5c5f34afdcbabd6d1c60a36..6dad8e3b750666c433926d9a9d6963a42cc99de5 100644 (file)
@@ -310,7 +310,7 @@ static irqreturn_t sabre_ce_intr(int irq, void *dev_id)
 
 static void sabre_register_error_handlers(struct pci_pbm_info *pbm)
 {
-       struct device_node *dp = pbm->op->node;
+       struct device_node *dp = pbm->op->dev.of_node;
        struct of_device *op;
        unsigned long base = pbm->controller_regs;
        u64 tmp;
@@ -456,7 +456,7 @@ static int __devinit sabre_probe(struct of_device *op,
                                 const struct of_device_id *match)
 {
        const struct linux_prom64_registers *pr_regs;
-       struct device_node *dp = op->node;
+       struct device_node *dp = op->dev.of_node;
        struct pci_pbm_info *pbm;
        u32 upa_portid, dma_mask;
        struct iommu *iommu;
@@ -596,8 +596,11 @@ static struct of_device_id __initdata sabre_match[] = {
 };
 
 static struct of_platform_driver sabre_driver = {
-       .name           = DRIVER_NAME,
-       .match_table    = sabre_match,
+       .driver = {
+               .name = DRIVER_NAME,
+               .owner = THIS_MODULE,
+               .of_match_table = sabre_match,
+       },
        .probe          = sabre_probe,
 };
 
index 2b5cdde77af774942113f53f4eb66dec00659ee2..97a1ae2e1c02ebee8bbcdd221254f80bb46b15b4 100644 (file)
@@ -844,7 +844,7 @@ static int pbm_routes_this_ino(struct pci_pbm_info *pbm, u32 ino)
  */
 static void tomatillo_register_error_handlers(struct pci_pbm_info *pbm)
 {
-       struct of_device *op = of_find_device_by_node(pbm->op->node);
+       struct of_device *op = of_find_device_by_node(pbm->op->dev.of_node);
        u64 tmp, err_mask, err_no_mask;
        int err;
 
@@ -939,7 +939,7 @@ static void tomatillo_register_error_handlers(struct pci_pbm_info *pbm)
 
 static void schizo_register_error_handlers(struct pci_pbm_info *pbm)
 {
-       struct of_device *op = of_find_device_by_node(pbm->op->node);
+       struct of_device *op = of_find_device_by_node(pbm->op->dev.of_node);
        u64 tmp, err_mask, err_no_mask;
        int err;
 
@@ -1068,7 +1068,7 @@ static void __devinit schizo_scan_bus(struct pci_pbm_info *pbm,
 {
        pbm_config_busmastering(pbm);
        pbm->is_66mhz_capable =
-               (of_find_property(pbm->op->node, "66mhz-capable", NULL)
+               (of_find_property(pbm->op->dev.of_node, "66mhz-capable", NULL)
                 != NULL);
 
        pbm->pci_bus = pci_scan_one_pbm(pbm, parent);
@@ -1138,7 +1138,7 @@ static int schizo_pbm_iommu_init(struct pci_pbm_info *pbm)
        u32 dma_mask;
        u64 control;
 
-       vdma = of_get_property(pbm->op->node, "virtual-dma", NULL);
+       vdma = of_get_property(pbm->op->dev.of_node, "virtual-dma", NULL);
        if (!vdma)
                vdma = vdma_default;
 
@@ -1268,7 +1268,7 @@ static void schizo_pbm_hw_init(struct pci_pbm_info *pbm)
            pbm->chip_version >= 0x2)
                tmp |= 0x3UL << SCHIZO_PCICTRL_PTO_SHIFT;
 
-       if (!of_find_property(pbm->op->node, "no-bus-parking", NULL))
+       if (!of_find_property(pbm->op->dev.of_node, "no-bus-parking", NULL))
                tmp |= SCHIZO_PCICTRL_PARK;
        else
                tmp &= ~SCHIZO_PCICTRL_PARK;
@@ -1311,7 +1311,7 @@ static int __devinit schizo_pbm_init(struct pci_pbm_info *pbm,
                                     int chip_type)
 {
        const struct linux_prom64_registers *regs;
-       struct device_node *dp = op->node;
+       struct device_node *dp = op->dev.of_node;
        const char *chipset_name;
        int is_pbm_a, err;
 
@@ -1415,7 +1415,7 @@ static struct pci_pbm_info * __devinit schizo_find_sibling(u32 portid,
 
 static int __devinit __schizo_init(struct of_device *op, unsigned long chip_type)
 {
-       struct device_node *dp = op->node;
+       struct device_node *dp = op->dev.of_node;
        struct pci_pbm_info *pbm;
        struct iommu *iommu;
        u32 portid;
@@ -1491,8 +1491,11 @@ static struct of_device_id __initdata schizo_match[] = {
 };
 
 static struct of_platform_driver schizo_driver = {
-       .name           = DRIVER_NAME,
-       .match_table    = schizo_match,
+       .driver = {
+               .name = DRIVER_NAME,
+               .owner = THIS_MODULE,
+               .of_match_table = schizo_match,
+       },
        .probe          = schizo_probe,
 };
 
index 23c33ff9c31e3414f68a6316706443efb19f80c3..a24af6f7e17f12b125f16d716690e02b663b5f88 100644 (file)
@@ -540,7 +540,7 @@ static void __devinit pci_sun4v_scan_bus(struct pci_pbm_info *pbm,
        struct property *prop;
        struct device_node *dp;
 
-       dp = pbm->op->node;
+       dp = pbm->op->dev.of_node;
        prop = of_find_property(dp, "66mhz-capable", NULL);
        pbm->is_66mhz_capable = (prop != NULL);
        pbm->pci_bus = pci_scan_one_pbm(pbm, parent);
@@ -584,7 +584,7 @@ static int __devinit pci_sun4v_iommu_init(struct pci_pbm_info *pbm)
        u32 dma_mask, dma_offset;
        const u32 *vdma;
 
-       vdma = of_get_property(pbm->op->node, "virtual-dma", NULL);
+       vdma = of_get_property(pbm->op->dev.of_node, "virtual-dma", NULL);
        if (!vdma)
                vdma = vdma_default;
 
@@ -881,7 +881,7 @@ static void pci_sun4v_msi_init(struct pci_pbm_info *pbm)
 static int __devinit pci_sun4v_pbm_init(struct pci_pbm_info *pbm,
                                        struct of_device *op, u32 devhandle)
 {
-       struct device_node *dp = op->node;
+       struct device_node *dp = op->dev.of_node;
        int err;
 
        pbm->numa_node = of_node_to_nid(dp);
@@ -929,7 +929,7 @@ static int __devinit pci_sun4v_probe(struct of_device *op,
        u32 devhandle;
        int i, err;
 
-       dp = op->node;
+       dp = op->dev.of_node;
 
        if (!hvapi_negotiated++) {
                err = sun4v_hvapi_register(HV_GRP_PCI,
@@ -1009,8 +1009,11 @@ static struct of_device_id __initdata pci_sun4v_match[] = {
 };
 
 static struct of_platform_driver pci_sun4v_driver = {
-       .name           = DRIVER_NAME,
-       .match_table    = pci_sun4v_match,
+       .driver = {
+               .name = DRIVER_NAME,
+               .owner = THIS_MODULE,
+               .of_match_table = pci_sun4v_match,
+       },
        .probe          = pci_sun4v_probe,
 };
 
index 5e4563d86f191d39c2cf6ab386f233a13a877585..9589d8b9b0c17eb59f5d0d2d1b66a94ac3fd655e 100644 (file)
@@ -79,8 +79,11 @@ static struct of_device_id __initdata pmc_match[] = {
 MODULE_DEVICE_TABLE(of, pmc_match);
 
 static struct of_platform_driver pmc_driver = {
-       .name           = "pmc",
-       .match_table    = pmc_match,
+       .driver = {
+               .name = "pmc",
+               .owner = THIS_MODULE,
+               .of_match_table = pmc_match,
+       },
        .probe          = pmc_probe,
 };
 
index e2a045c235a10b9d3861e48b7af2e2acab7b50e1..168d4cb63f5b34e110f021769adb1f199bee9a1e 100644 (file)
@@ -41,9 +41,9 @@ static int __devinit power_probe(struct of_device *op, const struct of_device_id
        power_reg = of_ioremap(res, 0, 0x4, "power");
 
        printk(KERN_INFO "%s: Control reg at %llx\n",
-              op->node->name, res->start);
+              op->dev.of_node->name, res->start);
 
-       if (has_button_interrupt(irq, op->node)) {
+       if (has_button_interrupt(irq, op->dev.of_node)) {
                if (request_irq(irq,
                                power_handler, 0, "power", NULL) < 0)
                        printk(KERN_ERR "power: Cannot setup IRQ handler.\n");
@@ -60,10 +60,11 @@ static struct of_device_id __initdata power_match[] = {
 };
 
 static struct of_platform_driver power_driver = {
-       .match_table    = power_match,
        .probe          = power_probe,
-       .driver         = {
-               .name   = "power",
+       .driver = {
+               .name = "power",
+               .owner = THIS_MODULE,
+               .of_match_table = power_match,
        },
 };
 
index 8f1478475421586adedf59895adfdbd8a2ae04b1..3f34ac853931c816d7e004d57d44d7663f859524 100644 (file)
@@ -450,7 +450,7 @@ int psycho_iommu_init(struct pci_pbm_info *pbm, int tsbsize,
 void psycho_pbm_init_common(struct pci_pbm_info *pbm, struct of_device *op,
                            const char *chip_name, int chip_type)
 {
-       struct device_node *dp = op->node;
+       struct device_node *dp = op->dev.of_node;
 
        pbm->name = dp->full_name;
        pbm->numa_node = -1;
index 406e0872504e814ae8b4086c58a371f2b45f10d5..cfeaf04b9cdf4204cfc5d21f1d8d84bfddb0367d 100644 (file)
@@ -63,10 +63,10 @@ void sbus_set_sbus64(struct device *dev, int bursts)
        int slot;
        u64 val;
 
-       regs = of_get_property(op->node, "reg", NULL);
+       regs = of_get_property(op->dev.of_node, "reg", NULL);
        if (!regs) {
                printk(KERN_ERR "sbus_set_sbus64: Cannot find regs for %s\n",
-                      op->node->full_name);
+                      op->dev.of_node->full_name);
                return;
        }
        slot = regs->which_io;
@@ -287,7 +287,7 @@ static irqreturn_t sysio_ue_handler(int irq, void *dev_id)
                 SYSIO_UEAFSR_SPIO | SYSIO_UEAFSR_SDRD | SYSIO_UEAFSR_SDWR);
        upa_writeq(error_bits, afsr_reg);
 
-       portid = of_getintprop_default(op->node, "portid", -1);
+       portid = of_getintprop_default(op->dev.of_node, "portid", -1);
 
        /* Log the error. */
        printk("SYSIO[%x]: Uncorrectable ECC Error, primary error type[%s]\n",
@@ -361,7 +361,7 @@ static irqreturn_t sysio_ce_handler(int irq, void *dev_id)
                 SYSIO_CEAFSR_SPIO | SYSIO_CEAFSR_SDRD | SYSIO_CEAFSR_SDWR);
        upa_writeq(error_bits, afsr_reg);
 
-       portid = of_getintprop_default(op->node, "portid", -1);
+       portid = of_getintprop_default(op->dev.of_node, "portid", -1);
 
        printk("SYSIO[%x]: Correctable ECC Error, primary error type[%s]\n",
               portid,
@@ -439,7 +439,7 @@ static irqreturn_t sysio_sbus_error_handler(int irq, void *dev_id)
                 SYSIO_SBAFSR_SLE | SYSIO_SBAFSR_STO | SYSIO_SBAFSR_SBERR);
        upa_writeq(error_bits, afsr_reg);
 
-       portid = of_getintprop_default(op->node, "portid", -1);
+       portid = of_getintprop_default(op->dev.of_node, "portid", -1);
 
        /* Log the error. */
        printk("SYSIO[%x]: SBUS Error, primary error type[%s] read(%d)\n",
@@ -496,7 +496,7 @@ static void __init sysio_register_error_handlers(struct of_device *op)
        u64 control;
        int portid;
 
-       portid = of_getintprop_default(op->node, "portid", -1);
+       portid = of_getintprop_default(op->dev.of_node, "portid", -1);
 
        irq = sbus_build_irq(op, SYSIO_UE_INO);
        if (request_irq(irq, sysio_ue_handler, 0,
@@ -537,7 +537,7 @@ static void __init sysio_register_error_handlers(struct of_device *op)
 static void __init sbus_iommu_init(struct of_device *op)
 {
        const struct linux_prom64_registers *pr;
-       struct device_node *dp = op->node;
+       struct device_node *dp = op->dev.of_node;
        struct iommu *iommu;
        struct strbuf *strbuf;
        unsigned long regs, reg_base;
@@ -589,7 +589,7 @@ static void __init sbus_iommu_init(struct of_device *op)
         */
        iommu->write_complete_reg = regs + 0x2000UL;
 
-       portid = of_getintprop_default(op->node, "portid", -1);
+       portid = of_getintprop_default(op->dev.of_node, "portid", -1);
        printk(KERN_INFO "SYSIO: UPA portID %x, at %016lx\n",
               portid, regs);
 
index 4453003032b57a8a6cab91f87eb03eabd8c26e67..e404b063be2cbc1d141c899c2e91f1ad79463989 100644 (file)
@@ -144,7 +144,7 @@ static struct platform_device m48t59_rtc = {
 
 static int __devinit clock_probe(struct of_device *op, const struct of_device_id *match)
 {
-       struct device_node *dp = op->node;
+       struct device_node *dp = op->dev.of_node;
        const char *model = of_get_property(dp, "model", NULL);
 
        if (!model)
@@ -177,10 +177,11 @@ static struct of_device_id __initdata clock_match[] = {
 };
 
 static struct of_platform_driver clock_driver = {
-       .match_table    = clock_match,
        .probe          = clock_probe,
-       .driver         = {
-               .name   = "rtc",
+       .driver = {
+               .name = "rtc",
+               .owner = THIS_MODULE,
+               .of_match_table = clock_match,
        },
 };
 
index c7bbe6cf7b85a3d76c86bbe06ddbccef4e573ad5..21e9fcae0668cdb7994ca856b428fa4a7a74b6e1 100644 (file)
@@ -424,7 +424,7 @@ static int __devinit rtc_probe(struct of_device *op, const struct of_device_id *
        struct resource *r;
 
        printk(KERN_INFO "%s: RTC regs at 0x%llx\n",
-              op->node->full_name, op->resource[0].start);
+              op->dev.of_node->full_name, op->resource[0].start);
 
        /* The CMOS RTC driver only accepts IORESOURCE_IO, so cons
         * up a fake resource so that the probe works for all cases.
@@ -463,10 +463,11 @@ static struct of_device_id __initdata rtc_match[] = {
 };
 
 static struct of_platform_driver rtc_driver = {
-       .match_table    = rtc_match,
        .probe          = rtc_probe,
-       .driver         = {
-               .name   = "rtc",
+       .driver = {
+               .name = "rtc",
+               .owner = THIS_MODULE,
+               .of_match_table = rtc_match,
        },
 };
 
@@ -480,7 +481,7 @@ static int __devinit bq4802_probe(struct of_device *op, const struct of_device_i
 {
 
        printk(KERN_INFO "%s: BQ4802 regs at 0x%llx\n",
-              op->node->full_name, op->resource[0].start);
+              op->dev.of_node->full_name, op->resource[0].start);
 
        rtc_bq4802_device.resource = &op->resource[0];
        return platform_device_register(&rtc_bq4802_device);
@@ -495,10 +496,11 @@ static struct of_device_id __initdata bq4802_match[] = {
 };
 
 static struct of_platform_driver bq4802_driver = {
-       .match_table    = bq4802_match,
        .probe          = bq4802_probe,
-       .driver         = {
-               .name   = "bq4802",
+       .driver = {
+               .name = "bq4802",
+               .owner = THIS_MODULE,
+               .of_match_table = bq4802_match,
        },
 };
 
@@ -534,7 +536,7 @@ static struct platform_device m48t59_rtc = {
 
 static int __devinit mostek_probe(struct of_device *op, const struct of_device_id *match)
 {
-       struct device_node *dp = op->node;
+       struct device_node *dp = op->dev.of_node;
 
        /* On an Enterprise system there can be multiple mostek clocks.
         * We should only match the one that is on the central FHC bus.
@@ -558,10 +560,11 @@ static struct of_device_id __initdata mostek_match[] = {
 };
 
 static struct of_platform_driver mostek_driver = {
-       .match_table    = mostek_match,
        .probe          = mostek_probe,
-       .driver         = {
-               .name   = "mostek",
+       .driver = {
+               .name = "mostek",
+               .owner = THIS_MODULE,
+               .of_match_table = mostek_match,
        },
 };
 
index 25df50f51c046d44c9a3f0579eb247b0029228d1..b5b48e703cb7ade708c26cdb759337a44bb68a29 100644 (file)
@@ -1140,7 +1140,7 @@ static int __devinit pata_macio_attach(struct macio_dev *mdev,
                        "Failed to allocate private memory\n");
                return -ENOMEM;
        }
-       priv->node = of_node_get(mdev->ofdev.node);
+       priv->node = of_node_get(mdev->ofdev.dev.of_node);
        priv->mdev = mdev;
        priv->dev = &mdev->ofdev.dev;
 
index 96b11b604ae018331f21425495ec84227ff82619..36afe2c1c74730e0d194b54d09f9b9eb0223dd3f 100644 (file)
@@ -694,7 +694,7 @@ mpc52xx_ata_probe(struct of_device *op, const struct of_device_id *match)
        struct bcom_task *dmatsk = NULL;
 
        /* Get ipb frequency */
-       ipb_freq = mpc5xxx_get_bus_frequency(op->node);
+       ipb_freq = mpc5xxx_get_bus_frequency(op->dev.of_node);
        if (!ipb_freq) {
                dev_err(&op->dev, "could not determine IPB bus frequency\n");
                return -ENODEV;
@@ -702,7 +702,7 @@ mpc52xx_ata_probe(struct of_device *op, const struct of_device_id *match)
 
        /* Get device base address from device tree, request the region
         * and ioremap it. */
-       rv = of_address_to_resource(op->node, 0, &res_mem);
+       rv = of_address_to_resource(op->dev.of_node, 0, &res_mem);
        if (rv) {
                dev_err(&op->dev, "could not determine device base address\n");
                return rv;
@@ -735,14 +735,14 @@ mpc52xx_ata_probe(struct of_device *op, const struct of_device_id *match)
         * The MPC5200 ATA controller supports MWDMA modes 0, 1 and 2 and
         * UDMA modes 0, 1 and 2.
         */
-       prop = of_get_property(op->node, "mwdma-mode", &proplen);
+       prop = of_get_property(op->dev.of_node, "mwdma-mode", &proplen);
        if ((prop) && (proplen >= 4))
                mwdma_mask = ATA_MWDMA2 & ((1 << (*prop + 1)) - 1);
-       prop = of_get_property(op->node, "udma-mode", &proplen);
+       prop = of_get_property(op->dev.of_node, "udma-mode", &proplen);
        if ((prop) && (proplen >= 4))
                udma_mask = ATA_UDMA2 & ((1 << (*prop + 1)) - 1);
 
-       ata_irq = irq_of_parse_and_map(op->node, 0);
+       ata_irq = irq_of_parse_and_map(op->dev.of_node, 0);
        if (ata_irq == NO_IRQ) {
                dev_err(&op->dev, "error mapping irq\n");
                return -EINVAL;
@@ -884,9 +884,6 @@ static struct of_device_id mpc52xx_ata_of_match[] = {
 
 
 static struct of_platform_driver mpc52xx_ata_of_platform_driver = {
-       .owner          = THIS_MODULE,
-       .name           = DRV_NAME,
-       .match_table    = mpc52xx_ata_of_match,
        .probe          = mpc52xx_ata_probe,
        .remove         = mpc52xx_ata_remove,
 #ifdef CONFIG_PM
@@ -896,6 +893,7 @@ static struct of_platform_driver mpc52xx_ata_of_platform_driver = {
        .driver         = {
                .name   = DRV_NAME,
                .owner  = THIS_MODULE,
+               .of_match_table = mpc52xx_ata_of_match,
        },
 };
 
index 1f18ad9e4fe161a6bfa33b84fff06c5c72626228..5a1b82c08be950b3b359c203c6654f342dde57c2 100644 (file)
@@ -18,7 +18,7 @@ static int __devinit pata_of_platform_probe(struct of_device *ofdev,
                                            const struct of_device_id *match)
 {
        int ret;
-       struct device_node *dn = ofdev->node;
+       struct device_node *dn = ofdev->dev.of_node;
        struct resource io_res;
        struct resource ctl_res;
        struct resource irq_res;
@@ -91,8 +91,11 @@ static struct of_device_id pata_of_platform_match[] = {
 MODULE_DEVICE_TABLE(of, pata_of_platform_match);
 
 static struct of_platform_driver pata_of_platform_driver = {
-       .name           = "pata_of_platform",
-       .match_table    = pata_of_platform_match,
+       .driver = {
+               .name = "pata_of_platform",
+               .owner = THIS_MODULE,
+               .of_match_table = pata_of_platform_match,
+       },
        .probe          = pata_of_platform_probe,
        .remove         = __devexit_p(pata_of_platform_remove),
 };
index a69192b38b438411cf4b8e839cbe32dfcd357f6c..61c89b54ea23941fd937a25ec4228eca56648e10 100644 (file)
@@ -1313,7 +1313,7 @@ static int sata_fsl_probe(struct of_device *ofdev,
        dev_printk(KERN_INFO, &ofdev->dev,
                   "Sata FSL Platform/CSB Driver init\n");
 
-       hcr_base = of_iomap(ofdev->node, 0);
+       hcr_base = of_iomap(ofdev->dev.of_node, 0);
        if (!hcr_base)
                goto error_exit_with_cleanup;
 
@@ -1332,7 +1332,7 @@ static int sata_fsl_probe(struct of_device *ofdev,
        host_priv->ssr_base = ssr_base;
        host_priv->csr_base = csr_base;
 
-       irq = irq_of_parse_and_map(ofdev->node, 0);
+       irq = irq_of_parse_and_map(ofdev->dev.of_node, 0);
        if (irq < 0) {
                dev_printk(KERN_ERR, &ofdev->dev, "invalid irq from platform\n");
                goto error_exit_with_cleanup;
@@ -1427,8 +1427,11 @@ static struct of_device_id fsl_sata_match[] = {
 MODULE_DEVICE_TABLE(of, fsl_sata_match);
 
 static struct of_platform_driver fsl_sata_driver = {
-       .name           = "fsl-sata",
-       .match_table    = fsl_sata_match,
+       .driver = {
+               .name = "fsl-sata",
+               .owner = THIS_MODULE,
+               .of_match_table = fsl_sata_match,
+       },
        .probe          = sata_fsl_probe,
        .remove         = sata_fsl_remove,
 #ifdef CONFIG_PM
index f7d6ebaa0418fd2d877bda38d66d2d0a27188f83..da8f176c051e19e164b0fdc362b3ba77d3e89738 100644 (file)
@@ -789,7 +789,7 @@ static int __init fore200e_sba_map(struct fore200e *fore200e)
        fore200e->bus->write(0x02, fore200e->regs.sba.isr); /* XXX hardwired interrupt level */
 
        /* get the supported DVMA burst sizes */
-       bursts = of_getintprop_default(op->node->parent, "burst-sizes", 0x00);
+       bursts = of_getintprop_default(op->dev.of_node->parent, "burst-sizes", 0x00);
 
        if (sbus_can_dma_64bit())
                sbus_set_sbus64(&op->dev, bursts);
@@ -820,18 +820,20 @@ static int __init fore200e_sba_prom_read(struct fore200e *fore200e, struct prom_
        const u8 *prop;
        int len;
 
-       prop = of_get_property(op->node, "madaddrlo2", &len);
+       prop = of_get_property(op->dev.of_node, "madaddrlo2", &len);
        if (!prop)
                return -ENODEV;
        memcpy(&prom->mac_addr[4], prop, 4);
 
-       prop = of_get_property(op->node, "madaddrhi4", &len);
+       prop = of_get_property(op->dev.of_node, "madaddrhi4", &len);
        if (!prop)
                return -ENODEV;
        memcpy(&prom->mac_addr[2], prop, 4);
 
-       prom->serial_number = of_getintprop_default(op->node, "serialnumber", 0);
-       prom->hw_revision = of_getintprop_default(op->node, "promversion", 0);
+       prom->serial_number = of_getintprop_default(op->dev.of_node,
+                                                   "serialnumber", 0);
+       prom->hw_revision = of_getintprop_default(op->dev.of_node,
+                                                 "promversion", 0);
     
        return 0;
 }
@@ -841,10 +843,10 @@ static int fore200e_sba_proc_read(struct fore200e *fore200e, char *page)
        struct of_device *op = fore200e->bus_dev;
        const struct linux_prom_registers *regs;
 
-       regs = of_get_property(op->node, "reg", NULL);
+       regs = of_get_property(op->dev.of_node, "reg", NULL);
 
        return sprintf(page, "   SBUS slot/device:\t\t%d/'%s'\n",
-                      (regs ? regs->which_io : 0), op->node->name);
+                      (regs ? regs->which_io : 0), op->dev.of_node->name);
 }
 #endif /* CONFIG_SBUS */
 
@@ -2693,8 +2695,11 @@ static const struct of_device_id fore200e_sba_match[] = {
 MODULE_DEVICE_TABLE(of, fore200e_sba_match);
 
 static struct of_platform_driver fore200e_sba_driver = {
-       .name           = "fore_200e",
-       .match_table    = fore200e_sba_match,
+       .driver = {
+               .name = "fore_200e",
+               .owner = THIS_MODULE,
+               .of_match_table = fore200e_sba_match,
+       },
        .probe          = fore200e_sba_probe,
        .remove         = __devexit_p(fore200e_sba_remove),
 };
index 59ca2b77b574dd70956e6d818a63831c12fb6636..52f2d11bc7b975e55c49881f42e49f5552fc4371 100644 (file)
@@ -1004,7 +1004,7 @@ static const struct block_device_operations floppy_fops = {
 
 static int swim3_add_device(struct macio_dev *mdev, int index)
 {
-       struct device_node *swim = mdev->ofdev.node;
+       struct device_node *swim = mdev->ofdev.dev.of_node;
        struct floppy_state *fs = &floppy_states[index];
        int rc = -EBUSY;
 
index e1c95e208a6656c50a8e44b04bab25fc4a65d7cf..a7b83c0a7eb5575ded978fd7a2e89025d829057d 100644 (file)
@@ -1198,10 +1198,10 @@ ace_of_probe(struct of_device *op, const struct of_device_id *match)
        dev_dbg(&op->dev, "ace_of_probe(%p, %p)\n", op, match);
 
        /* device id */
-       id = of_get_property(op->node, "port-number", NULL);
+       id = of_get_property(op->dev.of_node, "port-number", NULL);
 
        /* physaddr */
-       rc = of_address_to_resource(op->node, 0, &res);
+       rc = of_address_to_resource(op->dev.of_node, 0, &res);
        if (rc) {
                dev_err(&op->dev, "invalid address\n");
                return rc;
@@ -1209,11 +1209,11 @@ ace_of_probe(struct of_device *op, const struct of_device_id *match)
        physaddr = res.start;
 
        /* irq */
-       irq = irq_of_parse_and_map(op->node, 0);
+       irq = irq_of_parse_and_map(op->dev.of_node, 0);
 
        /* bus width */
        bus_width = ACE_BUS_WIDTH_16;
-       if (of_find_property(op->node, "8-bit", NULL))
+       if (of_find_property(op->dev.of_node, "8-bit", NULL))
                bus_width = ACE_BUS_WIDTH_8;
 
        /* Call the bus-independant setup code */
@@ -1237,13 +1237,12 @@ static const struct of_device_id ace_of_match[] __devinitconst = {
 MODULE_DEVICE_TABLE(of, ace_of_match);
 
 static struct of_platform_driver ace_of_driver = {
-       .owner = THIS_MODULE,
-       .name = "xsysace",
-       .match_table = ace_of_match,
        .probe = ace_of_probe,
        .remove = __devexit_p(ace_of_remove),
        .driver = {
                .name = "xsysace",
+               .owner = THIS_MODULE,
+               .of_match_table = ace_of_match,
        },
 };
 
index cc435be0bc136840153e91bbb0ef4cbae0bf54d9..451cd7071b1df4443aa22f4b09db39591c0cb314 100644 (file)
@@ -567,7 +567,7 @@ static int viocd_probe(struct vio_dev *vdev, const struct vio_device_id *id)
        struct disk_info *d;
        struct cdrom_device_info *c;
        struct request_queue *q;
-       struct device_node *node = vdev->dev.archdata.of_node;
+       struct device_node *node = vdev->dev.of_node;
 
        deviceno = vdev->unit_address;
        if (deviceno >= VIOCD_MAX_CD)
index 10f868eefaa6f7c026bf0e06a6eb3c5b4e95aa63..0f9cbf1aaf15963bf1acda06f52de1d33836b990 100644 (file)
@@ -660,7 +660,7 @@ static int __devinit n2rng_probe(struct of_device *op,
                                np->hvapi_major);
                        goto out_hvapi_unregister;
                }
-               np->num_units = of_getintprop_default(op->node,
+               np->num_units = of_getintprop_default(op->dev.of_node,
                                                      "rng-#units", 0);
                if (!np->num_units) {
                        dev_err(&op->dev, "VF RNG lacks rng-#units property\n");
@@ -751,8 +751,11 @@ static const struct of_device_id n2rng_match[] = {
 MODULE_DEVICE_TABLE(of, n2rng_match);
 
 static struct of_platform_driver n2rng_driver = {
-       .name           = "n2rng",
-       .match_table    = n2rng_match,
+       .driver = {
+               .name = "n2rng",
+               .owner = THIS_MODULE,
+               .of_match_table = n2rng_match,
+       },
        .probe          = n2rng_probe,
        .remove         = __devexit_p(n2rng_remove),
 };
index 7fa61dd1d9d9a986fb74dd8b384893adc2ec767a..261ba8f22b8ba57872d4b15f1f71b5da05b009bd 100644 (file)
@@ -98,7 +98,7 @@ static int __devinit rng_probe(struct of_device *ofdev,
                               const struct of_device_id *match)
 {
        void __iomem *rng_regs;
-       struct device_node *rng_np = ofdev->node;
+       struct device_node *rng_np = ofdev->dev.of_node;
        struct resource res;
        int err = 0;
 
@@ -140,8 +140,11 @@ static struct of_device_id rng_match[] = {
 };
 
 static struct of_platform_driver rng_driver = {
-       .name           = "pasemi-rng",
-       .match_table    = rng_match,
+       .driver = {
+               .name = "pasemi-rng",
+               .owner = THIS_MODULE,
+               .of_match_table = rng_match,
+       },
        .probe          = rng_probe,
        .remove         = rng_remove,
 };
index 4462b113ba3f1e134a1eb77b650af5e2732eb9af..47ffe4a90a95d0372cb178c893ed3e92128d135b 100644 (file)
@@ -2469,7 +2469,7 @@ static int __devinit ipmi_of_probe(struct of_device *dev,
        struct smi_info *info;
        struct resource resource;
        const int *regsize, *regspacing, *regshift;
-       struct device_node *np = dev->node;
+       struct device_node *np = dev->dev.of_node;
        int ret;
        int proplen;
 
@@ -2525,7 +2525,7 @@ static int __devinit ipmi_of_probe(struct of_device *dev,
        info->io.regspacing     = regspacing ? *regspacing : DEFAULT_REGSPACING;
        info->io.regshift       = regshift ? *regshift : 0;
 
-       info->irq               = irq_of_parse_and_map(dev->node, 0);
+       info->irq               = irq_of_parse_and_map(dev->dev.of_node, 0);
        info->dev               = &dev->dev;
 
        dev_dbg(&dev->dev, "addr 0x%lx regsize %d spacing %d irq %x\n",
@@ -2555,8 +2555,11 @@ static struct of_device_id ipmi_match[] =
 };
 
 static struct of_platform_driver ipmi_of_platform_driver = {
-       .name           = "ipmi",
-       .match_table    = ipmi_match,
+       .driver = {
+               .name = "ipmi",
+               .owner = THIS_MODULE,
+               .of_match_table = ipmi_match,
+       },
        .probe          = ipmi_of_probe,
        .remove         = __devexit_p(ipmi_of_remove),
 };
index 1144a04cda6e99e91f18b057be2f92f2630edda0..42f7fa442ff80653c3cbabf9c80bd1b2e05de28d 100644 (file)
@@ -866,7 +866,7 @@ static int viotape_probe(struct vio_dev *vdev, const struct vio_device_id *id)
 {
        int i = vdev->unit_address;
        int j;
-       struct device_node *node = vdev->dev.archdata.of_node;
+       struct device_node *node = vdev->dev.of_node;
 
        if (i >= VIOTAPE_MAX_TAPE)
                return -ENODEV;
index 7261b8d9087c01bfea7c8eea55d6f4c61b198b5b..ed8a9cec2a05ebefc7b171828bd08b2b6a677e1c 100644 (file)
@@ -772,18 +772,18 @@ hwicap_of_probe(struct of_device *op, const struct of_device_id *match)
 
        dev_dbg(&op->dev, "hwicap_of_probe(%p, %p)\n", op, match);
 
-       rc = of_address_to_resource(op->node, 0, &res);
+       rc = of_address_to_resource(op->dev.of_node, 0, &res);
        if (rc) {
                dev_err(&op->dev, "invalid address\n");
                return rc;
        }
 
-       id = of_get_property(op->node, "port-number", NULL);
+       id = of_get_property(op->dev.of_node, "port-number", NULL);
 
        /* It's most likely that we're using V4, if the family is not
           specified */
        regs = &v4_config_registers;
-       family = of_get_property(op->node, "xlnx,family", NULL);
+       family = of_get_property(op->dev.of_node, "xlnx,family", NULL);
 
        if (family) {
                if (!strcmp(family, "virtex2p")) {
@@ -812,13 +812,12 @@ static const struct of_device_id __devinitconst hwicap_of_match[] = {
 MODULE_DEVICE_TABLE(of, hwicap_of_match);
 
 static struct of_platform_driver hwicap_of_driver = {
-       .owner = THIS_MODULE,
-       .name = DRIVER_NAME,
-       .match_table = hwicap_of_match,
        .probe = hwicap_of_probe,
        .remove = __devexit_p(hwicap_of_remove),
        .driver = {
                .name = DRIVER_NAME,
+               .owner = THIS_MODULE,
+               .of_match_table = hwicap_of_match,
        },
 };
 
index 6c4c8b7ce3aa195e5dac4e05f7db38c6051a783b..9d65b371de64cced72bcb0f1e483913962277552 100644 (file)
@@ -1281,8 +1281,11 @@ static const struct of_device_id crypto4xx_match[] = {
 };
 
 static struct of_platform_driver crypto4xx_driver = {
-       .name           = "crypto4xx",
-       .match_table    = crypto4xx_match,
+       .driver = {
+               .name = "crypto4xx",
+               .owner = THIS_MODULE,
+               .of_match_table = crypto4xx_match,
+       },
        .probe          = crypto4xx_probe,
        .remove         = crypto4xx_remove,
 };
index 6a0f59d1fc5c4e834aaf90006ca30c7e35f8cdd9..637c105f53d262f904230c77b5bc5a5a5234fda7 100644 (file)
@@ -2398,7 +2398,7 @@ static int talitos_probe(struct of_device *ofdev,
                         const struct of_device_id *match)
 {
        struct device *dev = &ofdev->dev;
-       struct device_node *np = ofdev->node;
+       struct device_node *np = ofdev->dev.of_node;
        struct talitos_private *priv;
        const unsigned int *prop;
        int i, err;
@@ -2573,8 +2573,11 @@ static const struct of_device_id talitos_match[] = {
 MODULE_DEVICE_TABLE(of, talitos_match);
 
 static struct of_platform_driver talitos_driver = {
-       .name = "talitos",
-       .match_table = talitos_match,
+       .driver = {
+               .name = "talitos",
+               .owner = THIS_MODULE,
+               .of_match_table = talitos_match,
+       },
        .probe = talitos_probe,
        .remove = talitos_remove,
 };
index 1fdf180cbd67d55d1b4264eb3df8fb5cae12f940..8088b14ba5f7fd8077e5b9794754d2a9afa41477 100644 (file)
@@ -1315,7 +1315,7 @@ static int __devinit fsldma_of_probe(struct of_device *op,
        INIT_LIST_HEAD(&fdev->common.channels);
 
        /* ioremap the registers for use */
-       fdev->regs = of_iomap(op->node, 0);
+       fdev->regs = of_iomap(op->dev.of_node, 0);
        if (!fdev->regs) {
                dev_err(&op->dev, "unable to ioremap registers\n");
                err = -ENOMEM;
@@ -1323,7 +1323,7 @@ static int __devinit fsldma_of_probe(struct of_device *op,
        }
 
        /* map the channel IRQ if it exists, but don't hookup the handler yet */
-       fdev->irq = irq_of_parse_and_map(op->node, 0);
+       fdev->irq = irq_of_parse_and_map(op->dev.of_node, 0);
 
        dma_cap_set(DMA_MEMCPY, fdev->common.cap_mask);
        dma_cap_set(DMA_INTERRUPT, fdev->common.cap_mask);
@@ -1345,7 +1345,7 @@ static int __devinit fsldma_of_probe(struct of_device *op,
         * of_platform_bus_remove(). Instead, we manually instantiate every DMA
         * channel object.
         */
-       for_each_child_of_node(op->node, child) {
+       for_each_child_of_node(op->dev.of_node, child) {
                if (of_device_is_compatible(child, "fsl,eloplus-dma-channel")) {
                        fsl_dma_chan_probe(fdev, child,
                                FSL_DMA_IP_85XX | FSL_DMA_BIG_ENDIAN,
@@ -1411,10 +1411,13 @@ static const struct of_device_id fsldma_of_ids[] = {
 };
 
 static struct of_platform_driver fsldma_of_driver = {
-       .name           = "fsl-elo-dma",
-       .match_table    = fsldma_of_ids,
-       .probe          = fsldma_of_probe,
-       .remove         = fsldma_of_remove,
+       .driver = {
+               .name = "fsl-elo-dma",
+               .owner = THIS_MODULE,
+               .of_match_table = fsldma_of_ids,
+       },
+       .probe = fsldma_of_probe,
+       .remove = fsldma_of_remove,
 };
 
 /*----------------------------------------------------------------------------*/
index c6079fcca13fe58667ff794d63a93f71a5f14666..fa98abe4686fb06598c6f8b318e4866dff1f41be 100644 (file)
@@ -4944,12 +4944,12 @@ static const struct of_device_id ppc440spe_adma_of_match[] __devinitconst = {
 MODULE_DEVICE_TABLE(of, ppc440spe_adma_of_match);
 
 static struct of_platform_driver ppc440spe_adma_driver = {
-       .match_table = ppc440spe_adma_of_match,
        .probe = ppc440spe_adma_probe,
        .remove = __devexit_p(ppc440spe_adma_remove),
        .driver = {
                .name = "PPC440SP(E)-ADMA",
                .owner = THIS_MODULE,
+               .of_match_table = ppc440spe_adma_of_match,
        },
 };
 
index 4471647b4807eadb31b6e4e278a5298bcfed97e8..6c1886b497ff673add09b99809f065c9a294090b 100644 (file)
@@ -338,15 +338,13 @@ static struct of_device_id mpc85xx_pci_err_of_match[] = {
 };
 
 static struct of_platform_driver mpc85xx_pci_err_driver = {
-       .owner = THIS_MODULE,
-       .name = "mpc85xx_pci_err",
-       .match_table = mpc85xx_pci_err_of_match,
        .probe = mpc85xx_pci_err_probe,
        .remove = __devexit_p(mpc85xx_pci_err_remove),
        .driver = {
-                  .name = "mpc85xx_pci_err",
-                  .owner = THIS_MODULE,
-                  },
+               .name = "mpc85xx_pci_err",
+               .owner = THIS_MODULE,
+               .of_match_table = mpc85xx_pci_err_of_match,
+       },
 };
 
 #endif                         /* CONFIG_PCI */
@@ -654,15 +652,13 @@ static struct of_device_id mpc85xx_l2_err_of_match[] = {
 };
 
 static struct of_platform_driver mpc85xx_l2_err_driver = {
-       .owner = THIS_MODULE,
-       .name = "mpc85xx_l2_err",
-       .match_table = mpc85xx_l2_err_of_match,
        .probe = mpc85xx_l2_err_probe,
        .remove = mpc85xx_l2_err_remove,
        .driver = {
-                  .name = "mpc85xx_l2_err",
-                  .owner = THIS_MODULE,
-                  },
+               .name = "mpc85xx_l2_err",
+               .owner = THIS_MODULE,
+               .of_match_table = mpc85xx_l2_err_of_match,
+       },
 };
 
 /**************************** MC Err device ***************************/
@@ -1131,15 +1127,13 @@ static struct of_device_id mpc85xx_mc_err_of_match[] = {
 };
 
 static struct of_platform_driver mpc85xx_mc_err_driver = {
-       .owner = THIS_MODULE,
-       .name = "mpc85xx_mc_err",
-       .match_table = mpc85xx_mc_err_of_match,
        .probe = mpc85xx_mc_err_probe,
        .remove = mpc85xx_mc_err_remove,
        .driver = {
-                  .name = "mpc85xx_mc_err",
-                  .owner = THIS_MODULE,
-                  },
+               .name = "mpc85xx_mc_err",
+               .owner = THIS_MODULE,
+               .of_match_table = mpc85xx_mc_err_of_match,
+       },
 };
 
 #ifdef CONFIG_MPC85xx
index 11f2172aa1e6f5fb37dbe4752ec2654dc7c5d5df..9d6f6783328c80357cb794614ff79dca1e0b84d0 100644 (file)
@@ -202,13 +202,13 @@ static struct of_device_id ppc4xx_edac_match[] = {
 };
 
 static struct of_platform_driver ppc4xx_edac_driver = {
-       .match_table            = ppc4xx_edac_match,
        .probe                  = ppc4xx_edac_probe,
        .remove                 = ppc4xx_edac_remove,
-       .driver                 = {
-               .owner  = THIS_MODULE,
-               .name   = PPC4XX_EDAC_MODULE_NAME
-       }
+       .driver = {
+               .owner = THIS_MODULE,
+               .name = PPC4XX_EDAC_MODULE_NAME
+               .of_match_table = ppc4xx_edac_match,
+       },
 };
 
 /*
index b827c976dc6214cec1d04256182c05861b345294..f156ab3bb6ed24921d6d202e7020fe985f64d43d 100644 (file)
@@ -449,7 +449,7 @@ pca953x_get_alt_pdata(struct i2c_client *client)
        struct device_node *node;
        const uint16_t *val;
 
-       node = dev_archdata_get_node(&client->dev.archdata);
+       node = client->dev.of_node;
        if (node == NULL)
                return NULL;
 
index 68e90abeba966e93a55d8b216fce1d73e2d27db7..5da5942cf970763be13b716c5bd2a3c10d1af3ab 100644 (file)
@@ -300,8 +300,11 @@ static const struct of_device_id env_match[] = {
 MODULE_DEVICE_TABLE(of, env_match);
 
 static struct of_platform_driver env_driver = {
-       .name           = "ultra45_env",
-       .match_table    = env_match,
+       .driver = {
+               .name = "ultra45_env",
+               .owner = THIS_MODULE,
+               .of_match_table = env_match,
+       },
        .probe          = env_probe,
        .remove         = __devexit_p(env_remove),
 };
index 16948db38973f1866fffe4df07710627b771662c..b02b4533651d8076f522e96923b09b3f3e8b289b 100644 (file)
@@ -440,7 +440,7 @@ static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm)
 
        init_waitqueue_head(&cpm->i2c_wait);
 
-       cpm->irq = of_irq_to_resource(ofdev->node, 0, NULL);
+       cpm->irq = of_irq_to_resource(ofdev->dev.of_node, 0, NULL);
        if (!cpm->irq)
                return -EINVAL;
 
@@ -451,13 +451,13 @@ static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm)
                return ret;
 
        /* I2C parameter RAM */
-       i2c_base = of_iomap(ofdev->node, 1);
+       i2c_base = of_iomap(ofdev->dev.of_node, 1);
        if (i2c_base == NULL) {
                ret = -EINVAL;
                goto out_irq;
        }
 
-       if (of_device_is_compatible(ofdev->node, "fsl,cpm1-i2c")) {
+       if (of_device_is_compatible(ofdev->dev.of_node, "fsl,cpm1-i2c")) {
 
                /* Check for and use a microcode relocation patch. */
                cpm->i2c_ram = i2c_base;
@@ -474,7 +474,7 @@ static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm)
 
                cpm->version = 1;
 
-       } else if (of_device_is_compatible(ofdev->node, "fsl,cpm2-i2c")) {
+       } else if (of_device_is_compatible(ofdev->dev.of_node, "fsl,cpm2-i2c")) {
                cpm->i2c_addr = cpm_muram_alloc(sizeof(struct i2c_ram), 64);
                cpm->i2c_ram = cpm_muram_addr(cpm->i2c_addr);
                out_be16(i2c_base, cpm->i2c_addr);
@@ -489,24 +489,24 @@ static int __devinit cpm_i2c_setup(struct cpm_i2c *cpm)
        }
 
        /* I2C control/status registers */
-       cpm->i2c_reg = of_iomap(ofdev->node, 0);
+       cpm->i2c_reg = of_iomap(ofdev->dev.of_node, 0);
        if (cpm->i2c_reg == NULL) {
                ret = -EINVAL;
                goto out_ram;
        }
 
-       data = of_get_property(ofdev->node, "fsl,cpm-command", &len);
+       data = of_get_property(ofdev->dev.of_node, "fsl,cpm-command", &len);
        if (!data || len != 4) {
                ret = -EINVAL;
                goto out_reg;
        }
        cpm->cp_command = *data;
 
-       data = of_get_property(ofdev->node, "linux,i2c-class", &len);
+       data = of_get_property(ofdev->dev.of_node, "linux,i2c-class", &len);
        if (data && len == 4)
                cpm->adap.class = *data;
 
-       data = of_get_property(ofdev->node, "clock-frequency", &len);
+       data = of_get_property(ofdev->dev.of_node, "clock-frequency", &len);
        if (data && len == 4)
                cpm->freq = *data;
        else
@@ -661,7 +661,7 @@ static int __devinit cpm_i2c_probe(struct of_device *ofdev,
 
        /* register new adapter to i2c module... */
 
-       data = of_get_property(ofdev->node, "linux,i2c-index", &len);
+       data = of_get_property(ofdev->dev.of_node, "linux,i2c-index", &len);
        if (data && len == 4) {
                cpm->adap.nr = *data;
                result = i2c_add_numbered_adapter(&cpm->adap);
@@ -679,7 +679,7 @@ static int __devinit cpm_i2c_probe(struct of_device *ofdev,
        /*
         * register OF I2C devices
         */
-       of_register_i2c_devices(&cpm->adap, ofdev->node);
+       of_register_i2c_devices(&cpm->adap, ofdev->dev.of_node);
 
        return 0;
 out_shut:
@@ -718,13 +718,13 @@ static const struct of_device_id cpm_i2c_match[] = {
 MODULE_DEVICE_TABLE(of, cpm_i2c_match);
 
 static struct of_platform_driver cpm_i2c_driver = {
-       .match_table    = cpm_i2c_match,
        .probe          = cpm_i2c_probe,
        .remove         = __devexit_p(cpm_i2c_remove),
-       .driver         = {
-               .name   = "fsl-i2c-cpm",
-               .owner  = THIS_MODULE,
-       }
+       .driver = {
+               .name = "fsl-i2c-cpm",
+               .owner = THIS_MODULE,
+               .of_match_table = cpm_i2c_match,
+       },
 };
 
 static int __init cpm_i2c_init(void)
index f8ccc0fe95a83761f0e8c579450f0d542abde641..bf344135647a8654a47c8b343c140e68453f40d5 100644 (file)
@@ -664,7 +664,7 @@ static inline u8 iic_clckdiv(unsigned int opb)
 static int __devinit iic_request_irq(struct of_device *ofdev,
                                     struct ibm_iic_private *dev)
 {
-       struct device_node *np = ofdev->node;
+       struct device_node *np = ofdev->dev.of_node;
        int irq;
 
        if (iic_force_poll)
@@ -695,7 +695,7 @@ static int __devinit iic_request_irq(struct of_device *ofdev,
 static int __devinit iic_probe(struct of_device *ofdev,
                               const struct of_device_id *match)
 {
-       struct device_node *np = ofdev->node;
+       struct device_node *np = ofdev->dev.of_node;
        struct ibm_iic_private *dev;
        struct i2c_adapter *adap;
        const u32 *freq;
@@ -807,8 +807,11 @@ static const struct of_device_id ibm_iic_match[] = {
 };
 
 static struct of_platform_driver ibm_iic_driver = {
-       .name   = "ibm-iic",
-       .match_table = ibm_iic_match,
+       .driver = {
+               .name = "ibm-iic",
+               .owner = THIS_MODULE,
+               .of_match_table = ibm_iic_match,
+       },
        .probe  = iic_probe,
        .remove = __devexit_p(iic_remove),
 };
index e86cef300c7d694090a15df38cb627e4182d8c61..df00eb1f11f9ee44d3f2d6d8826ff2d15895bee8 100644 (file)
@@ -560,14 +560,14 @@ static int __devinit fsl_i2c_probe(struct of_device *op,
 
        init_waitqueue_head(&i2c->queue);
 
-       i2c->base = of_iomap(op->node, 0);
+       i2c->base = of_iomap(op->dev.of_node, 0);
        if (!i2c->base) {
                dev_err(i2c->dev, "failed to map controller\n");
                result = -ENOMEM;
                goto fail_map;
        }
 
-       i2c->irq = irq_of_parse_and_map(op->node, 0);
+       i2c->irq = irq_of_parse_and_map(op->dev.of_node, 0);
        if (i2c->irq) { /* no i2c->irq implies polling */
                result = request_irq(i2c->irq, mpc_i2c_isr,
                                     IRQF_SHARED, "i2c-mpc", i2c);
@@ -577,21 +577,22 @@ static int __devinit fsl_i2c_probe(struct of_device *op,
                }
        }
 
-       if (of_get_property(op->node, "fsl,preserve-clocking", NULL)) {
+       if (of_get_property(op->dev.of_node, "fsl,preserve-clocking", NULL)) {
                clock = MPC_I2C_CLOCK_PRESERVE;
        } else {
-               prop = of_get_property(op->node, "clock-frequency", &plen);
+               prop = of_get_property(op->dev.of_node, "clock-frequency",
+                                       &plen);
                if (prop && plen == sizeof(u32))
                        clock = *prop;
        }
 
        if (match->data) {
                struct mpc_i2c_data *data = match->data;
-               data->setup(op->node, i2c, clock, data->prescaler);
+               data->setup(op->dev.of_node, i2c, clock, data->prescaler);
        } else {
                /* Backwards compatibility */
-               if (of_get_property(op->node, "dfsrr", NULL))
-                       mpc_i2c_setup_8xxx(op->node, i2c, clock, 0);
+               if (of_get_property(op->dev.of_node, "dfsrr", NULL))
+                       mpc_i2c_setup_8xxx(op->dev.of_node, i2c, clock, 0);
        }
 
        dev_set_drvdata(&op->dev, i2c);
@@ -605,7 +606,7 @@ static int __devinit fsl_i2c_probe(struct of_device *op,
                dev_err(i2c->dev, "failed to add adapter\n");
                goto fail_add;
        }
-       of_register_i2c_devices(&i2c->adap, op->node);
+       of_register_i2c_devices(&i2c->adap, op->dev.of_node);
 
        return result;
 
@@ -674,12 +675,12 @@ MODULE_DEVICE_TABLE(of, mpc_i2c_of_match);
 
 /* Structure for a device driver */
 static struct of_platform_driver mpc_i2c_driver = {
-       .match_table    = mpc_i2c_of_match,
        .probe          = fsl_i2c_probe,
        .remove         = __devexit_p(fsl_i2c_remove),
-       .driver         = {
-               .owner  = THIS_MODULE,
-               .name   = DRV_NAME,
+       .driver = {
+               .owner = THIS_MODULE,
+               .name = DRV_NAME,
+               .of_match_table = mpc_i2c_of_match,
        },
 };
 
index db3c9f3a764796206dac6ea7210da5499fdd1cc3..e0f833cca3f1193c24480c4efc446a7568a9a3af 100644 (file)
@@ -418,6 +418,9 @@ i2c_new_device(struct i2c_adapter *adap, struct i2c_board_info const *info)
        client->dev.parent = &client->adapter->dev;
        client->dev.bus = &i2c_bus_type;
        client->dev.type = &i2c_client_type;
+#ifdef CONFIG_OF
+       client->dev.of_node = info->of_node;
+#endif
 
        dev_set_name(&client->dev, "%d-%04x", i2c_adapter_id(adap),
                     client->addr);
index 159955d16c475e69314c12efa4a19166cfec4eaf..183fa38760d85be4e520529c0747b6d88a614365 100644 (file)
@@ -1153,7 +1153,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match)
 
        if (macio_resource_count(mdev) == 0) {
                printk(KERN_WARNING "ide-pmac: no address for %s\n",
-                                   mdev->ofdev.node->full_name);
+                                   mdev->ofdev.dev.of_node->full_name);
                rc = -ENXIO;
                goto out_free_pmif;
        }
@@ -1161,7 +1161,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match)
        /* Request memory resource for IO ports */
        if (macio_request_resource(mdev, 0, "ide-pmac (ports)")) {
                printk(KERN_ERR "ide-pmac: can't request MMIO resource for "
-                               "%s!\n", mdev->ofdev.node->full_name);
+                               "%s!\n", mdev->ofdev.dev.of_node->full_name);
                rc = -EBUSY;
                goto out_free_pmif;
        }
@@ -1173,7 +1173,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match)
         */
        if (macio_irq_count(mdev) == 0) {
                printk(KERN_WARNING "ide-pmac: no intrs for device %s, using "
-                                   "13\n", mdev->ofdev.node->full_name);
+                                   "13\n", mdev->ofdev.dev.of_node->full_name);
                irq = irq_create_mapping(NULL, 13);
        } else
                irq = macio_irq(mdev, 0);
@@ -1182,7 +1182,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match)
        regbase = (unsigned long) base;
 
        pmif->mdev = mdev;
-       pmif->node = mdev->ofdev.node;
+       pmif->node = mdev->ofdev.dev.of_node;
        pmif->regbase = regbase;
        pmif->irq = irq;
        pmif->kauai_fcr = NULL;
@@ -1191,7 +1191,7 @@ pmac_ide_macio_attach(struct macio_dev *mdev, const struct of_device_id *match)
                if (macio_request_resource(mdev, 1, "ide-pmac (dma)"))
                        printk(KERN_WARNING "ide-pmac: can't request DMA "
                                            "resource for %s!\n",
-                                           mdev->ofdev.node->full_name);
+                                           mdev->ofdev.dev.of_node->full_name);
                else
                        pmif->dma_regs = ioremap(macio_resource_start(mdev, 1), 0x1000);
        } else
index 129a6bebd6e37bc20f6b3f36e77b0fb7653865e5..252489e883690590db3999e3b76c6336e5122893 100644 (file)
@@ -291,8 +291,9 @@ static int ehca_sense_attributes(struct ehca_shca *shca)
        };
 
        ehca_gen_dbg("Probing adapter %s...",
-                    shca->ofdev->node->full_name);
-       loc_code = of_get_property(shca->ofdev->node, "ibm,loc-code", NULL);
+                    shca->ofdev->dev.of_node->full_name);
+       loc_code = of_get_property(shca->ofdev->dev.of_node, "ibm,loc-code",
+                                  NULL);
        if (loc_code)
                ehca_gen_dbg(" ... location lode=%s", loc_code);
 
@@ -720,16 +721,16 @@ static int __devinit ehca_probe(struct of_device *dev,
        int ret, i, eq_size;
        unsigned long flags;
 
-       handle = of_get_property(dev->node, "ibm,hca-handle", NULL);
+       handle = of_get_property(dev->dev.of_node, "ibm,hca-handle", NULL);
        if (!handle) {
                ehca_gen_err("Cannot get eHCA handle for adapter: %s.",
-                            dev->node->full_name);
+                            dev->dev.of_node->full_name);
                return -ENODEV;
        }
 
        if (!(*handle)) {
                ehca_gen_err("Wrong eHCA handle for adapter: %s.",
-                            dev->node->full_name);
+                            dev->dev.of_node->full_name);
                return -ENODEV;
        }
 
@@ -936,12 +937,13 @@ static struct of_device_id ehca_device_table[] =
 MODULE_DEVICE_TABLE(of, ehca_device_table);
 
 static struct of_platform_driver ehca_driver = {
-       .name        = "ehca",
-       .match_table = ehca_device_table,
        .probe       = ehca_probe,
        .remove      = ehca_remove,
-       .driver      = {
+       .driver = {
+               .name = "ehca",
+               .owner = THIS_MODULE,
                .groups = ehca_drv_attr_groups,
+               .of_match_table = ehca_device_table,
        },
 };
 
index 0d45422f8095040f9354b3fe40d4a520218e7c88..1dacae4b43f0f32671e42934919526c5502a4dcf 100644 (file)
@@ -259,8 +259,11 @@ static const struct of_device_id bbc_beep_match[] = {
 };
 
 static struct of_platform_driver bbc_beep_driver = {
-       .name           = "bbcbeep",
-       .match_table    = bbc_beep_match,
+       .driver = {
+               .name = "bbcbeep",
+               .owner = THIS_MODULE,
+               .of_match_table = bbc_beep_match,
+       },
        .probe          = bbc_beep_probe,
        .remove         = __devexit_p(bbc_remove),
        .shutdown       = sparcspkr_shutdown,
@@ -338,8 +341,11 @@ static const struct of_device_id grover_beep_match[] = {
 };
 
 static struct of_platform_driver grover_beep_driver = {
-       .name           = "groverbeep",
-       .match_table    = grover_beep_match,
+       .driver = {
+               .name = "groverbeep",
+               .owner = THIS_MODULE,
+               .of_match_table = grover_beep_match,
+       },
        .probe          = grover_beep_probe,
        .remove         = __devexit_p(grover_remove),
        .shutdown       = sparcspkr_shutdown,
index 5071af2c06040f3032d85f4f44be9be5f0202319..04e32f2d1241eacc9cfc6716fb22441d2dbd2a3e 100644 (file)
@@ -51,7 +51,7 @@ static inline void i8042_write_command(int val)
 
 static int __devinit sparc_i8042_probe(struct of_device *op, const struct of_device_id *match)
 {
-       struct device_node *dp = op->node;
+       struct device_node *dp = op->dev.of_node;
 
        dp = dp->child;
        while (dp) {
@@ -96,8 +96,11 @@ static const struct of_device_id sparc_i8042_match[] = {
 MODULE_DEVICE_TABLE(of, sparc_i8042_match);
 
 static struct of_platform_driver sparc_i8042_driver = {
-       .name           = "i8042",
-       .match_table    = sparc_i8042_match,
+       .driver = {
+               .name = "i8042",
+               .owner = THIS_MODULE,
+               .of_match_table = sparc_i8042_match,
+       },
        .probe          = sparc_i8042_probe,
        .remove         = __devexit_p(sparc_i8042_remove),
 };
index f84f8e32e3f1789fac1655752eeb051b3139cb93..e2c028d2638fce0e49d41912f91f1a3260cb16a0 100644 (file)
@@ -244,17 +244,17 @@ static int __devinit xps2_of_probe(struct of_device *ofdev,
        int error;
 
        dev_info(dev, "Device Tree Probing \'%s\'\n",
-                       ofdev->node->name);
+                       ofdev->dev.of_node->name);
 
        /* Get iospace for the device */
-       error = of_address_to_resource(ofdev->node, 0, &r_mem);
+       error = of_address_to_resource(ofdev->dev.of_node, 0, &r_mem);
        if (error) {
                dev_err(dev, "invalid address\n");
                return error;
        }
 
        /* Get IRQ for the device */
-       if (of_irq_to_resource(ofdev->node, 0, &r_irq) == NO_IRQ) {
+       if (of_irq_to_resource(ofdev->dev.of_node, 0, &r_irq) == NO_IRQ) {
                dev_err(dev, "no IRQ found\n");
                return -ENODEV;
        }
@@ -342,7 +342,7 @@ static int __devexit xps2_of_remove(struct of_device *of_dev)
        iounmap(drvdata->base_address);
 
        /* Get iospace of the device */
-       if (of_address_to_resource(of_dev->node, 0, &r_mem))
+       if (of_address_to_resource(of_dev->dev.of_node, 0, &r_mem))
                dev_err(dev, "invalid address\n");
        else
                release_mem_region(r_mem.start, resource_size(&r_mem));
@@ -362,8 +362,11 @@ static const struct of_device_id xps2_of_match[] __devinitconst = {
 MODULE_DEVICE_TABLE(of, xps2_of_match);
 
 static struct of_platform_driver xps2_of_driver = {
-       .name           = DRIVER_NAME,
-       .match_table    = xps2_of_match,
+       .driver = {
+               .name = DRIVER_NAME,
+               .owner = THIS_MODULE,
+               .of_match_table = xps2_of_match,
+       },
        .probe          = xps2_of_probe,
        .remove         = __devexit_p(xps2_of_remove),
 };
index c6e4b772b7575206f9cb9a093b682f5060d2df82..6d94b0b9979c581e369e4b54b51fc8244113d0bf 100644 (file)
@@ -211,7 +211,7 @@ struct gpio_led_of_platform_data {
 static int __devinit of_gpio_leds_probe(struct of_device *ofdev,
                                        const struct of_device_id *match)
 {
-       struct device_node *np = ofdev->node, *child;
+       struct device_node *np = ofdev->dev.of_node, *child;
        struct gpio_led_of_platform_data *pdata;
        int count = 0, ret;
 
@@ -291,8 +291,8 @@ static struct of_platform_driver of_gpio_leds_driver = {
        .driver = {
                .name = "of_gpio_leds",
                .owner = THIS_MODULE,
+               .of_match_table = of_gpio_leds_match,
        },
-       .match_table = of_gpio_leds_match,
        .probe = of_gpio_leds_probe,
        .remove = __devexit_p(of_gpio_leds_remove),
 };
index 26a303a1d1abd4bc885de4be79d46798f98a0afc..97147804a49cefc2e6b8864da44be7de13ca0832 100644 (file)
@@ -39,14 +39,12 @@ static struct macio_chip      *macio_on_hold;
 
 static int macio_bus_match(struct device *dev, struct device_driver *drv) 
 {
-       struct macio_dev * macio_dev = to_macio_device(dev);
-       struct macio_driver * macio_drv = to_macio_driver(drv);
-       const struct of_device_id * matches = macio_drv->match_table;
+       const struct of_device_id * matches = drv->of_match_table;
 
        if (!matches) 
                return 0;
 
-       return of_match_device(matches, &macio_dev->ofdev) != NULL;
+       return of_match_device(matches, dev) != NULL;
 }
 
 struct macio_dev *macio_dev_get(struct macio_dev *dev)
@@ -84,7 +82,7 @@ static int macio_device_probe(struct device *dev)
 
        macio_dev_get(macio_dev);
 
-       match = of_match_device(drv->match_table, &macio_dev->ofdev);
+       match = of_match_device(drv->driver.of_match_table, dev);
        if (match)
                error = drv->probe(macio_dev, match);
        if (error)
@@ -248,7 +246,7 @@ static void macio_create_fixup_irq(struct macio_dev *dev, int index,
 
 static void macio_add_missing_resources(struct macio_dev *dev)
 {
-       struct device_node *np = dev->ofdev.node;
+       struct device_node *np = dev->ofdev.dev.of_node;
        unsigned int irq_base;
 
        /* Gatwick has some missing interrupts on child nodes */
@@ -289,7 +287,7 @@ static void macio_add_missing_resources(struct macio_dev *dev)
 
 static void macio_setup_interrupts(struct macio_dev *dev)
 {
-       struct device_node *np = dev->ofdev.node;
+       struct device_node *np = dev->ofdev.dev.of_node;
        unsigned int irq;
        int i = 0, j = 0;
 
@@ -317,7 +315,7 @@ static void macio_setup_interrupts(struct macio_dev *dev)
 static void macio_setup_resources(struct macio_dev *dev,
                                  struct resource *parent_res)
 {
-       struct device_node *np = dev->ofdev.node;
+       struct device_node *np = dev->ofdev.dev.of_node;
        struct resource r;
        int index;
 
@@ -373,9 +371,9 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip,
 
        dev->bus = &chip->lbus;
        dev->media_bay = in_bay;
-       dev->ofdev.node = np;
-       dev->ofdev.dma_mask = 0xffffffffUL;
-       dev->ofdev.dev.dma_mask = &dev->ofdev.dma_mask;
+       dev->ofdev.dev.of_node = np;
+       dev->ofdev.archdata.dma_mask = 0xffffffffUL;
+       dev->ofdev.dev.dma_mask = &dev->ofdev.archdata.dma_mask;
        dev->ofdev.dev.parent = parent;
        dev->ofdev.dev.bus = &macio_bus_type;
        dev->ofdev.dev.release = macio_release_dev;
@@ -494,9 +492,9 @@ static void macio_pci_add_devices(struct macio_chip *chip)
        }
 
        /* Add media bay devices if any */
+       pnode = mbdev->ofdev.dev.of_node;
        if (mbdev)
-               for (np = NULL; (np = of_get_next_child(mbdev->ofdev.node, np))
-                            != NULL;) {
+               for (np = NULL; (np = of_get_next_child(pnode, np)) != NULL;) {
                        if (macio_skip_device(np))
                                continue;
                        of_node_get(np);
@@ -506,9 +504,9 @@ static void macio_pci_add_devices(struct macio_chip *chip)
                }
 
        /* Add serial ports if any */
+       pnode = sdev->ofdev.dev.of_node;
        if (sdev) {
-               for (np = NULL; (np = of_get_next_child(sdev->ofdev.node, np))
-                            != NULL;) {
+               for (np = NULL; (np = of_get_next_child(pnode, np)) != NULL;) {
                        if (macio_skip_device(np))
                                continue;
                        of_node_get(np);
index 9e9453b584250f61b6a741861df2608e27cfb63e..6999ce59fd1091ddd8e9b46f2ced859275deab1c 100644 (file)
@@ -9,7 +9,7 @@ field##_show (struct device *dev, struct device_attribute *attr,        \
               char *buf)                                               \
 {                                                                      \
        struct macio_dev *mdev = to_macio_device (dev);                 \
-       return sprintf (buf, format_string, mdev->ofdev.node->field);   \
+       return sprintf (buf, format_string, mdev->ofdev.dev.of_node->field); \
 }
 
 static ssize_t
@@ -21,7 +21,7 @@ compatible_show (struct device *dev, struct device_attribute *attr, char *buf)
        int length = 0;
 
        of = &to_macio_device (dev)->ofdev;
-       compat = of_get_property(of->node, "compatible", &cplen);
+       compat = of_get_property(of->dev.of_node, "compatible", &cplen);
        if (!compat) {
                *buf = '\0';
                return 0;
@@ -58,7 +58,7 @@ static ssize_t devspec_show(struct device *dev,
        struct of_device *ofdev;
 
        ofdev = to_of_device(dev);
-       return sprintf(buf, "%s\n", ofdev->node->full_name);
+       return sprintf(buf, "%s\n", ofdev->dev.of_node->full_name);
 }
 
 macio_config_of_attr (name, "%s\n");
index 08002b88f342deb961d18b20994a838bbf76bac9..288acce76b74ec36d8324d2284439c9592cbd3c7 100644 (file)
@@ -564,7 +564,7 @@ static int __devinit media_bay_attach(struct macio_dev *mdev, const struct of_de
        unsigned long base;
        int i;
 
-       ofnode = mdev->ofdev.node;
+       ofnode = mdev->ofdev.dev.of_node;
 
        if (macio_resource_count(mdev) < 1)
                return -ENODEV;
index 7c54d80c4fb2309e1873cd52981fe7ff186853b5..12946c5f583f53526654b58a41138595f0f0afc9 100644 (file)
@@ -375,7 +375,7 @@ static int __devinit rackmeter_probe(struct macio_dev* mdev,
        pr_debug("rackmeter_probe()\n");
 
        /* Get i2s-a node */
-       while ((i2s = of_get_next_child(mdev->ofdev.node, i2s)) != NULL)
+       while ((i2s = of_get_next_child(mdev->ofdev.dev.of_node, i2s)) != NULL)
               if (strcmp(i2s->name, "i2s-a") == 0)
                       break;
        if (i2s == NULL) {
@@ -431,7 +431,7 @@ static int __devinit rackmeter_probe(struct macio_dev* mdev,
            of_address_to_resource(i2s, 1, &rdma)) {
                printk(KERN_ERR
                       "rackmeter: found match but lacks resources: %s",
-                      mdev->ofdev.node->full_name);
+                      mdev->ofdev.dev.of_node->full_name);
                rc = -ENXIO;
                goto bail_free;
        }
index c9da5c4c167d9ea1dbaa995ceb854acfd6001840..2506c957712e894479e48ced054b5eb4bf532873 100644 (file)
@@ -671,8 +671,11 @@ static const struct of_device_id smu_platform_match[] =
 
 static struct of_platform_driver smu_of_platform_driver =
 {
-       .name           = "smu",
-       .match_table    = smu_platform_match,
+       .driver = {
+               .name = "smu",
+               .owner = THIS_MODULE,
+               .of_match_table = smu_platform_match,
+       },
        .probe          = smu_platform_probe,
 };
 
index b18fa948f3d1be64c3f3df73cbc715596fb05de7..e60605bd0ea980a5928d0349df3fdb29eb09bb0c 100644 (file)
@@ -2215,7 +2215,7 @@ static int fcu_of_probe(struct of_device* dev, const struct of_device_id *match)
        state = state_detached;
 
        /* Lookup the fans in the device tree */
-       fcu_lookup_fans(dev->node);
+       fcu_lookup_fans(dev->dev.of_node);
 
        /* Add the driver */
        return i2c_add_driver(&therm_pm72_driver);
@@ -2238,8 +2238,11 @@ static const struct of_device_id fcu_match[] =
 
 static struct of_platform_driver fcu_of_platform_driver = 
 {
-       .name           = "temperature",
-       .match_table    = fcu_match,
+       .driver = {
+               .name = "temperature",
+               .owner = THIS_MODULE,
+               .of_match_table = fcu_match,
+       },
        .probe          = fcu_of_probe,
        .remove         = fcu_of_remove
 };
index 0839770e4ec54faa6c742c4c7f06ac81fecb7080..5c9367acf0cf2c6a3411fe691f12540caab7ffd7 100644 (file)
@@ -463,8 +463,11 @@ static const struct of_device_id therm_of_match[] = {{
 };
 
 static struct of_platform_driver therm_of_driver = {
-       .name           = "temperature",
-       .match_table    = therm_of_match,
+       .driver = {
+               .name = "temperature",
+               .owner = THIS_MODULE,
+               .of_match_table = therm_of_match,
+       },
        .probe          = therm_of_probe,
        .remove         = therm_of_remove,
 };
index bb6cc54b558ee235f17b28990f5e80da8304f2b6..1247e5de9faa84afb6f2b9be923fcd5ce5053f97 100644 (file)
@@ -64,7 +64,7 @@ static int of_mmc_spi_get_ro(struct device *dev)
 struct mmc_spi_platform_data *mmc_spi_get_pdata(struct spi_device *spi)
 {
        struct device *dev = &spi->dev;
-       struct device_node *np = dev_archdata_get_node(&dev->archdata);
+       struct device_node *np = dev->of_node;
        struct of_mmc_spi *oms;
        const u32 *voltage_ranges;
        int num_ranges;
@@ -135,7 +135,7 @@ EXPORT_SYMBOL(mmc_spi_get_pdata);
 void mmc_spi_put_pdata(struct spi_device *spi)
 {
        struct device *dev = &spi->dev;
-       struct device_node *np = dev_archdata_get_node(&dev->archdata);
+       struct device_node *np = dev->of_node;
        struct of_mmc_spi *oms = to_of_mmc_spi(dev);
        int i;
 
index 55e33135edb4dbc60b800e9207b7ae1b0e3b8139..7802a543d8fcec497e451b5072510d4c58163c53 100644 (file)
@@ -118,7 +118,7 @@ static bool __devinit sdhci_of_wp_inverted(struct device_node *np)
 static int __devinit sdhci_of_probe(struct of_device *ofdev,
                                 const struct of_device_id *match)
 {
-       struct device_node *np = ofdev->node;
+       struct device_node *np = ofdev->dev.of_node;
        struct sdhci_of_data *sdhci_of_data = match->data;
        struct sdhci_host *host;
        struct sdhci_of_host *of_host;
@@ -205,8 +205,11 @@ static const struct of_device_id sdhci_of_match[] = {
 MODULE_DEVICE_TABLE(of, sdhci_of_match);
 
 static struct of_platform_driver sdhci_of_driver = {
-       .driver.name = "sdhci-of",
-       .match_table = sdhci_of_match,
+       .driver = {
+               .name = "sdhci-of",
+               .owner = THIS_MODULE,
+               .of_match_table = sdhci_of_match,
+       },
        .probe = sdhci_of_probe,
        .remove = __devexit_p(sdhci_of_remove),
        .suspend = sdhci_of_suspend,
index 36dbcee1ac29aa8c67416b7041cb08d1550e15cf..ba124baa646d7af1fe54cf958d2e26c2af5a00d9 100644 (file)
@@ -143,7 +143,7 @@ static int of_flash_remove(struct of_device *dev)
 static struct mtd_info * __devinit obsolete_probe(struct of_device *dev,
                                                  struct map_info *map)
 {
-       struct device_node *dp = dev->node;
+       struct device_node *dp = dev->dev.of_node;
        const char *of_probe;
        struct mtd_info *mtd;
        static const char *rom_probe_types[]
@@ -221,7 +221,7 @@ static int __devinit of_flash_probe(struct of_device *dev,
 #ifdef CONFIG_MTD_PARTITIONS
        const char **part_probe_types;
 #endif
-       struct device_node *dp = dev->node;
+       struct device_node *dp = dev->dev.of_node;
        struct resource res;
        struct of_flash *info;
        const char *probe_type = match->data;
@@ -245,7 +245,7 @@ static int __devinit of_flash_probe(struct of_device *dev,
        p = of_get_property(dp, "reg", &count);
        if (count % reg_tuple_size != 0) {
                dev_err(&dev->dev, "Malformed reg property on %s\n",
-                               dev->node->full_name);
+                               dev->dev.of_node->full_name);
                err = -EINVAL;
                goto err_flash_remove;
        }
@@ -418,8 +418,11 @@ static struct of_device_id of_flash_match[] = {
 MODULE_DEVICE_TABLE(of, of_flash_match);
 
 static struct of_platform_driver of_flash_driver = {
-       .name           = "of-flash",
-       .match_table    = of_flash_match,
+       .driver = {
+               .name = "of-flash",
+               .owner = THIS_MODULE,
+               .of_match_table = of_flash_match,
+       },
        .probe          = of_flash_probe,
        .remove         = of_flash_remove,
 };
index fadc4c45b455aaabfab873d35c09a1e7c05c1960..0391c2527bd77ac075bf3a2fbc694b49cc5af939 100644 (file)
@@ -110,7 +110,7 @@ int uflash_devinit(struct of_device *op, struct device_node *dp)
 
 static int __devinit uflash_probe(struct of_device *op, const struct of_device_id *match)
 {
-       struct device_node *dp = op->node;
+       struct device_node *dp = op->dev.of_node;
 
        /* Flashprom must have the "user" property in order to
         * be used by this driver.
@@ -149,8 +149,11 @@ static const struct of_device_id uflash_match[] = {
 MODULE_DEVICE_TABLE(of, uflash_match);
 
 static struct of_platform_driver uflash_driver = {
-       .name           = DRIVER_NAME,
-       .match_table    = uflash_match,
+       .driver = {
+               .name = DRIVER_NAME,
+               .owner = THIS_MODULE,
+               .of_match_table = uflash_match,
+       },
        .probe          = uflash_probe,
        .remove         = __devexit_p(uflash_remove),
 };
index 3f38fb8e66668c37f36a86d29fb7c08766e752e6..5084cc51794421c10eb2067dc151a22511b12968 100644 (file)
@@ -1030,14 +1030,14 @@ static int __devinit fsl_elbc_ctrl_probe(struct of_device *ofdev,
        init_waitqueue_head(&ctrl->controller.wq);
        init_waitqueue_head(&ctrl->irq_wait);
 
-       ctrl->regs = of_iomap(ofdev->node, 0);
+       ctrl->regs = of_iomap(ofdev->dev.of_node, 0);
        if (!ctrl->regs) {
                dev_err(&ofdev->dev, "failed to get memory region\n");
                ret = -ENODEV;
                goto err;
        }
 
-       ctrl->irq = of_irq_to_resource(ofdev->node, 0, NULL);
+       ctrl->irq = of_irq_to_resource(ofdev->dev.of_node, 0, NULL);
        if (ctrl->irq == NO_IRQ) {
                dev_err(&ofdev->dev, "failed to get irq resource\n");
                ret = -ENODEV;
@@ -1058,7 +1058,7 @@ static int __devinit fsl_elbc_ctrl_probe(struct of_device *ofdev,
                goto err;
        }
 
-       for_each_child_of_node(ofdev->node, child)
+       for_each_child_of_node(ofdev->dev.of_node, child)
                if (of_device_is_compatible(child, "fsl,elbc-fcm-nand"))
                        fsl_elbc_chip_probe(ctrl, child);
 
@@ -1078,9 +1078,10 @@ static const struct of_device_id fsl_elbc_match[] = {
 
 static struct of_platform_driver fsl_elbc_ctrl_driver = {
        .driver = {
-               .name   = "fsl-elbc",
+               .name = "fsl-elbc",
+               .owner = THIS_MODULE,
+               .of_match_table = fsl_elbc_match,
        },
-       .match_table = fsl_elbc_match,
        .probe = fsl_elbc_ctrl_probe,
        .remove = fsl_elbc_ctrl_remove,
 };
index 2d215ccb564d7961ac7c502900a72265b777d4c8..00aea6f7d1f1bc6bbf8bfae8080bce0b01c633e7 100644 (file)
@@ -360,8 +360,11 @@ static const struct of_device_id of_fun_match[] = {
 MODULE_DEVICE_TABLE(of, of_fun_match);
 
 static struct of_platform_driver of_fun_driver = {
-       .name           = "fsl,upm-nand",
-       .match_table    = of_fun_match,
+       .driver = {
+               .name = "fsl,upm-nand",
+               .owner = THIS_MODULE,
+               .of_match_table = of_fun_match,
+       },
        .probe          = fun_probe,
        .remove         = __devexit_p(fun_remove),
 };
index b983cae8c298288a2d2942e4170114f047182559..98fd2bdf8be15df36be2dd264e56ea27282bd20b 100644 (file)
@@ -239,14 +239,14 @@ static int __devinit ndfc_probe(struct of_device *ofdev,
        dev_set_drvdata(&ofdev->dev, ndfc);
 
        /* Read the reg property to get the chip select */
-       reg = of_get_property(ofdev->node, "reg", &len);
+       reg = of_get_property(ofdev->dev.of_node, "reg", &len);
        if (reg == NULL || len != 12) {
                dev_err(&ofdev->dev, "unable read reg property (%d)\n", len);
                return -ENOENT;
        }
        ndfc->chip_select = reg[0];
 
-       ndfc->ndfcbase = of_iomap(ofdev->node, 0);
+       ndfc->ndfcbase = of_iomap(ofdev->dev.of_node, 0);
        if (!ndfc->ndfcbase) {
                dev_err(&ofdev->dev, "failed to get memory\n");
                return -EIO;
@@ -255,20 +255,20 @@ static int __devinit ndfc_probe(struct of_device *ofdev,
        ccr = NDFC_CCR_BS(ndfc->chip_select);
 
        /* It is ok if ccr does not exist - just default to 0 */
-       reg = of_get_property(ofdev->node, "ccr", NULL);
+       reg = of_get_property(ofdev->dev.of_node, "ccr", NULL);
        if (reg)
                ccr |= *reg;
 
        out_be32(ndfc->ndfcbase + NDFC_CCR, ccr);
 
        /* Set the bank settings if given */
-       reg = of_get_property(ofdev->node, "bank-settings", NULL);
+       reg = of_get_property(ofdev->dev.of_node, "bank-settings", NULL);
        if (reg) {
                int offset = NDFC_BCFG0 + (ndfc->chip_select << 2);
                out_be32(ndfc->ndfcbase + offset, *reg);
        }
 
-       err = ndfc_chip_init(ndfc, ofdev->node);
+       err = ndfc_chip_init(ndfc, ofdev->dev.of_node);
        if (err) {
                iounmap(ndfc->ndfcbase);
                return err;
@@ -294,9 +294,10 @@ MODULE_DEVICE_TABLE(of, ndfc_match);
 
 static struct of_platform_driver ndfc_driver = {
        .driver = {
-               .name   = "ndfc",
+               .name = "ndfc",
+               .owner = THIS_MODULE,
+               .of_match_table = ndfc_match,
        },
-       .match_table = ndfc_match,
        .probe = ndfc_probe,
        .remove = __devexit_p(ndfc_remove),
 };
index 090a05c12cbe0db0c67659a0abb39354aa0e11ff..f02af24d033a73341b7490acec7f2255e8ed67c9 100644 (file)
@@ -93,7 +93,7 @@ static int __devinit pasemi_nand_probe(struct of_device *ofdev,
                                      const struct of_device_id *match)
 {
        struct pci_dev *pdev;
-       struct device_node *np = ofdev->node;
+       struct device_node *np = ofdev->dev.of_node;
        struct resource res;
        struct nand_chip *chip;
        int err = 0;
@@ -221,8 +221,11 @@ MODULE_DEVICE_TABLE(of, pasemi_nand_match);
 
 static struct of_platform_driver pasemi_nand_driver =
 {
-       .name           = (char*)driver_name,
-       .match_table    = pasemi_nand_match,
+       .driver = {
+               .name = (char*)driver_name,
+               .owner = THIS_MODULE,
+               .of_match_table = pasemi_nand_match,
+       },
        .probe          = pasemi_nand_probe,
        .remove         = pasemi_nand_remove,
 };
index b37cbde6e7dbfb0981b00d6934fdd397023020d1..884852dc7eb44b29d1788fb43db7c3f6846c6936 100644 (file)
@@ -301,8 +301,11 @@ static const struct of_device_id socrates_nand_match[] =
 MODULE_DEVICE_TABLE(of, socrates_nand_match);
 
 static struct of_platform_driver socrates_nand_driver = {
-       .name           = "socrates_nand",
-       .match_table    = socrates_nand_match,
+       .driver = {
+               .name = "socrates_nand",
+               .owner = THIS_MODULE,
+               .of_match_table = socrates_nand_match,
+       },
        .probe          = socrates_nand_probe,
        .remove         = __devexit_p(socrates_nand_remove),
 };
index 225fd147774aa1f8c37ea452f46d1e558a317316..8af8442c694a69c2e4e5dea49ebcd7d13a4e92de 100644 (file)
@@ -392,15 +392,17 @@ static struct of_device_id __devinitdata mpc5xxx_can_table[] = {
 };
 
 static struct of_platform_driver mpc5xxx_can_driver = {
-       .owner = THIS_MODULE,
-       .name = "mpc5xxx_can",
+       .driver = {
+               .name = "mpc5xxx_can",
+               .owner = THIS_MODULE,
+               .of_match_table = mpc5xxx_can_table,
+       },
        .probe = mpc5xxx_can_probe,
        .remove = __devexit_p(mpc5xxx_can_remove),
 #ifdef CONFIG_PM
        .suspend = mpc5xxx_can_suspend,
        .resume = mpc5xxx_can_resume,
 #endif
-       .match_table = mpc5xxx_can_table,
 };
 
 static int __init mpc5xxx_can_init(void)
index 34e79efbd2fca7413924a8e47abde8b47baa82bb..ac1a83d7c2044fdd20c5b42063de62231b7d2725 100644 (file)
@@ -71,7 +71,7 @@ static int __devexit sja1000_ofp_remove(struct of_device *ofdev)
 {
        struct net_device *dev = dev_get_drvdata(&ofdev->dev);
        struct sja1000_priv *priv = netdev_priv(dev);
-       struct device_node *np = ofdev->node;
+       struct device_node *np = ofdev->dev.of_node;
        struct resource res;
 
        dev_set_drvdata(&ofdev->dev, NULL);
@@ -90,7 +90,7 @@ static int __devexit sja1000_ofp_remove(struct of_device *ofdev)
 static int __devinit sja1000_ofp_probe(struct of_device *ofdev,
                                       const struct of_device_id *id)
 {
-       struct device_node *np = ofdev->node;
+       struct device_node *np = ofdev->dev.of_node;
        struct net_device *dev;
        struct sja1000_priv *priv;
        struct resource res;
@@ -215,11 +215,13 @@ static struct of_device_id __devinitdata sja1000_ofp_table[] = {
 MODULE_DEVICE_TABLE(of, sja1000_ofp_table);
 
 static struct of_platform_driver sja1000_ofp_driver = {
-       .owner = THIS_MODULE,
-       .name = DRV_NAME,
+       .driver = {
+               .owner = THIS_MODULE,
+               .name = DRV_NAME,
+               .of_match_table = sja1000_ofp_table,
+       },
        .probe = sja1000_ofp_probe,
        .remove = __devexit_p(sja1000_ofp_remove),
-       .match_table = sja1000_ofp_table,
 };
 
 static int __init sja1000_ofp_init(void)
index 02698a1c80b057a4f57eba4e5e72f40c2c7da293..f547894ff48fc3a02317548dafe8ec900e5044e2 100644 (file)
@@ -122,8 +122,11 @@ static struct of_device_id ehea_device_table[] = {
 MODULE_DEVICE_TABLE(of, ehea_device_table);
 
 static struct of_platform_driver ehea_driver = {
-       .name = "ehea",
-       .match_table = ehea_device_table,
+       .driver = {
+               .name = "ehea",
+               .owner = THIS_MODULE,
+               .of_match_table = ehea_device_table,
+       },
        .probe = ehea_probe_adapter,
        .remove = ehea_remove,
 };
@@ -3050,7 +3053,7 @@ static DEVICE_ATTR(log_port_id, S_IRUSR | S_IRGRP | S_IROTH, ehea_show_port_id,
 static void __devinit logical_port_release(struct device *dev)
 {
        struct ehea_port *port = container_of(dev, struct ehea_port, ofdev.dev);
-       of_node_put(port->ofdev.node);
+       of_node_put(port->ofdev.dev.of_node);
 }
 
 static struct device *ehea_register_port(struct ehea_port *port,
@@ -3058,7 +3061,7 @@ static struct device *ehea_register_port(struct ehea_port *port,
 {
        int ret;
 
-       port->ofdev.node = of_node_get(dn);
+       port->ofdev.dev.of_node = of_node_get(dn);
        port->ofdev.dev.parent = &port->adapter->ofdev->dev;
        port->ofdev.dev.bus = &ibmebus_bus_type;
 
@@ -3225,7 +3228,7 @@ static int ehea_setup_ports(struct ehea_adapter *adapter)
        const u32 *dn_log_port_id;
        int i = 0;
 
-       lhea_dn = adapter->ofdev->node;
+       lhea_dn = adapter->ofdev->dev.of_node;
        while ((eth_dn = of_get_next_child(lhea_dn, eth_dn))) {
 
                dn_log_port_id = of_get_property(eth_dn, "ibm,hea-port-no",
@@ -3264,7 +3267,7 @@ static struct device_node *ehea_get_eth_dn(struct ehea_adapter *adapter,
        struct device_node *eth_dn = NULL;
        const u32 *dn_log_port_id;
 
-       lhea_dn = adapter->ofdev->node;
+       lhea_dn = adapter->ofdev->dev.of_node;
        while ((eth_dn = of_get_next_child(lhea_dn, eth_dn))) {
 
                dn_log_port_id = of_get_property(eth_dn, "ibm,hea-port-no",
@@ -3394,7 +3397,7 @@ static int __devinit ehea_probe_adapter(struct of_device *dev,
        const u64 *adapter_handle;
        int ret;
 
-       if (!dev || !dev->node) {
+       if (!dev || !dev->dev.of_node) {
                ehea_error("Invalid ibmebus device probed");
                return -EINVAL;
        }
@@ -3410,14 +3413,14 @@ static int __devinit ehea_probe_adapter(struct of_device *dev,
 
        adapter->ofdev = dev;
 
-       adapter_handle = of_get_property(dev->node, "ibm,hea-handle",
+       adapter_handle = of_get_property(dev->dev.of_node, "ibm,hea-handle",
                                         NULL);
        if (adapter_handle)
                adapter->handle = *adapter_handle;
 
        if (!adapter->handle) {
                dev_err(&dev->dev, "failed getting handle for adapter"
-                       " '%s'\n", dev->node->full_name);
+                       " '%s'\n", dev->dev.of_node->full_name);
                ret = -ENODEV;
                goto out_free_ad;
        }
index 221f440c10f4b59c49232283dae0fbbd48920856..25e6cc6840b1ecf1993630d2f1b5acf19a3675b6 100644 (file)
@@ -871,7 +871,7 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match)
        priv->ndev = ndev;
 
        /* Reserve FEC control zone */
-       rv = of_address_to_resource(op->node, 0, &mem);
+       rv = of_address_to_resource(op->dev.of_node, 0, &mem);
        if (rv) {
                printk(KERN_ERR DRIVER_NAME ": "
                                "Error while parsing device node resource\n" );
@@ -919,7 +919,7 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match)
 
        /* Get the IRQ we need one by one */
                /* Control */
-       ndev->irq = irq_of_parse_and_map(op->node, 0);
+       ndev->irq = irq_of_parse_and_map(op->dev.of_node, 0);
 
                /* RX */
        priv->r_irq = bcom_get_task_irq(priv->rx_dmatsk);
@@ -942,20 +942,20 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match)
        /* Start with safe defaults for link connection */
        priv->speed = 100;
        priv->duplex = DUPLEX_HALF;
-       priv->mdio_speed = ((mpc5xxx_get_bus_frequency(op->node) >> 20) / 5) << 1;
+       priv->mdio_speed = ((mpc5xxx_get_bus_frequency(op->dev.of_node) >> 20) / 5) << 1;
 
        /* The current speed preconfigures the speed of the MII link */
-       prop = of_get_property(op->node, "current-speed", &prop_size);
+       prop = of_get_property(op->dev.of_node, "current-speed", &prop_size);
        if (prop && (prop_size >= sizeof(u32) * 2)) {
                priv->speed = prop[0];
                priv->duplex = prop[1] ? DUPLEX_FULL : DUPLEX_HALF;
        }
 
        /* If there is a phy handle, then get the PHY node */
-       priv->phy_node = of_parse_phandle(op->node, "phy-handle", 0);
+       priv->phy_node = of_parse_phandle(op->dev.of_node, "phy-handle", 0);
 
        /* the 7-wire property means don't use MII mode */
-       if (of_find_property(op->node, "fsl,7-wire-mode", NULL)) {
+       if (of_find_property(op->dev.of_node, "fsl,7-wire-mode", NULL)) {
                priv->seven_wire_mode = 1;
                dev_info(&ndev->dev, "using 7-wire PHY mode\n");
        }
@@ -1063,9 +1063,11 @@ static struct of_device_id mpc52xx_fec_match[] = {
 MODULE_DEVICE_TABLE(of, mpc52xx_fec_match);
 
 static struct of_platform_driver mpc52xx_fec_driver = {
-       .owner          = THIS_MODULE,
-       .name           = DRIVER_NAME,
-       .match_table    = mpc52xx_fec_match,
+       .driver = {
+               .name = DRIVER_NAME,
+               .owner = THIS_MODULE,
+               .of_match_table = mpc52xx_fec_match,
+       },
        .probe          = mpc52xx_fec_probe,
        .remove         = mpc52xx_fec_remove,
 #ifdef CONFIG_PM
index 7658a082e390cd4c8d86c066cdf0d76aa1d72d80..006f64d9f96a695e6fbde63b0269121da323df0b 100644 (file)
@@ -66,7 +66,7 @@ static int mpc52xx_fec_mdio_probe(struct of_device *of,
                const struct of_device_id *match)
 {
        struct device *dev = &of->dev;
-       struct device_node *np = of->node;
+       struct device_node *np = of->dev.of_node;
        struct mii_bus *bus;
        struct mpc52xx_fec_mdio_priv *priv;
        struct resource res = {};
@@ -107,7 +107,7 @@ static int mpc52xx_fec_mdio_probe(struct of_device *of,
 
        /* set MII speed */
        out_be32(&priv->regs->mii_speed,
-               ((mpc5xxx_get_bus_frequency(of->node) >> 20) / 5) << 1);
+               ((mpc5xxx_get_bus_frequency(of->dev.of_node) >> 20) / 5) << 1);
 
        err = of_mdiobus_register(bus, np);
        if (err)
@@ -159,10 +159,13 @@ static struct of_device_id mpc52xx_fec_mdio_match[] = {
 MODULE_DEVICE_TABLE(of, mpc52xx_fec_mdio_match);
 
 struct of_platform_driver mpc52xx_fec_mdio_driver = {
-       .name = "mpc5200b-fec-phy",
+       .driver = {
+               .name = "mpc5200b-fec-phy",
+               .owner = THIS_MODULE,
+               .of_match_table = mpc52xx_fec_mdio_match,
+       },
        .probe = mpc52xx_fec_mdio_probe,
        .remove = mpc52xx_fec_mdio_remove,
-       .match_table = mpc52xx_fec_mdio_match,
 };
 
 /* let fec driver call it, since this has to be registered before it */
index 0fb0fefcb7874f5ba159be21a73db0fb3d710523..309a0eaddd815739d33c196d94ce3aad770cec34 100644 (file)
@@ -1013,7 +1013,7 @@ static int __devinit fs_enet_probe(struct of_device *ofdev,
                return -ENOMEM;
 
        if (!IS_FEC(match)) {
-               data = of_get_property(ofdev->node, "fsl,cpm-command", &len);
+               data = of_get_property(ofdev->dev.of_node, "fsl,cpm-command", &len);
                if (!data || len != 4)
                        goto out_free_fpi;
 
@@ -1025,8 +1025,8 @@ static int __devinit fs_enet_probe(struct of_device *ofdev,
        fpi->rx_copybreak = 240;
        fpi->use_napi = 1;
        fpi->napi_weight = 17;
-       fpi->phy_node = of_parse_phandle(ofdev->node, "phy-handle", 0);
-       if ((!fpi->phy_node) && (!of_get_property(ofdev->node, "fixed-link",
+       fpi->phy_node = of_parse_phandle(ofdev->dev.of_node, "phy-handle", 0);
+       if ((!fpi->phy_node) && (!of_get_property(ofdev->dev.of_node, "fixed-link",
                                                  NULL)))
                goto out_free_fpi;
 
@@ -1059,7 +1059,7 @@ static int __devinit fs_enet_probe(struct of_device *ofdev,
        spin_lock_init(&fep->lock);
        spin_lock_init(&fep->tx_lock);
 
-       mac_addr = of_get_mac_address(ofdev->node);
+       mac_addr = of_get_mac_address(ofdev->dev.of_node);
        if (mac_addr)
                memcpy(ndev->dev_addr, mac_addr, 6);
 
@@ -1156,8 +1156,11 @@ static struct of_device_id fs_enet_match[] = {
 MODULE_DEVICE_TABLE(of, fs_enet_match);
 
 static struct of_platform_driver fs_enet_driver = {
-       .name   = "fs_enet",
-       .match_table = fs_enet_match,
+       .driver = {
+               .owner = THIS_MODULE,
+               .name = "fs_enet",
+               .of_match_table = fs_enet_match,
+       },
        .probe = fs_enet_probe,
        .remove = fs_enet_remove,
 };
index 714da967fa19bde3162c5be324bd48fcd19e926f..5d45084b287d13afa6d24dcfc02d18f56afb0ce1 100644 (file)
@@ -88,19 +88,19 @@ static int do_pd_setup(struct fs_enet_private *fep)
        struct fs_platform_info *fpi = fep->fpi;
        int ret = -EINVAL;
 
-       fep->interrupt = of_irq_to_resource(ofdev->node, 0, NULL);
+       fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL);
        if (fep->interrupt == NO_IRQ)
                goto out;
 
-       fep->fcc.fccp = of_iomap(ofdev->node, 0);
+       fep->fcc.fccp = of_iomap(ofdev->dev.of_node, 0);
        if (!fep->fcc.fccp)
                goto out;
 
-       fep->fcc.ep = of_iomap(ofdev->node, 1);
+       fep->fcc.ep = of_iomap(ofdev->dev.of_node, 1);
        if (!fep->fcc.ep)
                goto out_fccp;
 
-       fep->fcc.fcccp = of_iomap(ofdev->node, 2);
+       fep->fcc.fcccp = of_iomap(ofdev->dev.of_node, 2);
        if (!fep->fcc.fcccp)
                goto out_ep;
 
index 7eff92ef01da4de9e28857cfbe0a5c69f4789b41..7ca1642276d02e44949a966f3107c7b36c82ea03 100644 (file)
@@ -98,11 +98,11 @@ static int do_pd_setup(struct fs_enet_private *fep)
 {
        struct of_device *ofdev = to_of_device(fep->dev);
 
-       fep->interrupt = of_irq_to_resource(ofdev->node, 0, NULL);
+       fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL);
        if (fep->interrupt == NO_IRQ)
                return -EINVAL;
 
-       fep->fec.fecp = of_iomap(ofdev->node, 0);
+       fep->fec.fecp = of_iomap(ofdev->dev.of_node, 0);
        if (!fep->fcc.fccp)
                return -EINVAL;
 
index 7f0591e43cd992feac439dbdd83bbb7a9ae17d42..a3c44544846d5ab2ef1a54e205c51e4e79310688 100644 (file)
@@ -98,15 +98,15 @@ static int do_pd_setup(struct fs_enet_private *fep)
 {
        struct of_device *ofdev = to_of_device(fep->dev);
 
-       fep->interrupt = of_irq_to_resource(ofdev->node, 0, NULL);
+       fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL);
        if (fep->interrupt == NO_IRQ)
                return -EINVAL;
 
-       fep->scc.sccp = of_iomap(ofdev->node, 0);
+       fep->scc.sccp = of_iomap(ofdev->dev.of_node, 0);
        if (!fep->scc.sccp)
                return -EINVAL;
 
-       fep->scc.ep = of_iomap(ofdev->node, 1);
+       fep->scc.ep = of_iomap(ofdev->dev.of_node, 1);
        if (!fep->scc.ep) {
                iounmap(fep->scc.sccp);
                return -EINVAL;
index 24ff9f43a62b4e6378da3f231b280e75258bfce9..0f90685d3d19472e3bc0dc9b05ed5872a5fa9f63 100644 (file)
@@ -224,8 +224,11 @@ static struct of_device_id fs_enet_mdio_bb_match[] = {
 MODULE_DEVICE_TABLE(of, fs_enet_mdio_bb_match);
 
 static struct of_platform_driver fs_enet_bb_mdio_driver = {
-       .name = "fsl-bb-mdio",
-       .match_table = fs_enet_mdio_bb_match,
+       .driver = {
+               .name = "fsl-bb-mdio",
+               .owner = THIS_MODULE,
+               .of_match_table = fs_enet_mdio_bb_match,
+       },
        .probe = fs_enet_mdio_probe,
        .remove = fs_enet_mdio_remove,
 };
index 5944b65082cb2a11ef13b16f2cb12c853b9b65c3..bddffd169b93888cfab8d97f05de9136063a81cb 100644 (file)
@@ -124,7 +124,7 @@ static int __devinit fs_enet_mdio_probe(struct of_device *ofdev,
        new_bus->write = &fs_enet_fec_mii_write;
        new_bus->reset = &fs_enet_fec_mii_reset;
 
-       ret = of_address_to_resource(ofdev->node, 0, &res);
+       ret = of_address_to_resource(ofdev->dev.of_node, 0, &res);
        if (ret)
                goto out_res;
 
@@ -135,7 +135,7 @@ static int __devinit fs_enet_mdio_probe(struct of_device *ofdev,
                goto out_fec;
 
        if (get_bus_freq) {
-               clock = get_bus_freq(ofdev->node);
+               clock = get_bus_freq(ofdev->dev.of_node);
                if (!clock) {
                        /* Use maximum divider if clock is unknown */
                        dev_warn(&ofdev->dev, "could not determine IPS clock\n");
@@ -172,7 +172,7 @@ static int __devinit fs_enet_mdio_probe(struct of_device *ofdev,
        new_bus->parent = &ofdev->dev;
        dev_set_drvdata(&ofdev->dev, new_bus);
 
-       ret = of_mdiobus_register(new_bus, ofdev->node);
+       ret = of_mdiobus_register(new_bus, ofdev->dev.of_node);
        if (ret)
                goto out_free_irqs;
 
@@ -222,8 +222,11 @@ static struct of_device_id fs_enet_mdio_fec_match[] = {
 MODULE_DEVICE_TABLE(of, fs_enet_mdio_fec_match);
 
 static struct of_platform_driver fs_enet_fec_mdio_driver = {
-       .name = "fsl-fec-mdio",
-       .match_table = fs_enet_mdio_fec_match,
+       .driver = {
+               .name = "fsl-fec-mdio",
+               .owner = THIS_MODULE,
+               .of_match_table = fs_enet_mdio_fec_match,
+       },
        .probe = fs_enet_mdio_probe,
        .remove = fs_enet_mdio_remove,
 };
index ff028f59b9306c086f03df626e5cecf31d131a22..b4c41d72c423ef79e004bd901f23ef03f96e311f 100644 (file)
@@ -267,7 +267,7 @@ static int get_ucc_id_for_range(u64 start, u64 end, u32 *ucc_id)
 static int fsl_pq_mdio_probe(struct of_device *ofdev,
                const struct of_device_id *match)
 {
-       struct device_node *np = ofdev->node;
+       struct device_node *np = ofdev->dev.of_node;
        struct device_node *tbi;
        struct fsl_pq_mdio_priv *priv;
        struct fsl_pq_mdio __iomem *regs = NULL;
@@ -471,10 +471,13 @@ static struct of_device_id fsl_pq_mdio_match[] = {
 MODULE_DEVICE_TABLE(of, fsl_pq_mdio_match);
 
 static struct of_platform_driver fsl_pq_mdio_driver = {
-       .name = "fsl-pq_mdio",
+       .driver = {
+               .name = "fsl-pq_mdio",
+               .owner = THIS_MODULE,
+               .of_match_table = fsl_pq_mdio_match,
+       },
        .probe = fsl_pq_mdio_probe,
        .remove = fsl_pq_mdio_remove,
-       .match_table = fsl_pq_mdio_match,
 };
 
 int __init fsl_pq_mdio_init(void)
index c6791cd4ee0537503a70f4cbd2d0a005725c863d..1830f3199cb523080b1a880dd5e834ad9fb8d99a 100644 (file)
@@ -608,7 +608,7 @@ static int gfar_of_init(struct of_device *ofdev, struct net_device **pdev)
        int err = 0, i;
        struct net_device *dev = NULL;
        struct gfar_private *priv = NULL;
-       struct device_node *np = ofdev->node;
+       struct device_node *np = ofdev->dev.of_node;
        struct device_node *child = NULL;
        const u32 *stash;
        const u32 *stash_len;
@@ -646,7 +646,7 @@ static int gfar_of_init(struct of_device *ofdev, struct net_device **pdev)
                return -ENOMEM;
 
        priv = netdev_priv(dev);
-       priv->node = ofdev->node;
+       priv->node = ofdev->dev.of_node;
        priv->ndev = dev;
 
        dev->num_tx_queues = num_tx_qs;
@@ -939,7 +939,7 @@ static int gfar_probe(struct of_device *ofdev,
        priv = netdev_priv(dev);
        priv->ndev = dev;
        priv->ofdev = ofdev;
-       priv->node = ofdev->node;
+       priv->node = ofdev->dev.of_node;
        SET_NETDEV_DEV(dev, &ofdev->dev);
 
        spin_lock_init(&priv->bflock);
@@ -3167,12 +3167,14 @@ MODULE_DEVICE_TABLE(of, gfar_match);
 
 /* Structure for a device driver */
 static struct of_platform_driver gfar_driver = {
-       .name = "fsl-gianfar",
-       .match_table = gfar_match,
-
+       .driver = {
+               .name = "fsl-gianfar",
+               .owner = THIS_MODULE,
+               .pm = GFAR_PM_OPS,
+               .of_match_table = gfar_match,
+       },
        .probe = gfar_probe,
        .remove = gfar_remove,
-       .driver.pm = GFAR_PM_OPS,
 };
 
 static int __init gfar_init(void)
index fd491e409488e0ea0b8947c36f24f4810b012c03..f37a4c143ddddf985556018dc5e21288e23f3207 100644 (file)
@@ -1499,7 +1499,8 @@ static int __devinit greth_of_probe(struct of_device *ofdev, const struct of_dev
        if (i == 6) {
                const unsigned char *addr;
                int len;
-               addr = of_get_property(ofdev->node, "local-mac-address", &len);
+               addr = of_get_property(ofdev->dev.of_node, "local-mac-address",
+                                       &len);
                if (addr != NULL && len == 6) {
                        for (i = 0; i < 6; i++)
                                macaddr[i] = (unsigned int) addr[i];
index 2484e9e6c1edd0f7dd06026d4111b6dadab7ea12..b150c102ca5ace67ce0fb988266ba88b13023cbe 100644 (file)
@@ -136,7 +136,8 @@ static inline void emac_report_timeout_error(struct emac_instance *dev,
                                  EMAC_FTR_440EP_PHY_CLK_FIX))
                DBG(dev, "%s" NL, error);
        else if (net_ratelimit())
-               printk(KERN_ERR "%s: %s\n", dev->ofdev->node->full_name, error);
+               printk(KERN_ERR "%s: %s\n", dev->ofdev->dev.of_node->full_name,
+                       error);
 }
 
 /* EMAC PHY clock workaround:
@@ -2185,7 +2186,7 @@ static void emac_ethtool_get_drvinfo(struct net_device *ndev,
        strcpy(info->version, DRV_VERSION);
        info->fw_version[0] = '\0';
        sprintf(info->bus_info, "PPC 4xx EMAC-%d %s",
-               dev->cell_index, dev->ofdev->node->full_name);
+               dev->cell_index, dev->ofdev->dev.of_node->full_name);
        info->regdump_len = emac_ethtool_get_regs_len(ndev);
 }
 
@@ -2379,7 +2380,7 @@ static int __devinit emac_read_uint_prop(struct device_node *np, const char *nam
 
 static int __devinit emac_init_phy(struct emac_instance *dev)
 {
-       struct device_node *np = dev->ofdev->node;
+       struct device_node *np = dev->ofdev->dev.of_node;
        struct net_device *ndev = dev->ndev;
        u32 phy_map, adv;
        int i;
@@ -2514,7 +2515,7 @@ static int __devinit emac_init_phy(struct emac_instance *dev)
 
 static int __devinit emac_init_config(struct emac_instance *dev)
 {
-       struct device_node *np = dev->ofdev->node;
+       struct device_node *np = dev->ofdev->dev.of_node;
        const void *p;
        unsigned int plen;
        const char *pm, *phy_modes[] = {
@@ -2723,7 +2724,7 @@ static int __devinit emac_probe(struct of_device *ofdev,
 {
        struct net_device *ndev;
        struct emac_instance *dev;
-       struct device_node *np = ofdev->node;
+       struct device_node *np = ofdev->dev.of_node;
        struct device_node **blist = NULL;
        int err, i;
 
@@ -2810,7 +2811,7 @@ static int __devinit emac_probe(struct of_device *ofdev,
        err = mal_register_commac(dev->mal, &dev->commac);
        if (err) {
                printk(KERN_ERR "%s: failed to register with mal %s!\n",
-                      np->full_name, dev->mal_dev->node->full_name);
+                      np->full_name, dev->mal_dev->dev.of_node->full_name);
                goto err_rel_deps;
        }
        dev->rx_skb_size = emac_rx_skb_size(ndev->mtu);
@@ -2995,9 +2996,11 @@ static struct of_device_id emac_match[] =
 MODULE_DEVICE_TABLE(of, emac_match);
 
 static struct of_platform_driver emac_driver = {
-       .name = "emac",
-       .match_table = emac_match,
-
+       .driver = {
+               .name = "emac",
+               .owner = THIS_MODULE,
+               .of_match_table = emac_match,
+       },
        .probe = emac_probe,
        .remove = emac_remove,
 };
index 775c850a425a311e9341718fa85b302641fb942b..3995fafc1e08bb3adb8658bd4d0098c4aff09f60 100644 (file)
@@ -33,7 +33,7 @@ static void emac_desc_dump(struct emac_instance *p)
        int i;
        printk("** EMAC %s TX BDs **\n"
               " tx_cnt = %d tx_slot = %d ack_slot = %d\n",
-              p->ofdev->node->full_name,
+              p->ofdev->dev.of_node->full_name,
               p->tx_cnt, p->tx_slot, p->ack_slot);
        for (i = 0; i < NUM_TX_BUFF / 2; ++i)
                printk
@@ -49,7 +49,7 @@ static void emac_desc_dump(struct emac_instance *p)
        printk("** EMAC %s RX BDs **\n"
               " rx_slot = %d flags = 0x%lx rx_skb_size = %d rx_sync_size = %d\n"
               " rx_sg_skb = 0x%p\n",
-              p->ofdev->node->full_name,
+              p->ofdev->dev.of_node->full_name,
               p->rx_slot, p->commac.flags, p->rx_skb_size,
               p->rx_sync_size, p->rx_sg_skb);
        for (i = 0; i < NUM_RX_BUFF / 2; ++i)
@@ -77,7 +77,8 @@ static void emac_mac_dump(struct emac_instance *dev)
               "MR0 = 0x%08x MR1 = 0x%08x TMR0 = 0x%08x TMR1 = 0x%08x\n"
               "RMR = 0x%08x ISR = 0x%08x ISER = 0x%08x\n"
               "IAR = %04x%08x VTPID = 0x%04x VTCI = 0x%04x\n",
-              dev->ofdev->node->full_name, in_be32(&p->mr0), in_be32(&p->mr1),
+              dev->ofdev->dev.of_node->full_name,
+              in_be32(&p->mr0), in_be32(&p->mr1),
               in_be32(&p->tmr0), in_be32(&p->tmr1),
               in_be32(&p->rmr), in_be32(&p->isr), in_be32(&p->iser),
               in_be32(&p->iahr), in_be32(&p->ialr), in_be32(&p->vtpid),
@@ -128,7 +129,7 @@ static void emac_mal_dump(struct mal_instance *mal)
               "CFG = 0x%08x ESR = 0x%08x IER = 0x%08x\n"
               "TX|CASR = 0x%08x CARR = 0x%08x EOBISR = 0x%08x DEIR = 0x%08x\n"
               "RX|CASR = 0x%08x CARR = 0x%08x EOBISR = 0x%08x DEIR = 0x%08x\n",
-              mal->ofdev->node->full_name,
+              mal->ofdev->dev.of_node->full_name,
               get_mal_dcrn(mal, MAL_CFG), get_mal_dcrn(mal, MAL_ESR),
               get_mal_dcrn(mal, MAL_IER),
               get_mal_dcrn(mal, MAL_TXCASR), get_mal_dcrn(mal, MAL_TXCARR),
index b631842ec8d00a2cd861bde288cd7c768bc141d0..e596c77ccdf7ea54e1fb64054bc89f1b3ac07a6b 100644 (file)
@@ -53,8 +53,8 @@ extern void emac_dbg_dump_all(void);
 
 #endif
 
-#define EMAC_DBG(dev, name, fmt, arg...) \
-       printk(KERN_DEBUG #name "%s: " fmt, dev->ofdev->node->full_name, ## arg)
+#define EMAC_DBG(d, name, fmt, arg...) \
+       printk(KERN_DEBUG #name "%s: " fmt, d->ofdev->dev.of_node->full_name, ## arg)
 
 #if DBG_LEVEL > 0
 #  define DBG(d,f,x...)                EMAC_DBG(d, emac, f, ##x)
index 5b3d94419fe6aa1ba94c2e1c8e00cc30f925ccdc..fcff9e0bd3827396546398c5f5feb2cc4269c90f 100644 (file)
@@ -538,11 +538,11 @@ static int __devinit mal_probe(struct of_device *ofdev,
        }
        mal->index = index;
        mal->ofdev = ofdev;
-       mal->version = of_device_is_compatible(ofdev->node, "ibm,mcmal2") ? 2 : 1;
+       mal->version = of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal2") ? 2 : 1;
 
        MAL_DBG(mal, "probe" NL);
 
-       prop = of_get_property(ofdev->node, "num-tx-chans", NULL);
+       prop = of_get_property(ofdev->dev.of_node, "num-tx-chans", NULL);
        if (prop == NULL) {
                printk(KERN_ERR
                       "mal%d: can't find MAL num-tx-chans property!\n",
@@ -552,7 +552,7 @@ static int __devinit mal_probe(struct of_device *ofdev,
        }
        mal->num_tx_chans = prop[0];
 
-       prop = of_get_property(ofdev->node, "num-rx-chans", NULL);
+       prop = of_get_property(ofdev->dev.of_node, "num-rx-chans", NULL);
        if (prop == NULL) {
                printk(KERN_ERR
                       "mal%d: can't find MAL num-rx-chans property!\n",
@@ -562,14 +562,14 @@ static int __devinit mal_probe(struct of_device *ofdev,
        }
        mal->num_rx_chans = prop[0];
 
-       dcr_base = dcr_resource_start(ofdev->node, 0);
+       dcr_base = dcr_resource_start(ofdev->dev.of_node, 0);
        if (dcr_base == 0) {
                printk(KERN_ERR
                       "mal%d: can't find DCR resource!\n", index);
                err = -ENODEV;
                goto fail;
        }
-       mal->dcr_host = dcr_map(ofdev->node, dcr_base, 0x100);
+       mal->dcr_host = dcr_map(ofdev->dev.of_node, dcr_base, 0x100);
        if (!DCR_MAP_OK(mal->dcr_host)) {
                printk(KERN_ERR
                       "mal%d: failed to map DCRs !\n", index);
@@ -577,28 +577,28 @@ static int __devinit mal_probe(struct of_device *ofdev,
                goto fail;
        }
 
-       if (of_device_is_compatible(ofdev->node, "ibm,mcmal-405ez")) {
+       if (of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal-405ez")) {
 #if defined(CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT) && \
                defined(CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR)
                mal->features |= (MAL_FTR_CLEAR_ICINTSTAT |
                                MAL_FTR_COMMON_ERR_INT);
 #else
                printk(KERN_ERR "%s: Support for 405EZ not enabled!\n",
-                               ofdev->node->full_name);
+                               ofdev->dev.of_node->full_name);
                err = -ENODEV;
                goto fail;
 #endif
        }
 
-       mal->txeob_irq = irq_of_parse_and_map(ofdev->node, 0);
-       mal->rxeob_irq = irq_of_parse_and_map(ofdev->node, 1);
-       mal->serr_irq = irq_of_parse_and_map(ofdev->node, 2);
+       mal->txeob_irq = irq_of_parse_and_map(ofdev->dev.of_node, 0);
+       mal->rxeob_irq = irq_of_parse_and_map(ofdev->dev.of_node, 1);
+       mal->serr_irq = irq_of_parse_and_map(ofdev->dev.of_node, 2);
 
        if (mal_has_feature(mal, MAL_FTR_COMMON_ERR_INT)) {
                mal->txde_irq = mal->rxde_irq = mal->serr_irq;
        } else {
-               mal->txde_irq = irq_of_parse_and_map(ofdev->node, 3);
-               mal->rxde_irq = irq_of_parse_and_map(ofdev->node, 4);
+               mal->txde_irq = irq_of_parse_and_map(ofdev->dev.of_node, 3);
+               mal->rxde_irq = irq_of_parse_and_map(ofdev->dev.of_node, 4);
        }
 
        if (mal->txeob_irq == NO_IRQ || mal->rxeob_irq == NO_IRQ ||
@@ -629,7 +629,7 @@ static int __devinit mal_probe(struct of_device *ofdev,
        /* Current Axon is not happy with priority being non-0, it can
         * deadlock, fix it up here
         */
-       if (of_device_is_compatible(ofdev->node, "ibm,mcmal-axon"))
+       if (of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal-axon"))
                cfg &= ~(MAL2_CFG_RPP_10 | MAL2_CFG_WPP_10);
 
        /* Apply configuration */
@@ -701,7 +701,7 @@ static int __devinit mal_probe(struct of_device *ofdev,
 
        printk(KERN_INFO
               "MAL v%d %s, %d TX channels, %d RX channels\n",
-              mal->version, ofdev->node->full_name,
+              mal->version, ofdev->dev.of_node->full_name,
               mal->num_tx_chans, mal->num_rx_chans);
 
        /* Advertise this instance to the rest of the world */
@@ -790,9 +790,11 @@ static struct of_device_id mal_platform_match[] =
 };
 
 static struct of_platform_driver mal_of_driver = {
-       .name = "mcmal",
-       .match_table = mal_platform_match,
-
+       .driver = {
+               .name = "mcmal",
+               .owner = THIS_MODULE,
+               .of_match_table = mal_platform_match,
+       },
        .probe = mal_probe,
        .remove = mal_remove,
 };
index 5b90d34c845502dc789b4c87b6bc35e9f2a89f64..108919bcdf137959d9bb2b5957607132ebabb407 100644 (file)
@@ -103,7 +103,7 @@ int __devinit rgmii_attach(struct of_device *ofdev, int input, int mode)
        /* Check if we need to attach to a RGMII */
        if (input < 0 || !rgmii_valid_mode(mode)) {
                printk(KERN_ERR "%s: unsupported settings !\n",
-                      ofdev->node->full_name);
+                      ofdev->dev.of_node->full_name);
                return -ENODEV;
        }
 
@@ -113,7 +113,7 @@ int __devinit rgmii_attach(struct of_device *ofdev, int input, int mode)
        out_be32(&p->fer, in_be32(&p->fer) | rgmii_mode_mask(mode, input));
 
        printk(KERN_NOTICE "%s: input %d in %s mode\n",
-              ofdev->node->full_name, input, rgmii_mode_name(mode));
+              ofdev->dev.of_node->full_name, input, rgmii_mode_name(mode));
 
        ++dev->users;
 
@@ -231,7 +231,7 @@ void *rgmii_dump_regs(struct of_device *ofdev, void *buf)
 static int __devinit rgmii_probe(struct of_device *ofdev,
                                 const struct of_device_id *match)
 {
-       struct device_node *np = ofdev->node;
+       struct device_node *np = ofdev->dev.of_node;
        struct rgmii_instance *dev;
        struct resource regs;
        int rc;
@@ -264,11 +264,11 @@ static int __devinit rgmii_probe(struct of_device *ofdev,
        }
 
        /* Check for RGMII flags */
-       if (of_get_property(ofdev->node, "has-mdio", NULL))
+       if (of_get_property(ofdev->dev.of_node, "has-mdio", NULL))
                dev->flags |= EMAC_RGMII_FLAG_HAS_MDIO;
 
        /* CAB lacks the right properties, fix this up */
-       if (of_device_is_compatible(ofdev->node, "ibm,rgmii-axon"))
+       if (of_device_is_compatible(ofdev->dev.of_node, "ibm,rgmii-axon"))
                dev->flags |= EMAC_RGMII_FLAG_HAS_MDIO;
 
        DBG2(dev, " Boot FER = 0x%08x, SSR = 0x%08x\n",
@@ -279,7 +279,7 @@ static int __devinit rgmii_probe(struct of_device *ofdev,
 
        printk(KERN_INFO
               "RGMII %s initialized with%s MDIO support\n",
-              ofdev->node->full_name,
+              ofdev->dev.of_node->full_name,
               (dev->flags & EMAC_RGMII_FLAG_HAS_MDIO) ? "" : "out");
 
        wmb();
@@ -319,9 +319,11 @@ static struct of_device_id rgmii_match[] =
 };
 
 static struct of_platform_driver rgmii_driver = {
-       .name = "emac-rgmii",
-       .match_table = rgmii_match,
-
+       .driver = {
+               .name = "emac-rgmii",
+               .owner = THIS_MODULE,
+               .of_match_table = rgmii_match,
+       },
        .probe = rgmii_probe,
        .remove = rgmii_remove,
 };
index 30173a9fb557d930f543d0c237f3fff0a5cb777b..044637144c4349b4291351fc38772b17f0355830 100644 (file)
@@ -57,7 +57,8 @@ void tah_reset(struct of_device *ofdev)
                --n;
 
        if (unlikely(!n))
-               printk(KERN_ERR "%s: reset timeout\n", ofdev->node->full_name);
+               printk(KERN_ERR "%s: reset timeout\n",
+                       ofdev->dev.of_node->full_name);
 
        /* 10KB TAH TX FIFO accomodates the max MTU of 9000 */
        out_be32(&p->mr,
@@ -89,7 +90,7 @@ void *tah_dump_regs(struct of_device *ofdev, void *buf)
 static int __devinit tah_probe(struct of_device *ofdev,
                               const struct of_device_id *match)
 {
-       struct device_node *np = ofdev->node;
+       struct device_node *np = ofdev->dev.of_node;
        struct tah_instance *dev;
        struct resource regs;
        int rc;
@@ -127,7 +128,7 @@ static int __devinit tah_probe(struct of_device *ofdev,
        tah_reset(ofdev);
 
        printk(KERN_INFO
-              "TAH %s initialized\n", ofdev->node->full_name);
+              "TAH %s initialized\n", ofdev->dev.of_node->full_name);
        wmb();
 
        return 0;
@@ -165,9 +166,11 @@ static struct of_device_id tah_match[] =
 };
 
 static struct of_platform_driver tah_driver = {
-       .name = "emac-tah",
-       .match_table = tah_match,
-
+       .driver = {
+               .name = "emac-tah",
+               .owner = THIS_MODULE,
+               .of_match_table = tah_match,
+       },
        .probe = tah_probe,
        .remove = tah_remove,
 };
index 1f038f808ab32512fdb78ae01b4f54f9f152d5a2..046dcd069c4556c2cddf68eb772577b3ca6e00ff 100644 (file)
@@ -121,13 +121,14 @@ int __devinit zmii_attach(struct of_device *ofdev, int input, int *mode)
                        dev->mode = *mode;
 
                printk(KERN_NOTICE "%s: bridge in %s mode\n",
-                      ofdev->node->full_name, zmii_mode_name(dev->mode));
+                      ofdev->dev.of_node->full_name,
+                      zmii_mode_name(dev->mode));
        } else {
                /* All inputs must use the same mode */
                if (*mode != PHY_MODE_NA && *mode != dev->mode) {
                        printk(KERN_ERR
                               "%s: invalid mode %d specified for input %d\n",
-                              ofdev->node->full_name, *mode, input);
+                              ofdev->dev.of_node->full_name, *mode, input);
                        mutex_unlock(&dev->lock);
                        return -EINVAL;
                }
@@ -233,7 +234,7 @@ void *zmii_dump_regs(struct of_device *ofdev, void *buf)
 static int __devinit zmii_probe(struct of_device *ofdev,
                                const struct of_device_id *match)
 {
-       struct device_node *np = ofdev->node;
+       struct device_node *np = ofdev->dev.of_node;
        struct zmii_instance *dev;
        struct resource regs;
        int rc;
@@ -273,7 +274,7 @@ static int __devinit zmii_probe(struct of_device *ofdev,
        out_be32(&dev->base->fer, 0);
 
        printk(KERN_INFO
-              "ZMII %s initialized\n", ofdev->node->full_name);
+              "ZMII %s initialized\n", ofdev->dev.of_node->full_name);
        wmb();
        dev_set_drvdata(&ofdev->dev, dev);
 
@@ -312,9 +313,11 @@ static struct of_device_id zmii_match[] =
 };
 
 static struct of_platform_driver zmii_driver = {
-       .name = "emac-zmii",
-       .match_table = zmii_match,
-
+       .driver = {
+               .name = "emac-zmii",
+               .owner = THIS_MODULE,
+               .of_match_table = zmii_match,
+       },
        .probe = zmii_probe,
        .remove = zmii_remove,
 };
index b59b24d667f0a0a4d9b3f823961506465a191b44..fa7620e2840481d4069268d721b6629d37ad35e0 100644 (file)
@@ -920,14 +920,14 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match)
        mutex_init(&lp->indirect_mutex);
 
        /* map device registers */
-       lp->regs = of_iomap(op->node, 0);
+       lp->regs = of_iomap(op->dev.of_node, 0);
        if (!lp->regs) {
                dev_err(&op->dev, "could not map temac regs.\n");
                goto nodev;
        }
 
        /* Find the DMA node, map the DMA registers, and decode the DMA IRQs */
-       np = of_parse_phandle(op->node, "llink-connected", 0);
+       np = of_parse_phandle(op->dev.of_node, "llink-connected", 0);
        if (!np) {
                dev_err(&op->dev, "could not find DMA node\n");
                goto nodev;
@@ -959,7 +959,7 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match)
        of_node_put(np); /* Finished with the DMA node; drop the reference */
 
        /* Retrieve the MAC address */
-       addr = of_get_property(op->node, "local-mac-address", &size);
+       addr = of_get_property(op->dev.of_node, "local-mac-address", &size);
        if ((!addr) || (size != 6)) {
                dev_err(&op->dev, "could not find MAC address\n");
                rc = -ENODEV;
@@ -967,11 +967,11 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match)
        }
        temac_set_mac_address(ndev, (void *)addr);
 
-       rc = temac_mdio_setup(lp, op->node);
+       rc = temac_mdio_setup(lp, op->dev.of_node);
        if (rc)
                dev_warn(&op->dev, "error registering MDIO bus\n");
 
-       lp->phy_node = of_parse_phandle(op->node, "phy-handle", 0);
+       lp->phy_node = of_parse_phandle(op->dev.of_node, "phy-handle", 0);
        if (lp->phy_node)
                dev_dbg(lp->dev, "using PHY node %s (%p)\n", np->full_name, np);
 
@@ -1024,12 +1024,12 @@ static struct of_device_id temac_of_match[] __devinitdata = {
 MODULE_DEVICE_TABLE(of, temac_of_match);
 
 static struct of_platform_driver temac_of_driver = {
-       .match_table = temac_of_match,
        .probe = temac_of_probe,
        .remove = __devexit_p(temac_of_remove),
        .driver = {
                .owner = THIS_MODULE,
                .name = "xilinx_temac",
+               .of_match_table = temac_of_match,
        },
 };
 
index 3898108f98ce6c7d6bd096a868080def27501223..1a57c3da1f498bb5d21531879ae2d9df941324dd 100644 (file)
@@ -928,7 +928,7 @@ static const struct net_device_ops myri_ops = {
 
 static int __devinit myri_sbus_probe(struct of_device *op, const struct of_device_id *match)
 {
-       struct device_node *dp = op->node;
+       struct device_node *dp = op->dev.of_node;
        static unsigned version_printed;
        struct net_device *dev;
        struct myri_eth *mp;
@@ -1161,8 +1161,11 @@ static const struct of_device_id myri_sbus_match[] = {
 MODULE_DEVICE_TABLE(of, myri_sbus_match);
 
 static struct of_platform_driver myri_sbus_driver = {
-       .name           = "myri",
-       .match_table    = myri_sbus_match,
+       .driver = {
+               .name = "myri",
+               .owner = THIS_MODULE,
+               .of_match_table = myri_sbus_match,
+       },
        .probe          = myri_sbus_probe,
        .remove         = __devexit_p(myri_sbus_remove),
 };
index 30abb4e436f16ed70b3aa85487d59441fad6a313..63e8e3893bd6cb9d05ad674a036c1b3f49e82aad 100644 (file)
@@ -9115,7 +9115,7 @@ static int __devinit niu_n2_irq_init(struct niu *np, u8 *ldg_num_map)
        const u32 *int_prop;
        int i;
 
-       int_prop = of_get_property(op->node, "interrupts", NULL);
+       int_prop = of_get_property(op->dev.of_node, "interrupts", NULL);
        if (!int_prop)
                return -ENODEV;
 
@@ -9266,7 +9266,7 @@ static int __devinit niu_get_of_props(struct niu *np)
        int prop_len;
 
        if (np->parent->plat_type == PLAT_TYPE_NIU)
-               dp = np->op->node;
+               dp = np->op->dev.of_node;
        else
                dp = pci_device_to_OF_node(np->pdev);
 
@@ -10083,10 +10083,10 @@ static int __devinit niu_of_probe(struct of_device *op,
 
        niu_driver_version();
 
-       reg = of_get_property(op->node, "reg", NULL);
+       reg = of_get_property(op->dev.of_node, "reg", NULL);
        if (!reg) {
                dev_err(&op->dev, "%s: No 'reg' property, aborting\n",
-                       op->node->full_name);
+                       op->dev.of_node->full_name);
                return -ENODEV;
        }
 
@@ -10099,7 +10099,7 @@ static int __devinit niu_of_probe(struct of_device *op,
        np = netdev_priv(dev);
 
        memset(&parent_id, 0, sizeof(parent_id));
-       parent_id.of = of_get_parent(op->node);
+       parent_id.of = of_get_parent(op->dev.of_node);
 
        np->parent = niu_get_parent(np, &parent_id,
                                    PLAT_TYPE_NIU);
@@ -10234,8 +10234,11 @@ static const struct of_device_id niu_match[] = {
 MODULE_DEVICE_TABLE(of, niu_match);
 
 static struct of_platform_driver niu_of_driver = {
-       .name           = "niu",
-       .match_table    = niu_match,
+       .driver = {
+               .name = "niu",
+               .owner = THIS_MODULE,
+               .of_match_table = niu_match,
+       },
        .probe          = niu_of_probe,
        .remove         = __devexit_p(niu_of_remove),
 };
index 35897134a5dd34c210e72229136e50c7a44a0040..fc5fef2a81752c17249c66609923eddb5af046da 100644 (file)
@@ -199,12 +199,12 @@ static int __devinit mdio_ofgpio_probe(struct of_device *ofdev,
        if (!pdata)
                return -ENOMEM;
 
-       ret = of_get_gpio(ofdev->node, 0);
+       ret = of_get_gpio(ofdev->dev.of_node, 0);
        if (ret < 0)
                goto out_free;
        pdata->mdc = ret;
 
-       ret = of_get_gpio(ofdev->node, 1);
+       ret = of_get_gpio(ofdev->dev.of_node, 1);
        if (ret < 0)
                goto out_free;
        pdata->mdio = ret;
@@ -213,7 +213,7 @@ static int __devinit mdio_ofgpio_probe(struct of_device *ofdev,
        if (!new_bus)
                goto out_free;
 
-       ret = of_mdiobus_register(new_bus, ofdev->node);
+       ret = of_mdiobus_register(new_bus, ofdev->dev.of_node);
        if (ret)
                mdio_gpio_bus_deinit(&ofdev->dev);
 
@@ -241,8 +241,11 @@ static struct of_device_id mdio_ofgpio_match[] = {
 MODULE_DEVICE_TABLE(of, mdio_ofgpio_match);
 
 static struct of_platform_driver mdio_ofgpio_driver = {
-       .name = "mdio-gpio",
-       .match_table = mdio_ofgpio_match,
+       .driver = {
+               .name = "mdio-gpio",
+               .owner = THIS_MODULE,
+               .of_match_table = mdio_ofgpio_match,
+       },
        .probe = mdio_ofgpio_probe,
        .remove = __devexit_p(mdio_ofgpio_remove),
 };
index 4591fe9bf0b9dd5fe875f5e6aecc5f877b0cc119..367e96f317d4d4df298a59945a2d3e3ca7ea9e73 100644 (file)
@@ -1131,8 +1131,8 @@ static int __devinit bigmac_ether_init(struct of_device *op,
                goto fail_and_cleanup;
 
        /* Get supported SBUS burst sizes. */
-       bsizes = of_getintprop_default(qec_op->node, "burst-sizes", 0xff);
-       bsizes_more = of_getintprop_default(qec_op->node, "burst-sizes", 0xff);
+       bsizes = of_getintprop_default(qec_op->dev.of_node, "burst-sizes", 0xff);
+       bsizes_more = of_getintprop_default(qec_op->dev.of_node, "burst-sizes", 0xff);
 
        bsizes &= 0xff;
        if (bsizes_more != 0xff)
@@ -1184,7 +1184,7 @@ static int __devinit bigmac_ether_init(struct of_device *op,
        }
 
        /* Get the board revision of this BigMAC. */
-       bp->board_rev = of_getintprop_default(bp->bigmac_op->node,
+       bp->board_rev = of_getintprop_default(bp->bigmac_op->dev.of_node,
                                              "board-version", 1);
 
        /* Init auto-negotiation timer state. */
@@ -1290,8 +1290,11 @@ static const struct of_device_id bigmac_sbus_match[] = {
 MODULE_DEVICE_TABLE(of, bigmac_sbus_match);
 
 static struct of_platform_driver bigmac_sbus_driver = {
-       .name           = "sunbmac",
-       .match_table    = bigmac_sbus_match,
+       .driver = {
+               .name = "sunbmac",
+               .owner = THIS_MODULE,
+               .of_match_table = bigmac_sbus_match,
+       },
        .probe          = bigmac_sbus_probe,
        .remove         = __devexit_p(bigmac_sbus_remove),
 };
index 915c5909c7a8bb90e4c6fe22617f5dbee032552c..3d9650b8d38fab26fce127f52d7a09ad1170ff6d 100644 (file)
@@ -2481,7 +2481,7 @@ static void hme_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info
        else {
                const struct linux_prom_registers *regs;
                struct of_device *op = hp->happy_dev;
-               regs = of_get_property(op->node, "regs", NULL);
+               regs = of_get_property(op->dev.of_node, "regs", NULL);
                if (regs)
                        sprintf(info->bus_info, "SBUS:%d",
                                regs->which_io);
@@ -2641,14 +2641,14 @@ 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)
 {
-       struct device_node *dp = op->node, *sbus_dp;
+       struct device_node *dp = op->dev.of_node, *sbus_dp;
        struct quattro *qp = NULL;
        struct happy_meal *hp;
        struct net_device *dev;
        int i, qfe_slot = -1;
        int err = -ENODEV;
 
-       sbus_dp = to_of_device(op->dev.parent)->node;
+       sbus_dp = to_of_device(op->dev.parent)->dev.of_node;
 
        /* We can match PCI devices too, do not accept those here. */
        if (strcmp(sbus_dp->name, "sbus"))
@@ -3237,7 +3237,7 @@ static void happy_meal_pci_exit(void)
 #ifdef CONFIG_SBUS
 static int __devinit hme_sbus_probe(struct of_device *op, const struct of_device_id *match)
 {
-       struct device_node *dp = op->node;
+       struct device_node *dp = op->dev.of_node;
        const char *model = of_get_property(dp, "model", NULL);
        int is_qfe = (match->data != NULL);
 
@@ -3291,8 +3291,11 @@ static const struct of_device_id hme_sbus_match[] = {
 MODULE_DEVICE_TABLE(of, hme_sbus_match);
 
 static struct of_platform_driver hme_sbus_driver = {
-       .name           = "hme",
-       .match_table    = hme_sbus_match,
+       .driver = {
+               .name = "hme",
+               .owner = THIS_MODULE,
+               .of_match_table = hme_sbus_match,
+       },
        .probe          = hme_sbus_probe,
        .remove         = __devexit_p(hme_sbus_remove),
 };
index 386af7bbe6783914f3fd683bc12d28a84b770e1a..7d9c33dd9d1acf8efc6e9925787678f050a0b80c 100644 (file)
@@ -1323,7 +1323,7 @@ static int __devinit sparc_lance_probe_one(struct of_device *op,
                                           struct of_device *ledma,
                                           struct of_device *lebuffer)
 {
-       struct device_node *dp = op->node;
+       struct device_node *dp = op->dev.of_node;
        static unsigned version_printed;
        struct lance_private *lp;
        struct net_device *dev;
@@ -1410,7 +1410,7 @@ static int __devinit sparc_lance_probe_one(struct of_device *op,
 
        lp->burst_sizes = 0;
        if (lp->ledma) {
-               struct device_node *ledma_dp = ledma->node;
+               struct device_node *ledma_dp = ledma->dev.of_node;
                struct device_node *sbus_dp;
                unsigned int sbmask;
                const char *prop;
@@ -1506,7 +1506,7 @@ fail:
 static int __devinit sunlance_sbus_probe(struct of_device *op, const struct of_device_id *match)
 {
        struct of_device *parent = to_of_device(op->dev.parent);
-       struct device_node *parent_dp = parent->node;
+       struct device_node *parent_dp = parent->dev.of_node;
        int err;
 
        if (!strcmp(parent_dp->name, "ledma")) {
@@ -1545,8 +1545,11 @@ static const struct of_device_id sunlance_sbus_match[] = {
 MODULE_DEVICE_TABLE(of, sunlance_sbus_match);
 
 static struct of_platform_driver sunlance_sbus_driver = {
-       .name           = "sunlance",
-       .match_table    = sunlance_sbus_match,
+       .driver = {
+               .name = "sunlance",
+               .owner = THIS_MODULE,
+               .of_match_table = sunlance_sbus_match,
+       },
        .probe          = sunlance_sbus_probe,
        .remove         = __devexit_p(sunlance_sbus_remove),
 };
index a7542d25c8451f31b0420e586fd96b74e77eced4..72b579c8d8127d4d18c006c22ca631b2be06fe06 100644 (file)
@@ -695,7 +695,7 @@ static void qe_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
        strcpy(info->version, "3.0");
 
        op = qep->op;
-       regs = of_get_property(op->node, "reg", NULL);
+       regs = of_get_property(op->dev.of_node, "reg", NULL);
        if (regs)
                sprintf(info->bus_info, "SBUS:%d", regs->which_io);
 
@@ -799,7 +799,7 @@ static struct sunqec * __devinit get_qec(struct of_device *child)
                        if (qec_global_reset(qecp->gregs))
                                goto fail;
 
-                       qecp->qec_bursts = qec_get_burst(op->node);
+                       qecp->qec_bursts = qec_get_burst(op->dev.of_node);
 
                        qec_init_once(qecp, op);
 
@@ -857,7 +857,7 @@ static int __devinit qec_ether_init(struct of_device *op)
 
        res = -ENODEV;
 
-       i = of_getintprop_default(op->node, "channel#", -1);
+       i = of_getintprop_default(op->dev.of_node, "channel#", -1);
        if (i == -1)
                goto fail;
        qe->channel = i;
@@ -977,8 +977,11 @@ static const struct of_device_id qec_sbus_match[] = {
 MODULE_DEVICE_TABLE(of, qec_sbus_match);
 
 static struct of_platform_driver qec_sbus_driver = {
-       .name           = "qec",
-       .match_table    = qec_sbus_match,
+       .driver = {
+               .name = "qec",
+               .owner = THIS_MODULE,
+               .of_match_table = qec_sbus_match,
+       },
        .probe          = qec_sbus_probe,
        .remove         = __devexit_p(qec_sbus_remove),
 };
index 932602db54b39c09b1c7bbb9e62e6a663c356903..4a34833b85ddad284c1f19efff1bf9d23ed7f7e1 100644 (file)
@@ -3719,7 +3719,7 @@ static const struct net_device_ops ucc_geth_netdev_ops = {
 static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *match)
 {
        struct device *device = &ofdev->dev;
-       struct device_node *np = ofdev->node;
+       struct device_node *np = ofdev->dev.of_node;
        struct net_device *dev = NULL;
        struct ucc_geth_private *ugeth = NULL;
        struct ucc_geth_info *ug_info;
@@ -3963,8 +3963,11 @@ static struct of_device_id ucc_geth_match[] = {
 MODULE_DEVICE_TABLE(of, ucc_geth_match);
 
 static struct of_platform_driver ucc_geth_driver = {
-       .name           = DRV_NAME,
-       .match_table    = ucc_geth_match,
+       .driver = {
+               .name = DRV_NAME,
+               .owner = THIS_MODULE,
+               .of_match_table = ucc_geth_match,
+       },
        .probe          = ucc_geth_probe,
        .remove         = ucc_geth_remove,
        .suspend        = ucc_geth_suspend,
index a7db68d37ee98c3e3359507ad31630110a55d8f4..d04c5b262050a9aefef0f48cde2bfa2f700510a7 100644 (file)
@@ -1088,7 +1088,7 @@ static void xemaclite_remove_ndev(struct net_device *ndev)
  */
 static bool get_bool(struct of_device *ofdev, const char *s)
 {
-       u32 *p = (u32 *)of_get_property(ofdev->node, s, NULL);
+       u32 *p = (u32 *)of_get_property(ofdev->dev.of_node, s, NULL);
 
        if (p) {
                return (bool)*p;
@@ -1130,14 +1130,14 @@ static int __devinit xemaclite_of_probe(struct of_device *ofdev,
        dev_info(dev, "Device Tree Probing\n");
 
        /* Get iospace for the device */
-       rc = of_address_to_resource(ofdev->node, 0, &r_mem);
+       rc = of_address_to_resource(ofdev->dev.of_node, 0, &r_mem);
        if (rc) {
                dev_err(dev, "invalid address\n");
                return rc;
        }
 
        /* Get IRQ for the device */
-       rc = of_irq_to_resource(ofdev->node, 0, &r_irq);
+       rc = of_irq_to_resource(ofdev->dev.of_node, 0, &r_irq);
        if (rc == NO_IRQ) {
                dev_err(dev, "no IRQ found\n");
                return rc;
@@ -1182,7 +1182,7 @@ static int __devinit xemaclite_of_probe(struct of_device *ofdev,
        lp->next_rx_buf_to_use = 0x0;
        lp->tx_ping_pong = get_bool(ofdev, "xlnx,tx-ping-pong");
        lp->rx_ping_pong = get_bool(ofdev, "xlnx,rx-ping-pong");
-       mac_address = of_get_mac_address(ofdev->node);
+       mac_address = of_get_mac_address(ofdev->dev.of_node);
 
        if (mac_address)
                /* Set the MAC address. */
@@ -1197,7 +1197,7 @@ static int __devinit xemaclite_of_probe(struct of_device *ofdev,
        /* Set the MAC address in the EmacLite device */
        xemaclite_update_address(lp, ndev->dev_addr);
 
-       lp->phy_node = of_parse_phandle(ofdev->node, "phy-handle", 0);
+       lp->phy_node = of_parse_phandle(ofdev->dev.of_node, "phy-handle", 0);
        rc = xemaclite_mdio_setup(lp, &ofdev->dev);
        if (rc)
                dev_warn(&ofdev->dev, "error registering MDIO bus\n");
@@ -1291,8 +1291,11 @@ static struct of_device_id xemaclite_of_match[] __devinitdata = {
 MODULE_DEVICE_TABLE(of, xemaclite_of_match);
 
 static struct of_platform_driver xemaclite_of_driver = {
-       .name           = DRIVER_NAME,
-       .match_table    = xemaclite_of_match,
+       .driver = {
+               .name = DRIVER_NAME,
+               .owner = THIS_MODULE,
+               .of_match_table = xemaclite_of_match,
+       },
        .probe          = xemaclite_of_probe,
        .remove         = __devexit_p(xemaclite_of_remove),
 };
index 224ae6bc67b6bb7b5b893192b7170cc6be8ef29c..7d18f8e0b013199c2e1bfd886b8dd6b93c639f7e 100644 (file)
@@ -10,8 +10,7 @@
 #include <asm/errno.h>
 
 /**
- * of_match_device - Tell if an of_device structure has a matching
- * of_match structure
+ * of_match_device - Tell if a struct device matches an of_device_id list
  * @ids: array of of device match structures to search in
  * @dev: the of device structure to match against
  *
  * system is in its list of supported devices.
  */
 const struct of_device_id *of_match_device(const struct of_device_id *matches,
-                                       const struct of_device *dev)
+                                          const struct device *dev)
 {
-       if (!dev->node)
+       if (!dev->of_node)
                return NULL;
-       return of_match_node(matches, dev->node);
+       return of_match_node(matches, dev->of_node);
 }
 EXPORT_SYMBOL(of_match_device);
 
@@ -54,7 +53,7 @@ static ssize_t devspec_show(struct device *dev,
        struct of_device *ofdev;
 
        ofdev = to_of_device(dev);
-       return sprintf(buf, "%s\n", ofdev->node->full_name);
+       return sprintf(buf, "%s\n", ofdev->dev.of_node->full_name);
 }
 
 static ssize_t name_show(struct device *dev,
@@ -63,7 +62,7 @@ static ssize_t name_show(struct device *dev,
        struct of_device *ofdev;
 
        ofdev = to_of_device(dev);
-       return sprintf(buf, "%s\n", ofdev->node->name);
+       return sprintf(buf, "%s\n", ofdev->dev.of_node->name);
 }
 
 static ssize_t modalias_show(struct device *dev,
@@ -97,14 +96,14 @@ void of_release_dev(struct device *dev)
        struct of_device *ofdev;
 
        ofdev = to_of_device(dev);
-       of_node_put(ofdev->node);
+       of_node_put(ofdev->dev.of_node);
        kfree(ofdev);
 }
 EXPORT_SYMBOL(of_release_dev);
 
 int of_device_register(struct of_device *ofdev)
 {
-       BUG_ON(ofdev->node == NULL);
+       BUG_ON(ofdev->dev.of_node == NULL);
 
        device_initialize(&ofdev->dev);
 
@@ -112,7 +111,7 @@ int of_device_register(struct of_device *ofdev)
         * the parent. If there is no parent defined, set the node
         * explicitly */
        if (!ofdev->dev.parent)
-               set_dev_node(&ofdev->dev, of_node_to_nid(ofdev->node));
+               set_dev_node(&ofdev->dev, of_node_to_nid(ofdev->dev.of_node));
 
        return device_add(&ofdev->dev);
 }
@@ -132,11 +131,11 @@ ssize_t of_device_get_modalias(struct of_device *ofdev,
        ssize_t tsize, csize, repend;
 
        /* Name & Type */
-       csize = snprintf(str, len, "of:N%sT%s",
-                               ofdev->node->name, ofdev->node->type);
+       csize = snprintf(str, len, "of:N%sT%s", ofdev->dev.of_node->name,
+                        ofdev->dev.of_node->type);
 
        /* Get compatible property if any */
-       compat = of_get_property(ofdev->node, "compatible", &cplen);
+       compat = of_get_property(ofdev->dev.of_node, "compatible", &cplen);
        if (!compat)
                return csize;
 
index dee4fb56b094106381dc891d94bdc47341480131..b6987bba85566d6df8f3afdd8187599cb3618758 100644 (file)
@@ -556,6 +556,21 @@ void __init unflatten_device_tree(void)
 
        pr_debug(" -> unflatten_device_tree()\n");
 
+       if (!initial_boot_params) {
+               pr_debug("No device tree pointer\n");
+               return;
+       }
+
+       pr_debug("Unflattening device tree:\n");
+       pr_debug("magic: %08x\n", be32_to_cpu(initial_boot_params->magic));
+       pr_debug("size: %08x\n", be32_to_cpu(initial_boot_params->totalsize));
+       pr_debug("version: %08x\n", be32_to_cpu(initial_boot_params->version));
+
+       if (be32_to_cpu(initial_boot_params->magic) != OF_DT_HEADER) {
+               pr_err("Invalid device tree blob header\n");
+               return;
+       }
+
        /* First pass, scan for size */
        start = ((unsigned long)initial_boot_params) +
                be32_to_cpu(initial_boot_params->off_dt_struct);
index a3a708e590d00eabbd2ce62105d2bd4c06bbd922..ab6522c8e4fe801fc5ae8fefb782fdc0869a77fa 100644 (file)
@@ -42,7 +42,7 @@ void of_register_i2c_devices(struct i2c_adapter *adap,
 
                info.addr = be32_to_cpup(addr);
 
-               dev_archdata_set_node(&dev_ad, node);
+               info.of_node = node;
                info.archdata = &dev_ad;
 
                request_module("%s", info.type);
@@ -68,7 +68,7 @@ EXPORT_SYMBOL(of_register_i2c_devices);
 
 static int of_dev_node_match(struct device *dev, void *data)
 {
-        return dev_archdata_get_node(&dev->archdata) == data;
+        return dev->of_node == data;
 }
 
 /* must call put_device() when done with returned i2c_client device */
index b4748337223b43d28aa7fb11d7eb788ec29d6da4..42a6715f8e84287ed2eef40382dc7bc89e181fbf 100644 (file)
@@ -79,7 +79,7 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
                /* Associate the OF node with the device structure so it
                 * can be looked up later */
                of_node_get(child);
-               dev_archdata_set_node(&phy->dev.archdata, child);
+               phy->dev.of_node = child;
 
                /* All data is now stored in the phy struct; register it */
                rc = phy_device_register(phy);
@@ -100,7 +100,7 @@ EXPORT_SYMBOL(of_mdiobus_register);
 /* Helper function for of_phy_find_device */
 static int of_phy_match(struct device *dev, void *phy_np)
 {
-       return dev_archdata_get_node(&dev->archdata) == phy_np;
+       return dev->of_node == phy_np;
 }
 
 /**
@@ -166,7 +166,7 @@ struct phy_device *of_phy_connect_fixed_link(struct net_device *dev,
        if (!dev->dev.parent)
                return NULL;
 
-       net_np = dev_archdata_get_node(&dev->dev.parent->archdata);
+       net_np = dev->dev.parent->of_node;
        if (!net_np)
                return NULL;
 
index f65f48b9844885c9708596c73aa4f7eeefba1904..5fed7e3c7da341362a1c7bdf08f53b5e4b11c60a 100644 (file)
@@ -79,7 +79,7 @@ void of_register_spi_devices(struct spi_master *master, struct device_node *np)
 
                /* Store a pointer to the node in the device structure */
                of_node_get(nc);
-               spi->dev.archdata.of_node = nc;
+               spi->dev.of_node = nc;
 
                /* Register the new device */
                request_module(spi->modalias);
index d58ade170c4b27fd50bf5abc471eac618c4eea3e..7dacc1ebe91e013cadbc77ca57cf729f34585ef5 100644 (file)
@@ -21,14 +21,12 @@ extern struct device_attribute of_platform_device_attrs[];
 
 static int of_platform_bus_match(struct device *dev, struct device_driver *drv)
 {
-       struct of_device *of_dev = to_of_device(dev);
-       struct of_platform_driver *of_drv = to_of_platform_driver(drv);
-       const struct of_device_id *matches = of_drv->match_table;
+       const struct of_device_id *matches = drv->of_match_table;
 
        if (!matches)
                return 0;
 
-       return of_match_device(matches, of_dev) != NULL;
+       return of_match_device(matches, dev) != NULL;
 }
 
 static int of_platform_device_probe(struct device *dev)
@@ -46,7 +44,7 @@ static int of_platform_device_probe(struct device *dev)
 
        of_dev_get(of_dev);
 
-       match = of_match_device(drv->match_table, of_dev);
+       match = of_match_device(drv->driver.of_match_table, dev);
        if (match)
                error = drv->probe(of_dev, match);
        if (error)
@@ -386,11 +384,6 @@ int of_bus_type_init(struct bus_type *bus, const char *name)
 
 int of_register_driver(struct of_platform_driver *drv, struct bus_type *bus)
 {
-       /* initialize common driver fields */
-       if (!drv->driver.name)
-               drv->driver.name = drv->name;
-       if (!drv->driver.owner)
-               drv->driver.owner = drv->owner;
        drv->driver.bus = bus;
 
        /* register with core */
index 065f229580d5cfc3acd8d740597bb638c558a889..9a5b4b89416146827467946e77e96c36ac391c68 100644 (file)
@@ -382,8 +382,11 @@ static const struct of_device_id bpp_match[] = {
 MODULE_DEVICE_TABLE(of, bpp_match);
 
 static struct of_platform_driver bpp_sbus_driver = {
-       .name           = "bpp",
-       .match_table    = bpp_match,
+       .driver = {
+               .name = "bpp",
+               .owner = THIS_MODULE,
+               .of_match_table = bpp_match,
+       },
        .probe          = bpp_probe,
        .remove         = __devexit_p(bpp_remove),
 };
index 2e59fe947d28095c15fb96327499e07edd8b32ea..f94d8281cfb04df3fd06582c61e1e2f654c877dd 100644 (file)
@@ -185,7 +185,7 @@ static int __devinit electra_cf_probe(struct of_device *ofdev,
                                      const struct of_device_id *match)
 {
        struct device *device = &ofdev->dev;
-       struct device_node *np = ofdev->node;
+       struct device_node *np = ofdev->dev.of_node;
        struct electra_cf_socket   *cf;
        struct resource mem, io;
        int status;
@@ -357,8 +357,11 @@ static const struct of_device_id electra_cf_match[] = {
 MODULE_DEVICE_TABLE(of, electra_cf_match);
 
 static struct of_platform_driver electra_cf_driver = {
-       .name      = (char *)driver_name,
-       .match_table    = electra_cf_match,
+       .driver = {
+               .name = (char *)driver_name,
+               .owner = THIS_MODULE,
+               .of_match_table = electra_cf_match,
+       },
        .probe    = electra_cf_probe,
        .remove   = electra_cf_remove,
 };
index 41cc954a5ffee1dd2a87bd4374bd69f22ddb4f9e..1a648b90b634890512ffb95560c1944d5d7a214a 100644 (file)
@@ -1298,8 +1298,11 @@ static const struct of_device_id m8xx_pcmcia_match[] = {
 MODULE_DEVICE_TABLE(of, m8xx_pcmcia_match);
 
 static struct of_platform_driver m8xx_pcmcia_driver = {
-       .name = driver_name,
-       .match_table = m8xx_pcmcia_match,
+       .driver = {
+               .name = driver_name,
+               .owner = THIS_MODULE,
+               .match_table = m8xx_pcmcia_match,
+       },
        .probe = m8xx_probe,
        .remove = m8xx_remove,
 };
index b4951eb0358e4046ca64bc38a7c9d2f2cd41dd4a..103fdf6b0b89650cc207f3d24f8b5ceb116cc709 100644 (file)
@@ -565,9 +565,9 @@ int bbc_envctrl_init(struct bbc_i2c_bus *bp)
        int devidx = 0;
 
        while ((op = bbc_i2c_getdev(bp, devidx++)) != NULL) {
-               if (!strcmp(op->node->name, "temperature"))
+               if (!strcmp(op->dev.of_node->name, "temperature"))
                        attach_one_temp(bp, op, temp_index++);
-               if (!strcmp(op->node->name, "fan-control"))
+               if (!strcmp(op->dev.of_node->name, "fan-control"))
                        attach_one_fan(bp, op, fan_index++);
        }
        if (temp_index != 0 && fan_index != 0) {
index 7e30e5f6e032a30bbdae7d89355b49122b4f6b42..8bfdd63a1fcbc085c33fbbab85c61e8675347138 100644 (file)
@@ -97,7 +97,7 @@ struct bbc_i2c_client *bbc_i2c_attach(struct bbc_i2c_bus *bp, struct of_device *
        client->bp = bp;
        client->op = op;
 
-       reg = of_get_property(op->node, "reg", NULL);
+       reg = of_get_property(op->dev.of_node, "reg", NULL);
        if (!reg) {
                kfree(client);
                return NULL;
@@ -327,7 +327,7 @@ static struct bbc_i2c_bus * __init attach_one_i2c(struct of_device *op, int inde
        spin_lock_init(&bp->lock);
 
        entry = 0;
-       for (dp = op->node->child;
+       for (dp = op->dev.of_node->child;
             dp && entry < 8;
             dp = dp->sibling, entry++) {
                struct of_device *child_op;
@@ -414,8 +414,11 @@ static const struct of_device_id bbc_i2c_match[] = {
 MODULE_DEVICE_TABLE(of, bbc_i2c_match);
 
 static struct of_platform_driver bbc_i2c_driver = {
-       .name           = "bbc_i2c",
-       .match_table    = bbc_i2c_match,
+       .driver = {
+               .name = "bbc_i2c",
+               .owner = THIS_MODULE,
+               .of_match_table = bbc_i2c_match,
+       },
        .probe          = bbc_i2c_probe,
        .remove         = __devexit_p(bbc_i2c_remove),
 };
index 3e59189f4137292f3eab85a11fe9a1db268649be..7baf1b644039dd0e9282661051760eba8f20d010 100644 (file)
@@ -216,7 +216,7 @@ static int __devinit d7s_probe(struct of_device *op,
        writeb(regs,  p->regs);
 
        printk(KERN_INFO PFX "7-Segment Display%s at [%s:0x%llx] %s\n",
-              op->node->full_name,
+              op->dev.of_node->full_name,
               (regs & D7S_FLIP) ? " (FLIPPED)" : "",
               op->resource[0].start,
               sol_compat ? "in sol_compat mode" : "");
@@ -266,8 +266,11 @@ static const struct of_device_id d7s_match[] = {
 MODULE_DEVICE_TABLE(of, d7s_match);
 
 static struct of_platform_driver d7s_driver = {
-       .name           = DRIVER_NAME,
-       .match_table    = d7s_match,
+       .driver = {
+               .name = DRIVER_NAME,
+               .owner = THIS_MODULE,
+               .of_match_table = d7s_match,
+       },
        .probe          = d7s_probe,
        .remove         = __devexit_p(d7s_remove),
 };
index c6e2eff19409c6cd3cdf6c4bcbe75bd77cccc3fc..c8166ecf527601423681e0311bfa9ad28de4acb4 100644 (file)
@@ -1043,7 +1043,7 @@ static int __devinit envctrl_probe(struct of_device *op,
                return -ENOMEM;
 
        index = 0;
-       dp = op->node->child;
+       dp = op->dev.of_node->child;
        while (dp) {
                if (!strcmp(dp->name, "gpio")) {
                        i2c_childlist[index].i2ctype = I2C_GPIO;
@@ -1131,8 +1131,11 @@ static const struct of_device_id envctrl_match[] = {
 MODULE_DEVICE_TABLE(of, envctrl_match);
 
 static struct of_platform_driver envctrl_driver = {
-       .name           = DRIVER_NAME,
-       .match_table    = envctrl_match,
+       .driver = {
+               .name = DRIVER_NAME,
+               .owner = THIS_MODULE,
+               .of_match_table = envctrl_match,
+       },
        .probe          = envctrl_probe,
        .remove         = __devexit_p(envctrl_remove),
 };
index d3b62eb0fba7abf2f9547de5a410179e27fa81bf..368d66294d831ea8fdba4ef0e1e66c92b7f5fd87 100644 (file)
@@ -162,7 +162,7 @@ static struct miscdevice flash_dev = { FLASH_MINOR, "flash", &flash_fops };
 static int __devinit flash_probe(struct of_device *op,
                                 const struct of_device_id *match)
 {
-       struct device_node *dp = op->node;
+       struct device_node *dp = op->dev.of_node;
        struct device_node *parent;
 
        parent = dp->parent;
@@ -184,7 +184,7 @@ static int __devinit flash_probe(struct of_device *op,
        flash.busy = 0;
 
        printk(KERN_INFO "%s: OBP Flash, RD %lx[%lx] WR %lx[%lx]\n",
-              op->node->full_name,
+              op->dev.of_node->full_name,
               flash.read_base, flash.read_size,
               flash.write_base, flash.write_size);
 
@@ -207,8 +207,11 @@ static const struct of_device_id flash_match[] = {
 MODULE_DEVICE_TABLE(of, flash_match);
 
 static struct of_platform_driver flash_driver = {
-       .name           = "flash",
-       .match_table    = flash_match,
+       .driver = {
+               .name = "flash",
+               .owner = THIS_MODULE,
+               .of_match_table = flash_match,
+       },
        .probe          = flash_probe,
        .remove         = __devexit_p(flash_remove),
 };
index 2c56fd56ec6395038ca6e0c83eb660849d15b4fa..5f253665a1da862b2c3d3159ab426485b4b6a16e 100644 (file)
@@ -382,7 +382,7 @@ static int __devinit uctrl_probe(struct of_device *op,
 
        sbus_writel(UCTRL_INTR_RXNE_REQ|UCTRL_INTR_RXNE_MSK, &p->regs->uctrl_intr);
        printk(KERN_INFO "%s: uctrl regs[0x%p] (irq %d)\n",
-              op->node->full_name, p->regs, p->irq);
+              op->dev.of_node->full_name, p->regs, p->irq);
        uctrl_get_event_status(p);
        uctrl_get_external_status(p);
 
@@ -425,8 +425,11 @@ static const struct of_device_id uctrl_match[] = {
 MODULE_DEVICE_TABLE(of, uctrl_match);
 
 static struct of_platform_driver uctrl_driver = {
-       .name           = "uctrl",
-       .match_table    = uctrl_match,
+       .driver = {
+               .name = "uctrl",
+               .owner = THIS_MODULE,
+               .of_match_table = uctrl_match,
+       },
        .probe          = uctrl_probe,
        .remove         = __devexit_p(uctrl_remove),
 };
index 3eb2b7b3d8b0ec7e1e0860495b14ac7167bade7f..fef49521cbc3f6888684789f4bd50a67f1b5a3bb 100644 (file)
@@ -1157,7 +1157,7 @@ static void ibmvfc_gather_partition_info(struct ibmvfc_host *vhost)
 static void ibmvfc_set_login_info(struct ibmvfc_host *vhost)
 {
        struct ibmvfc_npiv_login *login_info = &vhost->login_info;
-       struct device_node *of_node = vhost->dev->archdata.of_node;
+       struct device_node *of_node = vhost->dev->of_node;
        const char *location;
 
        memset(login_info, 0, sizeof(*login_info));
index 88bad0e81bdda3b5195396b9e2e6d0d7dc4f26e2..aad35cc41e49bfbfb7d27c3b28b8759dd60962d2 100644 (file)
@@ -932,7 +932,7 @@ static void send_mad_capabilities(struct ibmvscsi_host_data *hostdata)
        struct viosrp_capabilities *req;
        struct srp_event_struct *evt_struct;
        unsigned long flags;
-       struct device_node *of_node = hostdata->dev->archdata.of_node;
+       struct device_node *of_node = hostdata->dev->of_node;
        const char *location;
 
        evt_struct = get_event_struct(&hostdata->pool);
index aa406497eebcf912cd296dd1554fdc9120611aa2..ca5c15c779cfc5a4d26659818545414b12682052 100644 (file)
@@ -755,7 +755,7 @@ static void __devinit qpti_get_scsi_id(struct qlogicpti *qpti)
        struct of_device *op = qpti->op;
        struct device_node *dp;
 
-       dp = op->node;
+       dp = op->dev.of_node;
 
        qpti->scsi_id = of_getintprop_default(dp, "initiator-id", -1);
        if (qpti->scsi_id == -1)
@@ -776,8 +776,8 @@ static void qpti_get_bursts(struct qlogicpti *qpti)
        struct of_device *op = qpti->op;
        u8 bursts, bmask;
 
-       bursts = of_getintprop_default(op->node, "burst-sizes", 0xff);
-       bmask = of_getintprop_default(op->node->parent, "burst-sizes", 0xff);
+       bursts = of_getintprop_default(op->dev.of_node, "burst-sizes", 0xff);
+       bmask = of_getintprop_default(op->dev.of_node->parent, "burst-sizes", 0xff);
        if (bmask != 0xff)
                bursts &= bmask;
        if (bursts == 0xff ||
@@ -1293,7 +1293,7 @@ static struct scsi_host_template qpti_template = {
 static int __devinit qpti_sbus_probe(struct of_device *op, const struct of_device_id *match)
 {
        struct scsi_host_template *tpnt = match->data;
-       struct device_node *dp = op->node;
+       struct device_node *dp = op->dev.of_node;
        struct Scsi_Host *host;
        struct qlogicpti *qpti;
        static int nqptis;
@@ -1315,7 +1315,7 @@ static int __devinit qpti_sbus_probe(struct of_device *op, const struct of_devic
        qpti->qhost = host;
        qpti->op = op;
        qpti->qpti_id = nqptis;
-       strcpy(qpti->prom_name, op->node->name);
+       strcpy(qpti->prom_name, op->dev.of_node->name);
        qpti->is_pti = strcmp(qpti->prom_name, "QLGC,isp");
 
        if (qpti_map_regs(qpti) < 0)
@@ -1456,8 +1456,11 @@ static const struct of_device_id qpti_match[] = {
 MODULE_DEVICE_TABLE(of, qpti_match);
 
 static struct of_platform_driver qpti_sbus_driver = {
-       .name           = "qpti",
-       .match_table    = qpti_match,
+       .driver = {
+               .name = "qpti",
+               .owner = THIS_MODULE,
+               .of_match_table = qpti_match,
+       },
        .probe          = qpti_sbus_probe,
        .remove         = __devexit_p(qpti_sbus_remove),
 };
index fc23d273fb1a6c17d37a648e6fd05c1cbaccbf75..386dd9d602b6e32ce4d262375caa4738ff9b1b5e 100644 (file)
@@ -125,7 +125,7 @@ static void __devinit esp_get_scsi_id(struct esp *esp, struct of_device *espdma)
        struct of_device *op = esp->dev;
        struct device_node *dp;
 
-       dp = op->node;
+       dp = op->dev.of_node;
        esp->scsi_id = of_getintprop_default(dp, "initiator-id", 0xff);
        if (esp->scsi_id != 0xff)
                goto done;
@@ -134,7 +134,7 @@ static void __devinit esp_get_scsi_id(struct esp *esp, struct of_device *espdma)
        if (esp->scsi_id != 0xff)
                goto done;
 
-       esp->scsi_id = of_getintprop_default(espdma->node,
+       esp->scsi_id = of_getintprop_default(espdma->dev.of_node,
                                             "scsi-initiator-id", 7);
 
 done:
@@ -147,7 +147,7 @@ static void __devinit esp_get_differential(struct esp *esp)
        struct of_device *op = esp->dev;
        struct device_node *dp;
 
-       dp = op->node;
+       dp = op->dev.of_node;
        if (of_find_property(dp, "differential", NULL))
                esp->flags |= ESP_FLAG_DIFFERENTIAL;
        else
@@ -160,7 +160,7 @@ static void __devinit esp_get_clock_params(struct esp *esp)
        struct device_node *bus_dp, *dp;
        int fmhz;
 
-       dp = op->node;
+       dp = op->dev.of_node;
        bus_dp = dp->parent;
 
        fmhz = of_getintprop_default(dp, "clock-frequency", 0);
@@ -172,12 +172,12 @@ static void __devinit esp_get_clock_params(struct esp *esp)
 
 static void __devinit esp_get_bursts(struct esp *esp, struct of_device *dma_of)
 {
-       struct device_node *dma_dp = dma_of->node;
+       struct device_node *dma_dp = dma_of->dev.of_node;
        struct of_device *op = esp->dev;
        struct device_node *dp;
        u8 bursts, val;
 
-       dp = op->node;
+       dp = op->dev.of_node;
        bursts = of_getintprop_default(dp, "burst-sizes", 0xff);
        val = of_getintprop_default(dma_dp, "burst-sizes", 0xff);
        if (val != 0xff)
@@ -565,7 +565,7 @@ fail:
 static int __devinit esp_sbus_probe(struct of_device *op, const struct of_device_id *match)
 {
        struct device_node *dma_node = NULL;
-       struct device_node *dp = op->node;
+       struct device_node *dp = op->dev.of_node;
        struct of_device *dma_of = NULL;
        int hme = 0;
 
@@ -574,7 +574,7 @@ static int __devinit esp_sbus_probe(struct of_device *op, const struct of_device
             !strcmp(dp->parent->name, "dma")))
                dma_node = dp->parent;
        else if (!strcmp(dp->name, "SUNW,fas")) {
-               dma_node = op->node;
+               dma_node = op->dev.of_node;
                hme = 1;
        }
        if (dma_node)
@@ -633,8 +633,11 @@ static const struct of_device_id esp_match[] = {
 MODULE_DEVICE_TABLE(of, esp_match);
 
 static struct of_platform_driver esp_sbus_driver = {
-       .name           = "esp",
-       .match_table    = esp_match,
+       .driver = {
+               .name = "esp",
+               .owner = THIS_MODULE,
+               .of_match_table = esp_match,
+       },
        .probe          = esp_sbus_probe,
        .remove         = __devexit_p(esp_sbus_remove),
 };
index fe91319b5f65b30a15c5b89baea504c27871b6e6..0099b8692b60c7b2f23781b32a530702e56457d7 100644 (file)
@@ -559,7 +559,7 @@ static int __devinit apbuart_probe(struct of_device *op,
 
        i = 0;
        for (i = 0; i < grlib_apbuart_port_nr; i++) {
-               if (op->node == grlib_apbuart_nodes[i])
+               if (op->dev.of_node == grlib_apbuart_nodes[i])
                        break;
        }
 
@@ -584,12 +584,12 @@ static struct of_device_id __initdata apbuart_match[] = {
 };
 
 static struct of_platform_driver grlib_apbuart_of_driver = {
-       .match_table = apbuart_match,
        .probe = apbuart_probe,
        .driver = {
-                  .owner = THIS_MODULE,
-                  .name = "grlib-apbuart",
-                  },
+               .owner = THIS_MODULE,
+               .name = "grlib-apbuart",
+               .of_match_table = apbuart_match,
+       },
 };
 
 
index 300cea768d746939762afee7f42a8ad2cf5d06a1..9eb62a256e9a675af529475d178c7925e6de5302 100644 (file)
@@ -1342,7 +1342,7 @@ static int __devinit cpm_uart_probe(struct of_device *ofdev,
        /* initialize the device pointer for the port */
        pinfo->port.dev = &ofdev->dev;
 
-       ret = cpm_uart_init_port(ofdev->node, pinfo);
+       ret = cpm_uart_init_port(ofdev->dev.of_node, pinfo);
        if (ret)
                return ret;
 
@@ -1372,8 +1372,11 @@ static struct of_device_id cpm_uart_match[] = {
 };
 
 static struct of_platform_driver cpm_uart_driver = {
-       .name = "cpm_uart",
-       .match_table = cpm_uart_match,
+       .driver = {
+               .name = "cpm_uart",
+               .owner = THIS_MODULE,
+               .of_match_table = cpm_uart_match,
+       },
        .probe = cpm_uart_probe,
        .remove = cpm_uart_remove,
  };
index 02469c31bf0b6939f37e96e03ac7e1af98a45a14..beb4710faeee46a89994fde4e3072848590082f0 100644 (file)
@@ -1295,14 +1295,14 @@ mpc52xx_uart_of_probe(struct of_device *op, const struct of_device_id *match)
 
        /* Check validity & presence */
        for (idx = 0; idx < MPC52xx_PSC_MAXNUM; idx++)
-               if (mpc52xx_uart_nodes[idx] == op->node)
+               if (mpc52xx_uart_nodes[idx] == op->dev.of_node)
                        break;
        if (idx >= MPC52xx_PSC_MAXNUM)
                return -EINVAL;
        pr_debug("Found %s assigned to ttyPSC%x\n",
                 mpc52xx_uart_nodes[idx]->full_name, idx);
 
-       uartclk = psc_ops->getuartclk(op->node);
+       uartclk = psc_ops->getuartclk(op->dev.of_node);
        if (uartclk == 0) {
                dev_dbg(&op->dev, "Could not find uart clock frequency!\n");
                return -EINVAL;
@@ -1322,7 +1322,7 @@ mpc52xx_uart_of_probe(struct of_device *op, const struct of_device_id *match)
        port->dev       = &op->dev;
 
        /* Search for IRQ and mapbase */
-       ret = of_address_to_resource(op->node, 0, &res);
+       ret = of_address_to_resource(op->dev.of_node, 0, &res);
        if (ret)
                return ret;
 
@@ -1332,7 +1332,7 @@ mpc52xx_uart_of_probe(struct of_device *op, const struct of_device_id *match)
                return -EINVAL;
        }
 
-       psc_ops->get_irq(port, op->node);
+       psc_ops->get_irq(port, op->dev.of_node);
        if (port->irq == NO_IRQ) {
                dev_dbg(&op->dev, "Could not get irq\n");
                return -EINVAL;
@@ -1431,15 +1431,16 @@ mpc52xx_uart_of_enumerate(void)
 MODULE_DEVICE_TABLE(of, mpc52xx_uart_of_match);
 
 static struct of_platform_driver mpc52xx_uart_of_driver = {
-       .match_table    = mpc52xx_uart_of_match,
        .probe          = mpc52xx_uart_of_probe,
        .remove         = mpc52xx_uart_of_remove,
 #ifdef CONFIG_PM
        .suspend        = mpc52xx_uart_of_suspend,
        .resume         = mpc52xx_uart_of_resume,
 #endif
-       .driver         = {
-               .name   = "mpc52xx-psc-uart",
+       .driver = {
+               .name = "mpc52xx-psc-uart",
+               .owner = THIS_MODULE,
+               .of_match_table = mpc52xx_uart_of_match,
        },
 };
 
index e1ab8ec0a4a64f86326494ee14112da85dc2d69b..3c02fa96f2825e119526752e9d8e127082cabdac 100644 (file)
@@ -344,7 +344,7 @@ int nwpserial_register_port(struct uart_port *port)
 
        mutex_lock(&nwpserial_mutex);
 
-       dn = to_of_device(port->dev)->node;
+       dn = to_of_device(port->dev)->dev.of_node;
        if (dn == NULL)
                goto out;
 
index 4abfebdb0fccdb5ca4131c2c9bbe3c3cf0288eee..a48d9080f5525f1c97ac0fff59023f85f19d1b67 100644 (file)
@@ -31,7 +31,7 @@ static int __devinit of_platform_serial_setup(struct of_device *ofdev,
                                        int type, struct uart_port *port)
 {
        struct resource resource;
-       struct device_node *np = ofdev->node;
+       struct device_node *np = ofdev->dev.of_node;
        const unsigned int *clk, *spd;
        const u32 *prop;
        int ret, prop_size;
@@ -88,7 +88,7 @@ static int __devinit of_platform_serial_probe(struct of_device *ofdev,
        int port_type;
        int ret;
 
-       if (of_find_property(ofdev->node, "used-by-rtas", NULL))
+       if (of_find_property(ofdev->dev.of_node, "used-by-rtas", NULL))
                return -EBUSY;
 
        info = kmalloc(sizeof(*info), GFP_KERNEL);
@@ -175,11 +175,13 @@ static struct of_device_id __devinitdata of_platform_serial_table[] = {
 };
 
 static struct of_platform_driver of_platform_serial_driver = {
-       .owner = THIS_MODULE,
-       .name = "of_serial",
+       .driver = {
+               .name = "of_serial",
+               .owner = THIS_MODULE,
+               .of_match_table = of_platform_serial_table,
+       },
        .probe = of_platform_serial_probe,
        .remove = of_platform_serial_remove,
-       .match_table = of_platform_serial_table,
 };
 
 static int __init of_platform_serial_init(void)
index 700e10833bf98965280491ba49771b1ad7c3d618..cabbdc7ba5838bf62e1fa799a6ed2678eb650864 100644 (file)
@@ -1611,7 +1611,7 @@ static int pmz_attach(struct macio_dev *mdev, const struct of_device_id *match)
        /* Iterate the pmz_ports array to find a matching entry
         */
        for (i = 0; i < MAX_ZS_PORTS; i++)
-               if (pmz_ports[i].node == mdev->ofdev.node) {
+               if (pmz_ports[i].node == mdev->ofdev.dev.of_node) {
                        struct uart_pmac_port *uap = &pmz_ports[i];
 
                        uap->dev = mdev;
index d14cca7fb88d2510f6c8fb2232160eff83c3efa4..890f91742962433e8b710d060ede982070e09391 100644 (file)
@@ -565,7 +565,7 @@ static int __devinit hv_probe(struct of_device *op, const struct of_device_id *m
        if (err)
                goto out_free_con_read_page;
 
-       sunserial_console_match(&sunhv_console, op->node,
+       sunserial_console_match(&sunhv_console, op->dev.of_node,
                                &sunhv_reg, port->line, false);
 
        err = uart_add_one_port(&sunhv_reg, port);
@@ -630,8 +630,11 @@ static const struct of_device_id hv_match[] = {
 MODULE_DEVICE_TABLE(of, hv_match);
 
 static struct of_platform_driver hv_driver = {
-       .name           = "hv",
-       .match_table    = hv_match,
+       .driver = {
+               .name = "hv",
+               .owner = THIS_MODULE,
+               .of_match_table = hv_match,
+       },
        .probe          = hv_probe,
        .remove         = __devexit_p(hv_remove),
 };
index d2e0321049e2e1e3952244f35300da0bc887aff2..5e81bc6b48b0738ad307b9be94149da299f6063f 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)->node);
+       sunserial_console_termios(con, to_of_device(up->port.dev)->dev.of_node);
 
        switch (con->cflag & CBAUD) {
        case B150: baud = 150; break;
@@ -1026,11 +1026,11 @@ static int __devinit sab_probe(struct of_device *op, const struct of_device_id *
        if (err)
                goto out1;
 
-       sunserial_console_match(SUNSAB_CONSOLE(), op->node,
+       sunserial_console_match(SUNSAB_CONSOLE(), op->dev.of_node,
                                &sunsab_reg, up[0].port.line,
                                false);
 
-       sunserial_console_match(SUNSAB_CONSOLE(), op->node,
+       sunserial_console_match(SUNSAB_CONSOLE(), op->dev.of_node,
                                &sunsab_reg, up[1].port.line,
                                false);
 
@@ -1093,8 +1093,11 @@ static const struct of_device_id sab_match[] = {
 MODULE_DEVICE_TABLE(of, sab_match);
 
 static struct of_platform_driver sab_driver = {
-       .name           = "sab",
-       .match_table    = sab_match,
+       .driver = {
+               .name = "sab",
+               .owner = THIS_MODULE,
+               .of_match_table = sab_match,
+       },
        .probe          = sab_probe,
        .remove         = __devexit_p(sab_remove),
 };
index 01f7731e59b89feed0745b89d5ab4282699b2164..234459c2f0122fc24e78f5b173f3fe4a3f83555d 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)->node->full_name,
+              to_of_device(up->port.dev)->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)->node);
+       sunserial_console_termios(co, to_of_device(port->dev)->dev.of_node);
 
        memset(&termios, 0, sizeof(struct ktermios));
        termios.c_cflag = co->cflag;
@@ -1409,7 +1409,7 @@ static enum su_type __devinit su_get_type(struct device_node *dp)
 static int __devinit su_probe(struct of_device *op, const struct of_device_id *match)
 {
        static int inst;
-       struct device_node *dp = op->node;
+       struct device_node *dp = op->dev.of_node;
        struct uart_sunsu_port *up;
        struct resource *rp;
        enum su_type type;
@@ -1539,8 +1539,11 @@ static const struct of_device_id su_match[] = {
 MODULE_DEVICE_TABLE(of, su_match);
 
 static struct of_platform_driver su_driver = {
-       .name           = "su",
-       .match_table    = su_match,
+       .driver = {
+               .name = "su",
+               .owner = THIS_MODULE,
+               .of_match_table = su_match,
+       },
        .probe          = su_probe,
        .remove         = __devexit_p(su_remove),
 };
index 978b3cee02d72f0f1430b952f71b4c25f4499473..f9a24f4ebb3479626073c23ffa906320dcf025a5 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)->node);
+       sunserial_console_termios(con, to_of_device(up->port.dev)->dev.of_node);
 
        /* Firmware console speed is limited to 150-->38400 baud so
         * this hackish cflag thing is OK.
@@ -1408,7 +1408,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *m
        int keyboard_mouse = 0;
        int err;
 
-       if (of_find_property(op->node, "keyboard", NULL))
+       if (of_find_property(op->dev.of_node, "keyboard", NULL))
                keyboard_mouse = 1;
 
        /* uarts must come before keyboards/mice */
@@ -1465,7 +1465,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *m
        sunzilog_init_hw(&up[1]);
 
        if (!keyboard_mouse) {
-               if (sunserial_console_match(SUNZILOG_CONSOLE(), op->node,
+               if (sunserial_console_match(SUNZILOG_CONSOLE(), op->dev.of_node,
                                            &sunzilog_reg, up[0].port.line,
                                            false))
                        up->flags |= SUNZILOG_FLAG_IS_CONS;
@@ -1475,7 +1475,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *m
                                   rp, sizeof(struct zilog_layout));
                        return err;
                }
-               if (sunserial_console_match(SUNZILOG_CONSOLE(), op->node,
+               if (sunserial_console_match(SUNZILOG_CONSOLE(), op->dev.of_node,
                                            &sunzilog_reg, up[1].port.line,
                                            false))
                        up->flags |= SUNZILOG_FLAG_IS_CONS;
@@ -1541,8 +1541,11 @@ static const struct of_device_id zs_match[] = {
 MODULE_DEVICE_TABLE(of, zs_match);
 
 static struct of_platform_driver zs_driver = {
-       .name           = "zs",
-       .match_table    = zs_match,
+       .driver = {
+               .name = "zs",
+               .owner = THIS_MODULE,
+               .of_match_table = zs_match,
+       },
        .probe          = zs_probe,
        .remove         = __devexit_p(zs_remove),
 };
index e6639a95d2768563ffc87846db8e3232933a95e1..8acccd564378aaa405f2fb04cf1958b532499993 100644 (file)
@@ -591,15 +591,15 @@ ulite_of_probe(struct of_device *op, const struct of_device_id *match)
 
        dev_dbg(&op->dev, "%s(%p, %p)\n", __func__, op, match);
 
-       rc = of_address_to_resource(op->node, 0, &res);
+       rc = of_address_to_resource(op->dev.of_node, 0, &res);
        if (rc) {
                dev_err(&op->dev, "invalid address\n");
                return rc;
        }
 
-       irq = irq_of_parse_and_map(op->node, 0);
+       irq = irq_of_parse_and_map(op->dev.of_node, 0);
 
-       id = of_get_property(op->node, "port-number", NULL);
+       id = of_get_property(op->dev.of_node, "port-number", NULL);
 
        return ulite_assign(&op->dev, id ? *id : -1, res.start, irq);
 }
@@ -610,13 +610,12 @@ static int __devexit ulite_of_remove(struct of_device *op)
 }
 
 static struct of_platform_driver ulite_of_driver = {
-       .owner = THIS_MODULE,
-       .name = "uartlite",
-       .match_table = ulite_of_match,
        .probe = ulite_of_probe,
        .remove = __devexit_p(ulite_of_remove),
        .driver = {
                .name = "uartlite",
+               .owner = THIS_MODULE,
+               .of_match_table = ulite_of_match,
        },
 };
 
index 074904912f642caa23a89af5a8b7e838501e9fd5..907b06f5c447cabb94e4a723e8c58fad37a2ebd5 100644 (file)
@@ -1197,7 +1197,7 @@ static void uart_firmware_cont(const struct firmware *fw, void *context)
 static int ucc_uart_probe(struct of_device *ofdev,
        const struct of_device_id *match)
 {
-       struct device_node *np = ofdev->node;
+       struct device_node *np = ofdev->dev.of_node;
        const unsigned int *iprop;      /* Integer OF properties */
        const char *sprop;      /* String OF properties */
        struct uart_qe_port *qe_port = NULL;
@@ -1486,9 +1486,11 @@ static struct of_device_id ucc_uart_match[] = {
 MODULE_DEVICE_TABLE(of, ucc_uart_match);
 
 static struct of_platform_driver ucc_uart_of_driver = {
-       .owner          = THIS_MODULE,
-       .name           = "ucc_uart",
-       .match_table    = ucc_uart_match,
+       .driver = {
+               .name = "ucc_uart",
+               .owner = THIS_MODULE,
+               .of_match_table    = ucc_uart_match,
+       },
        .probe          = ucc_uart_probe,
        .remove         = ucc_uart_remove,
 };
index 77d4cc88edea137251be529ded2a53dc11a8aa61..7104cb739da7eceab4af5a2bcf644c0aaa239d26 100644 (file)
@@ -472,18 +472,18 @@ static int __init mpc52xx_psc_spi_of_probe(struct of_device *op,
        s16 id = -1;
        int rc;
 
-       regaddr_p = of_get_address(op->node, 0, &size64, NULL);
+       regaddr_p = of_get_address(op->dev.of_node, 0, &size64, NULL);
        if (!regaddr_p) {
                dev_err(&op->dev, "Invalid PSC address\n");
                return -EINVAL;
        }
-       regaddr64 = of_translate_address(op->node, regaddr_p);
+       regaddr64 = of_translate_address(op->dev.of_node, regaddr_p);
 
        /* get PSC id (1..6, used by port_config) */
        if (op->dev.platform_data == NULL) {
                const u32 *psc_nump;
 
-               psc_nump = of_get_property(op->node, "cell-index", NULL);
+               psc_nump = of_get_property(op->dev.of_node, "cell-index", NULL);
                if (!psc_nump || *psc_nump > 5) {
                        dev_err(&op->dev, "Invalid cell-index property\n");
                        return -EINVAL;
@@ -492,9 +492,10 @@ static int __init mpc52xx_psc_spi_of_probe(struct of_device *op,
        }
 
        rc = mpc52xx_psc_spi_do_probe(&op->dev, (u32)regaddr64, (u32)size64,
-                                       irq_of_parse_and_map(op->node, 0), id);
+                               irq_of_parse_and_map(op->dev.of_node, 0), id);
        if (rc == 0)
-               of_register_spi_devices(dev_get_drvdata(&op->dev), op->node);
+               of_register_spi_devices(dev_get_drvdata(&op->dev),
+                                       op->dev.of_node);
 
        return rc;
 }
@@ -513,14 +514,12 @@ static const struct of_device_id mpc52xx_psc_spi_of_match[] = {
 MODULE_DEVICE_TABLE(of, mpc52xx_psc_spi_of_match);
 
 static struct of_platform_driver mpc52xx_psc_spi_of_driver = {
-       .owner = THIS_MODULE,
-       .name = "mpc52xx-psc-spi",
-       .match_table = mpc52xx_psc_spi_of_match,
        .probe = mpc52xx_psc_spi_of_probe,
        .remove = __exit_p(mpc52xx_psc_spi_of_remove),
        .driver = {
                .name = "mpc52xx-psc-spi",
                .owner = THIS_MODULE,
+               .of_match_table = mpc52xx_psc_spi_of_match,
        },
 };
 
index cd68f1ce5cc3ffa78dcd7d6ad49bc49396dee834..b1a76bff775f8f2c11e0c1d35efc41039fa95acf 100644 (file)
@@ -403,7 +403,7 @@ static int __devinit mpc52xx_spi_probe(struct of_device *op,
 
        /* MMIO registers */
        dev_dbg(&op->dev, "probing mpc5200 SPI device\n");
-       regs = of_iomap(op->node, 0);
+       regs = of_iomap(op->dev.of_node, 0);
        if (!regs)
                return -ENODEV;
 
@@ -445,11 +445,11 @@ static int __devinit mpc52xx_spi_probe(struct of_device *op,
        ms = spi_master_get_devdata(master);
        ms->master = master;
        ms->regs = regs;
-       ms->irq0 = irq_of_parse_and_map(op->node, 0);
-       ms->irq1 = irq_of_parse_and_map(op->node, 1);
+       ms->irq0 = irq_of_parse_and_map(op->dev.of_node, 0);
+       ms->irq1 = irq_of_parse_and_map(op->dev.of_node, 1);
        ms->state = mpc52xx_spi_fsmstate_idle;
-       ms->ipb_freq = mpc5xxx_get_bus_frequency(op->node);
-       ms->gpio_cs_count = of_gpio_count(op->node);
+       ms->ipb_freq = mpc5xxx_get_bus_frequency(op->dev.of_node);
+       ms->gpio_cs_count = of_gpio_count(op->dev.of_node);
        if (ms->gpio_cs_count > 0) {
                master->num_chipselect = ms->gpio_cs_count;
                ms->gpio_cs = kmalloc(ms->gpio_cs_count * sizeof(unsigned int),
@@ -460,7 +460,7 @@ static int __devinit mpc52xx_spi_probe(struct of_device *op,
                }
 
                for (i = 0; i < ms->gpio_cs_count; i++) {
-                       gpio_cs = of_get_gpio(op->node, i);
+                       gpio_cs = of_get_gpio(op->dev.of_node, i);
                        if (gpio_cs < 0) {
                                dev_err(&op->dev,
                                        "could not parse the gpio field "
@@ -512,7 +512,7 @@ static int __devinit mpc52xx_spi_probe(struct of_device *op,
        if (rc)
                goto err_register;
 
-       of_register_spi_devices(master, op->node);
+       of_register_spi_devices(master, op->dev.of_node);
        dev_info(&ms->master->dev, "registered MPC5200 SPI bus\n");
 
        return rc;
@@ -558,9 +558,11 @@ static const struct of_device_id mpc52xx_spi_match[] __devinitconst = {
 MODULE_DEVICE_TABLE(of, mpc52xx_spi_match);
 
 static struct of_platform_driver mpc52xx_spi_of_driver = {
-       .owner = THIS_MODULE,
-       .name = "mpc52xx-spi",
-       .match_table = mpc52xx_spi_match,
+       .driver = {
+               .name = "mpc52xx-spi",
+               .owner = THIS_MODULE,
+               .of_match_table = mpc52xx_spi_match,
+       },
        .probe = mpc52xx_spi_probe,
        .remove = __exit_p(mpc52xx_spi_remove),
 };
index e324627d97a2db99156cc5e848620a493e26b2cd..75b7f8c0babc7c611ae0e7fe13c8f3727f0cbd11 100644 (file)
@@ -797,7 +797,7 @@ static void mpc8xxx_spi_free_dummy_rx(void)
 static unsigned long mpc8xxx_spi_cpm_get_pram(struct mpc8xxx_spi *mspi)
 {
        struct device *dev = mspi->dev;
-       struct device_node *np = dev_archdata_get_node(&dev->archdata);
+       struct device_node *np = dev->of_node;
        const u32 *iprop;
        int size;
        unsigned long spi_base_ofs;
@@ -851,7 +851,7 @@ static unsigned long mpc8xxx_spi_cpm_get_pram(struct mpc8xxx_spi *mspi)
 static int mpc8xxx_spi_cpm_init(struct mpc8xxx_spi *mspi)
 {
        struct device *dev = mspi->dev;
-       struct device_node *np = dev_archdata_get_node(&dev->archdata);
+       struct device_node *np = dev->of_node;
        const u32 *iprop;
        int size;
        unsigned long pram_ofs;
@@ -1123,7 +1123,7 @@ static void mpc8xxx_spi_cs_control(struct spi_device *spi, bool on)
 
 static int of_mpc8xxx_spi_get_chipselects(struct device *dev)
 {
-       struct device_node *np = dev_archdata_get_node(&dev->archdata);
+       struct device_node *np = dev->of_node;
        struct fsl_spi_platform_data *pdata = dev->platform_data;
        struct mpc8xxx_spi_probe_info *pinfo = to_of_pinfo(pdata);
        unsigned int ngpios;
@@ -1224,7 +1224,7 @@ static int __devinit of_mpc8xxx_spi_probe(struct of_device *ofdev,
                                          const struct of_device_id *ofid)
 {
        struct device *dev = &ofdev->dev;
-       struct device_node *np = ofdev->node;
+       struct device_node *np = ofdev->dev.of_node;
        struct mpc8xxx_spi_probe_info *pinfo;
        struct fsl_spi_platform_data *pdata;
        struct spi_master *master;
@@ -1312,8 +1312,11 @@ static const struct of_device_id of_mpc8xxx_spi_match[] = {
 MODULE_DEVICE_TABLE(of, of_mpc8xxx_spi_match);
 
 static struct of_platform_driver of_mpc8xxx_spi_driver = {
-       .name           = "mpc8xxx_spi",
-       .match_table    = of_mpc8xxx_spi_match,
+       .driver = {
+               .name = "mpc8xxx_spi",
+               .owner = THIS_MODULE,
+               .of_match_table = of_mpc8xxx_spi_match,
+       },
        .probe          = of_mpc8xxx_spi_probe,
        .remove         = __devexit_p(of_mpc8xxx_spi_remove),
 };
index 7cb5ff37f6e2662254eb66a321b1be2acb2c604b..19c0b3b34fce0160d7cb4d0b0c16f14d8143671d 100644 (file)
@@ -587,12 +587,12 @@ static const struct of_device_id spi_ppc4xx_of_match[] = {
 MODULE_DEVICE_TABLE(of, spi_ppc4xx_of_match);
 
 static struct of_platform_driver spi_ppc4xx_of_driver = {
-       .match_table = spi_ppc4xx_of_match,
        .probe = spi_ppc4xx_of_probe,
        .remove = __exit_p(spi_ppc4xx_of_remove),
        .driver = {
                .name = DRIVER_NAME,
                .owner = THIS_MODULE,
+               .of_match_table = spi_ppc4xx_of_match,
        },
 };
 
index 748d33a76d290286c6435ff3d11965c2e023525d..55c58012a028392e0c2b6cfbcdb06e1f3ccb86d1 100644 (file)
@@ -109,12 +109,12 @@ static const struct of_device_id xilinx_spi_of_match[] = {
 MODULE_DEVICE_TABLE(of, xilinx_spi_of_match);
 
 static struct of_platform_driver xilinx_spi_of_driver = {
-       .match_table = xilinx_spi_of_match,
        .probe = xilinx_spi_of_probe,
        .remove = __exit_p(xilinx_spi_of_remove),
        .driver = {
                .name = "xilinx-xps-spi",
                .owner = THIS_MODULE,
+               .of_match_table = xilinx_spi_of_match,
        },
 };
 
index 3537d51073b2e9216e9dd02891894f46e9f0fc63..2928523268b53ac61470959ac6d6cd41519633d1 100644 (file)
@@ -2768,8 +2768,11 @@ static const struct of_device_id qe_udc_match[] __devinitconst = {
 MODULE_DEVICE_TABLE(of, qe_udc_match);
 
 static struct of_platform_driver udc_driver = {
-       .name           = (char *)driver_name,
-       .match_table    = qe_udc_match,
+       .driver = {
+               .name = (char *)driver_name,
+               .owner = THIS_MODULE,
+               .of_match_table = qe_udc_match,
+       },
        .probe          = qe_udc_probe,
        .remove         = __devexit_p(qe_udc_remove),
 #ifdef CONFIG_PM
index 8df33b8a634c4c944bf1c385cbba056f393d09db..5aec92866ab3e1398ac4450ec62f9d9dfe9c195c 100644 (file)
@@ -108,7 +108,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)
 {
-       struct device_node *dn = op->node;
+       struct device_node *dn = op->dev.of_node;
        struct usb_hcd *hcd;
        struct ehci_hcd *ehci = NULL;
        struct resource res;
@@ -274,13 +274,12 @@ MODULE_DEVICE_TABLE(of, ehci_hcd_ppc_of_match);
 
 
 static struct of_platform_driver ehci_hcd_ppc_of_driver = {
-       .name           = "ppc-of-ehci",
-       .match_table    = ehci_hcd_ppc_of_match,
        .probe          = ehci_hcd_ppc_of_probe,
        .remove         = ehci_hcd_ppc_of_remove,
        .shutdown       = ehci_hcd_ppc_of_shutdown,
-       .driver         = {
-               .name   = "ppc-of-ehci",
-               .owner  = THIS_MODULE,
+       .driver = {
+               .name = "ppc-of-ehci",
+               .owner = THIS_MODULE,
+               .of_match_table = ehci_hcd_ppc_of_match,
        },
 };
index f603bb2c0a8eedba86bbbad4370e154e1b9c7b0c..013972bbde57d21bd16c737c1a1e455a1f90876a 100644 (file)
@@ -288,13 +288,12 @@ static const struct of_device_id ehci_hcd_xilinx_of_match[] = {
 MODULE_DEVICE_TABLE(of, ehci_hcd_xilinx_of_match);
 
 static struct of_platform_driver ehci_hcd_xilinx_of_driver = {
-       .name           = "xilinx-of-ehci",
-       .match_table    = ehci_hcd_xilinx_of_match,
        .probe          = ehci_hcd_xilinx_of_probe,
        .remove         = ehci_hcd_xilinx_of_remove,
        .shutdown       = ehci_hcd_xilinx_of_shutdown,
-       .driver         = {
-               .name   = "xilinx-of-ehci",
-               .owner  = THIS_MODULE,
+       .driver = {
+               .name = "xilinx-of-ehci",
+               .owner = THIS_MODULE,
+               .of_match_table = ehci_hcd_xilinx_of_match,
        },
 };
index 90453379a43469237c88ecde2ec2b3a0ba5ed94e..c7c8392a88b9ed02c9dc1ebbd61a190c2cac1ccb 100644 (file)
@@ -565,7 +565,7 @@ static int __devinit of_fhci_probe(struct of_device *ofdev,
                                   const struct of_device_id *ofid)
 {
        struct device *dev = &ofdev->dev;
-       struct device_node *node = ofdev->node;
+       struct device_node *node = dev->of_node;
        struct usb_hcd *hcd;
        struct fhci_hcd *fhci;
        struct resource usb_regs;
@@ -670,7 +670,7 @@ static int __devinit of_fhci_probe(struct of_device *ofdev,
        }
 
        for (j = 0; j < NUM_PINS; j++) {
-               fhci->pins[j] = qe_pin_request(ofdev->node, j);
+               fhci->pins[j] = qe_pin_request(node, j);
                if (IS_ERR(fhci->pins[j])) {
                        ret = PTR_ERR(fhci->pins[j]);
                        dev_err(dev, "can't get pin %d: %d\n", j, ret);
@@ -813,8 +813,11 @@ static const struct of_device_id of_fhci_match[] = {
 MODULE_DEVICE_TABLE(of, of_fhci_match);
 
 static struct of_platform_driver of_fhci_driver = {
-       .name           = "fsl,usb-fhci",
-       .match_table    = of_fhci_match,
+       .driver = {
+               .name = "fsl,usb-fhci",
+               .owner = THIS_MODULE,
+               .of_match_table = of_fhci_match,
+       },
        .probe          = of_fhci_probe,
        .remove         = __devexit_p(of_fhci_remove),
 };
index 8f0259eaa2c73094bbfcfbcbd6905882d40bd0fa..ec85d0c3cc3e79de60700bd480f41bfdc1448f6e 100644 (file)
@@ -31,7 +31,7 @@ static int of_isp1760_probe(struct of_device *dev,
                const struct of_device_id *match)
 {
        struct usb_hcd *hcd;
-       struct device_node *dp = dev->node;
+       struct device_node *dp = dev->dev.of_node;
        struct resource *res;
        struct resource memory;
        struct of_irq oirq;
@@ -120,8 +120,11 @@ static const struct of_device_id of_isp1760_match[] = {
 MODULE_DEVICE_TABLE(of, of_isp1760_match);
 
 static struct of_platform_driver isp1760_of_driver = {
-       .name           = "nxp-isp1760",
-       .match_table    = of_isp1760_match,
+       .driver = {
+               .name = "nxp-isp1760",
+               .owner = THIS_MODULE,
+               .of_match_table = of_isp1760_match,
+       },
        .probe          = of_isp1760_probe,
        .remove         = of_isp1760_remove,
 };
index 103263c230cfd669ff4059909f03a7cae4e3c331..df165917412a85d821084dcd37c991522254e4b2 100644 (file)
@@ -83,7 +83,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)
 {
-       struct device_node *dn = op->node;
+       struct device_node *dn = op->dev.of_node;
        struct usb_hcd *hcd;
        struct ohci_hcd *ohci;
        struct resource res;
@@ -244,18 +244,13 @@ MODULE_DEVICE_TABLE(of, ohci_hcd_ppc_of_match);
 
 
 static struct of_platform_driver ohci_hcd_ppc_of_driver = {
-       .name           = "ppc-of-ohci",
-       .match_table    = ohci_hcd_ppc_of_match,
        .probe          = ohci_hcd_ppc_of_probe,
        .remove         = ohci_hcd_ppc_of_remove,
        .shutdown       = ohci_hcd_ppc_of_shutdown,
-#ifdef CONFIG_PM
-       /*.suspend      = ohci_hcd_ppc_soc_drv_suspend,*/
-       /*.resume       = ohci_hcd_ppc_soc_drv_resume,*/
-#endif
-       .driver         = {
-               .name   = "ppc-of-ohci",
-               .owner  = THIS_MODULE,
+       .driver = {
+               .name = "ppc-of-ohci",
+               .owner = THIS_MODULE,
+               .of_match_table = ohci_hcd_ppc_of_match,
        },
 };
 
index 43320925c4cea48b980a905fa0d5766cadcad335..2c371c07f0daaff562b844184bfb742284b9cc53 100644 (file)
@@ -376,8 +376,11 @@ static const struct of_device_id bw2_match[] = {
 MODULE_DEVICE_TABLE(of, bw2_match);
 
 static struct of_platform_driver bw2_driver = {
-       .name           = "bw2",
-       .match_table    = bw2_match,
+       .driver = {
+               .name = "bw2",
+               .owner = THIS_MODULE,
+               .of_match_table = bw2_match,
+       },
        .probe          = bw2_probe,
        .remove         = __devexit_p(bw2_remove),
 };
index 77a040af20a7860626b9bae5696b88fce42a0c20..d12e05b6e63f96ce0cd36ba1ddb810167953d280 100644 (file)
@@ -596,8 +596,11 @@ static const struct of_device_id cg14_match[] = {
 MODULE_DEVICE_TABLE(of, cg14_match);
 
 static struct of_platform_driver cg14_driver = {
-       .name           = "cg14",
-       .match_table    = cg14_match,
+       .driver = {
+               .name = "cg14",
+               .owner = THIS_MODULE,
+               .of_match_table = cg14_match,
+       },
        .probe          = cg14_probe,
        .remove         = __devexit_p(cg14_remove),
 };
index 30eedf79322c4dcff534da06fe7938a5753d112c..b98f93f7f6638f0a02a39250aaeaca54b595bbb3 100644 (file)
@@ -463,8 +463,11 @@ static const struct of_device_id cg3_match[] = {
 MODULE_DEVICE_TABLE(of, cg3_match);
 
 static struct of_platform_driver cg3_driver = {
-       .name           = "cg3",
-       .match_table    = cg3_match,
+       .driver = {
+               .name = "cg3",
+               .owner = THIS_MODULE,
+               .of_match_table = cg3_match,
+       },
        .probe          = cg3_probe,
        .remove         = __devexit_p(cg3_remove),
 };
index 6d0fcb43696ec10bed2b44a020ee46e787b238e4..480d761a27a839b1e265eefe8204a17fb1f56504 100644 (file)
@@ -740,7 +740,7 @@ static void cg6_unmap_regs(struct of_device *op, struct fb_info *info,
 static int __devinit cg6_probe(struct of_device *op,
                                const struct of_device_id *match)
 {
-       struct device_node *dp = op->node;
+       struct device_node *dp = op->dev.of_node;
        struct fb_info *info;
        struct cg6_par *par;
        int linebytes, err;
@@ -856,8 +856,11 @@ static const struct of_device_id cg6_match[] = {
 MODULE_DEVICE_TABLE(of, cg6_match);
 
 static struct of_platform_driver cg6_driver = {
-       .name           = "cg6",
-       .match_table    = cg6_match,
+       .driver = {
+               .name = "cg6",
+               .owner = THIS_MODULE,
+               .of_match_table = cg6_match,
+       },
        .probe          = cg6_probe,
        .remove         = __devexit_p(cg6_remove),
 };
index a42fabab69dfe5d43b96cd63902625b219845f46..95c0227f47fcfd7fd30ea784b4202af1dace340a 100644 (file)
@@ -896,7 +896,7 @@ static void ffb_init_fix(struct fb_info *info)
 static int __devinit ffb_probe(struct of_device *op,
                               const struct of_device_id *match)
 {
-       struct device_node *dp = op->node;
+       struct device_node *dp = op->dev.of_node;
        struct ffb_fbc __iomem *fbc;
        struct ffb_dac __iomem *dac;
        struct fb_info *info;
@@ -1053,8 +1053,11 @@ static const struct of_device_id ffb_match[] = {
 MODULE_DEVICE_TABLE(of, ffb_match);
 
 static struct of_platform_driver ffb_driver = {
-       .name           = "ffb",
-       .match_table    = ffb_match,
+       .driver = {
+               .name = "ffb",
+               .owner = THIS_MODULE,
+               .of_match_table = ffb_match,
+       },
        .probe          = ffb_probe,
        .remove         = __devexit_p(ffb_remove),
 };
index 994358a4f30298d9684148db609a8c15723de82c..27455ce298b724bbecb03c1598d5b296309ce655 100644 (file)
@@ -1421,7 +1421,7 @@ static ssize_t show_monitor(struct device *device,
 static int __devinit fsl_diu_probe(struct of_device *ofdev,
        const struct of_device_id *match)
 {
-       struct device_node *np = ofdev->node;
+       struct device_node *np = ofdev->dev.of_node;
        struct mfb_info *mfbi;
        phys_addr_t dummy_ad_addr;
        int ret, i, error = 0;
@@ -1647,9 +1647,11 @@ static struct of_device_id fsl_diu_match[] = {
 MODULE_DEVICE_TABLE(of, fsl_diu_match);
 
 static struct of_platform_driver fsl_diu_driver = {
-       .owner          = THIS_MODULE,
-       .name           = "fsl_diu",
-       .match_table    = fsl_diu_match,
+       .driver = {
+               .name = "fsl_diu",
+               .owner = THIS_MODULE,
+               .of_match_table = fsl_diu_match,
+       },
        .probe          = fsl_diu_probe,
        .remove         = fsl_diu_remove,
        .suspend        = fsl_diu_suspend,
index 1db55f128490213ebfc35a6ad6ed87176af670fb..3d7895316eaf37e79bb56f2413d748fcbdfca131 100644 (file)
@@ -663,8 +663,11 @@ static const struct of_device_id leo_match[] = {
 MODULE_DEVICE_TABLE(of, leo_match);
 
 static struct of_platform_driver leo_driver = {
-       .name           = "leo",
-       .match_table    = leo_match,
+       .driver = {
+               .name = "leo",
+               .owner = THIS_MODULE,
+               .of_match_table = leo_match,
+       },
        .probe          = leo_probe,
        .remove         = __devexit_p(leo_remove),
 };
index 8280a58a0e557c4368f5de03ce129d24f38aa649..0540de4f5cb48f062bedb6d9874964ab1423d62b 100644 (file)
@@ -718,9 +718,11 @@ static struct of_device_id __devinitdata of_platform_mb862xx_tbl[] = {
 };
 
 static struct of_platform_driver of_platform_mb862xxfb_driver = {
-       .owner          = THIS_MODULE,
-       .name           = DRV_NAME,
-       .match_table    = of_platform_mb862xx_tbl,
+       .driver = {
+               .name = DRV_NAME,
+               .owner = THIS_MODULE,
+               .of_match_table = of_platform_mb862xx_tbl,
+       },
        .probe          = of_platform_mb862xx_probe,
        .remove         = __devexit_p(of_platform_mb862xx_remove),
 };
index 81440f2b90919c2e9904343c24528fe989472270..c85dd408a9b87369fffdce371fad0754f1100810 100644 (file)
@@ -353,8 +353,11 @@ static const struct of_device_id p9100_match[] = {
 MODULE_DEVICE_TABLE(of, p9100_match);
 
 static struct of_platform_driver p9100_driver = {
-       .name           = "p9100",
-       .match_table    = p9100_match,
+       .driver = {
+               .name = "p9100",
+               .owner = THIS_MODULE,
+               .of_match_table = p9100_match,
+       },
        .probe          = p9100_probe,
        .remove         = __devexit_p(p9100_remove),
 };
index 8a204e7a5b5b655a95897ba533c12b032434f16b..72a1f4c047326c1d69634110fa68ec3061c20b48 100644 (file)
@@ -536,7 +536,7 @@ static int __init platinumfb_setup(char *options)
 static int __devinit platinumfb_probe(struct of_device* odev,
                                      const struct of_device_id *match)
 {
-       struct device_node      *dp = odev->node;
+       struct device_node      *dp = odev->dev.of_node;
        struct fb_info          *info;
        struct fb_info_platinum *pinfo;
        volatile __u8           *fbuffer;
@@ -679,8 +679,11 @@ static struct of_device_id platinumfb_match[] =
 
 static struct of_platform_driver platinum_driver = 
 {
-       .name           = "platinumfb",
-       .match_table    = platinumfb_match,
+       .driver = {
+               .name = "platinumfb",
+               .owner = THIS_MODULE,
+               .of_match_table = platinumfb_match,
+       },
        .probe          = platinumfb_probe,
        .remove         = platinumfb_remove,
 };
index 23e69e834a18de9b3e97056f5b6aebc85bea008f..489b44e8db8153dac7a06bda8abae694c878d7e0 100644 (file)
@@ -114,7 +114,7 @@ static int __devinit gfb_set_fbinfo(struct gfb_info *gp)
 static int __devinit gfb_probe(struct of_device *op,
                               const struct of_device_id *match)
 {
-       struct device_node *dp = op->node;
+       struct device_node *dp = op->dev.of_node;
        struct fb_info *info;
        struct gfb_info *gp;
        int err;
@@ -199,10 +199,13 @@ static const struct of_device_id gfb_match[] = {
 MODULE_DEVICE_TABLE(of, ffb_match);
 
 static struct of_platform_driver gfb_driver = {
-       .name           = "gfb",
-       .match_table    = gfb_match,
        .probe          = gfb_probe,
        .remove         = __devexit_p(gfb_remove),
+       .driver = {
+               .name           = "gfb",
+               .owner          = THIS_MODULE,
+               .of_match_table = gfb_match,
+       },
 };
 
 static int __init gfb_init(void)
index c0c2b18fcdcff6229bdd7afaffa2cbd36c30a891..ef7a7bd8b503492fec8aa1f56ab678adfe2f06f0 100644 (file)
@@ -512,8 +512,11 @@ static const struct of_device_id tcx_match[] = {
 MODULE_DEVICE_TABLE(of, tcx_match);
 
 static struct of_platform_driver tcx_driver = {
-       .name           = "tcx",
-       .match_table    = tcx_match,
+       .driver = {
+               .name = "tcx",
+               .owner = THIS_MODULE,
+               .of_match_table = tcx_match,
+       },
        .probe          = tcx_probe,
        .remove         = __devexit_p(tcx_remove),
 };
index 3fcb83f03881e58f94c27004e05ebdd82eca8e93..574dc54e12d43e97038eacae80292dc75d53419b 100644 (file)
@@ -423,7 +423,7 @@ xilinxfb_of_probe(struct of_device *op, const struct of_device_id *match)
         * To check whether the core is connected directly to DCR or PLB
         * interface and initialize the tft_access accordingly.
         */
-       p = (u32 *)of_get_property(op->node, "xlnx,dcr-splb-slave-if", NULL);
+       p = (u32 *)of_get_property(op->dev.of_node, "xlnx,dcr-splb-slave-if", NULL);
        tft_access = p ? *p : 0;
 
        /*
@@ -432,41 +432,41 @@ xilinxfb_of_probe(struct of_device *op, const struct of_device_id *match)
         */
        if (tft_access) {
                drvdata->flags |= PLB_ACCESS_FLAG;
-               rc = of_address_to_resource(op->node, 0, &res);
+               rc = of_address_to_resource(op->dev.of_node, 0, &res);
                if (rc) {
                        dev_err(&op->dev, "invalid address\n");
                        goto err;
                }
        } else {
                res.start = 0;
-               start = dcr_resource_start(op->node, 0);
-               drvdata->dcr_len = dcr_resource_len(op->node, 0);
-               drvdata->dcr_host = dcr_map(op->node, start, drvdata->dcr_len);
+               start = dcr_resource_start(op->dev.of_node, 0);
+               drvdata->dcr_len = dcr_resource_len(op->dev.of_node, 0);
+               drvdata->dcr_host = dcr_map(op->dev.of_node, start, drvdata->dcr_len);
                if (!DCR_MAP_OK(drvdata->dcr_host)) {
                        dev_err(&op->dev, "invalid DCR address\n");
                        goto err;
                }
        }
 
-       prop = of_get_property(op->node, "phys-size", &size);
+       prop = of_get_property(op->dev.of_node, "phys-size", &size);
        if ((prop) && (size >= sizeof(u32)*2)) {
                pdata.screen_width_mm = prop[0];
                pdata.screen_height_mm = prop[1];
        }
 
-       prop = of_get_property(op->node, "resolution", &size);
+       prop = of_get_property(op->dev.of_node, "resolution", &size);
        if ((prop) && (size >= sizeof(u32)*2)) {
                pdata.xres = prop[0];
                pdata.yres = prop[1];
        }
 
-       prop = of_get_property(op->node, "virtual-resolution", &size);
+       prop = of_get_property(op->dev.of_node, "virtual-resolution", &size);
        if ((prop) && (size >= sizeof(u32)*2)) {
                pdata.xvirt = prop[0];
                pdata.yvirt = prop[1];
        }
 
-       if (of_find_property(op->node, "rotate-display", NULL))
+       if (of_find_property(op->dev.of_node, "rotate-display", NULL))
                pdata.rotate_screen = 1;
 
        dev_set_drvdata(&op->dev, drvdata);
@@ -492,13 +492,12 @@ static struct of_device_id xilinxfb_of_match[] __devinitdata = {
 MODULE_DEVICE_TABLE(of, xilinxfb_of_match);
 
 static struct of_platform_driver xilinxfb_of_driver = {
-       .owner = THIS_MODULE,
-       .name = DRIVER_NAME,
-       .match_table = xilinxfb_of_match,
        .probe = xilinxfb_of_probe,
        .remove = __devexit_p(xilinxfb_of_remove),
        .driver = {
                .name = DRIVER_NAME,
+               .owner = THIS_MODULE,
+               .of_match_table = xilinxfb_of_match,
        },
 };
 
index ba2efce4b40ef795ee7f7fd6e3ca469d3f0f5a43..d62b9ce8f773cb0d402bb43794b121bddae02209 100644 (file)
@@ -577,7 +577,7 @@ static int __devinit cpwd_probe(struct of_device *op,
         * interrupt_mask register cannot be written, so no timer
         * interrupts can be masked within the PLD.
         */
-       str_prop = of_get_property(op->node, "model", NULL);
+       str_prop = of_get_property(op->dev.of_node, "model", NULL);
        p->broken = (str_prop && !strcmp(str_prop, WD_BADMODEL));
 
        if (!p->enabled)
@@ -677,8 +677,11 @@ static const struct of_device_id cpwd_match[] = {
 MODULE_DEVICE_TABLE(of, cpwd_match);
 
 static struct of_platform_driver cpwd_driver = {
-       .name           = DRIVER_NAME,
-       .match_table    = cpwd_match,
+       .driver = {
+               .name = DRIVER_NAME,
+               .owner = THIS_MODULE,
+               .of_match_table = cpwd_match,
+       },
        .probe          = cpwd_probe,
        .remove         = __devexit_p(cpwd_remove),
 };
index abdbad034a6c8aec9f7ecf3fa0641db4bf66690f..ca0f4c6cf5ab98217f1b444a94611b0098781041 100644 (file)
@@ -303,9 +303,11 @@ static const struct of_device_id gef_wdt_ids[] = {
 };
 
 static struct of_platform_driver gef_wdt_driver = {
-       .owner          = THIS_MODULE,
-       .name           = "gef_wdt",
-       .match_table    = gef_wdt_ids,
+       .driver = {
+               .name = "gef_wdt",
+               .owner = THIS_MODULE,
+               .of_match_table = gef_wdt_ids,
+       },
        .probe          = gef_wdt_probe,
 };
 
index 4e3941c5e29330e1685f63105e962ab1745fc33e..7b55974191dd7ea5b160f1973e10509f253862aa 100644 (file)
@@ -273,12 +273,12 @@ static const struct of_device_id mpc8xxx_wdt_match[] = {
 MODULE_DEVICE_TABLE(of, mpc8xxx_wdt_match);
 
 static struct of_platform_driver mpc8xxx_wdt_driver = {
-       .match_table    = mpc8xxx_wdt_match,
        .probe          = mpc8xxx_wdt_probe,
        .remove         = __devexit_p(mpc8xxx_wdt_remove),
-       .driver         = {
-               .name   = "mpc8xxx_wdt",
-               .owner  = THIS_MODULE,
+       .driver = {
+               .name = "mpc8xxx_wdt",
+               .owner = THIS_MODULE,
+               .of_match_table = mpc8xxx_wdt_match,
        },
 };
 
index ea7f803f624862f973a024737d9e49ef039202a0..5dceeddc88596c833add1e6abc2ec5db65048279 100644 (file)
@@ -239,8 +239,11 @@ static const struct of_device_id riowd_match[] = {
 MODULE_DEVICE_TABLE(of, riowd_match);
 
 static struct of_platform_driver riowd_driver = {
-       .name           = DRIVER_NAME,
-       .match_table    = riowd_match,
+       .driver = {
+               .name = DRIVER_NAME,
+               .owner = THIS_MODULE,
+               .of_match_table = riowd_match,
+       },
        .probe          = riowd_probe,
        .remove         = __devexit_p(riowd_remove),
 };
index 7bb9f426f3e67c83985c322c2dc26ec8f5edd50f..0713e10571dd61eb0abf1388e0c415ba6d143b6d 100644 (file)
@@ -33,6 +33,7 @@ struct class;
 struct class_private;
 struct bus_type;
 struct bus_type_private;
+struct device_node;
 
 struct bus_attribute {
        struct attribute        attr;
@@ -127,6 +128,10 @@ struct device_driver {
 
        bool suppress_bind_attrs;       /* disables bind/unbind via sysfs */
 
+#if defined(CONFIG_OF)
+       const struct of_device_id       *of_match_table;
+#endif
+
        int (*probe) (struct device *dev);
        int (*remove) (struct device *dev);
        void (*shutdown) (struct device *dev);
@@ -435,6 +440,9 @@ struct device {
                                             override */
        /* arch specific additions */
        struct dev_archdata     archdata;
+#ifdef CONFIG_OF
+       struct device_node      *of_node;
+#endif
 
        dev_t                   devt;   /* dev_t, creates the sysfs "dev" */
 
index 6ed1d59bfb1e642789e25d47af65fb36c6921f2e..21067b4185366b419a6c7af504ff1a711642457b 100644 (file)
@@ -34,6 +34,7 @@
 #include <linux/device.h>      /* for struct device */
 #include <linux/sched.h>       /* for completion */
 #include <linux/mutex.h>
+#include <linux/of.h>          /* for struct device_node */
 
 extern struct bus_type i2c_bus_type;
 
@@ -251,6 +252,9 @@ struct i2c_board_info {
        unsigned short  addr;
        void            *platform_data;
        struct dev_archdata     *archdata;
+#ifdef CONFIG_OF
+       struct device_node *of_node;
+#endif
        int             irq;
 };
 
index d3a74e00a3e13455b7ad7f6eec81d58727e40386..11651facc5f179237500ea4d43e3bcc76bfe270d 100644 (file)
@@ -1,6 +1,7 @@
 #ifndef _LINUX_OF_DEVICE_H
 #define _LINUX_OF_DEVICE_H
 
+#ifdef CONFIG_OF_DEVICE
 #include <linux/device.h>
 #include <linux/of.h>
 #include <linux/mod_devicetable.h>
@@ -10,7 +11,7 @@
 #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 of_device *dev);
+       const struct of_device_id *matches, const struct device *dev);
 
 extern struct of_device *of_dev_get(struct of_device *dev);
 extern void of_dev_put(struct of_device *dev);
@@ -26,5 +27,6 @@ static inline void of_device_free(struct of_device *dev)
 
 extern ssize_t of_device_get_modalias(struct of_device *ofdev,
                                        char *str, ssize_t len);
+#endif /* CONFIG_OF_DEVICE */
 
 #endif /* _LINUX_OF_DEVICE_H */
index a1ca92ccb0ff65dc06241ab2ac7bb04bf44c7f92..71e1a916d3fa9d6fbd6876a7aacc695711123a40 100644 (file)
@@ -57,6 +57,7 @@ struct boot_param_header {
        __be32  dt_struct_size;         /* size of the DT structure block */
 };
 
+#if defined(CONFIG_OF_FLATTREE)
 /* TBD: Temporary export of fdt globals - remove when code fully merged */
 extern int __initdata dt_root_addr_cells;
 extern int __initdata dt_root_size_cells;
@@ -98,6 +99,9 @@ extern int early_init_dt_scan_root(unsigned long node, const char *uname,
 /* Other Prototypes */
 extern void unflatten_device_tree(void);
 extern void early_init_devtree(void *);
+#else /* CONFIG_OF_FLATTREE */
+static inline void unflatten_device_tree(void) {}
+#endif /* CONFIG_OF_FLATTREE */
 
 #endif /* __ASSEMBLY__ */
 #endif /* _LINUX_OF_FDT_H */
index 908406651330e700bbea64084599d023fa77cad7..1643d3761eb4134897b956bed7844b05814fd662 100644 (file)
@@ -11,6 +11,7 @@
  *
  */
 
+#ifdef CONFIG_OF_DEVICE
 #include <linux/module.h>
 #include <linux/device.h>
 #include <linux/mod_devicetable.h>
@@ -30,10 +31,6 @@ extern struct bus_type of_platform_bus_type;
  */
 struct of_platform_driver
 {
-       const char              *name;
-       const struct of_device_id       *match_table;
-       struct module           *owner;
-
        int     (*probe)(struct of_device* dev,
                         const struct of_device_id *match);
        int     (*remove)(struct of_device* dev);
@@ -66,5 +63,6 @@ static inline void of_unregister_platform_driver(struct of_platform_driver *drv)
 extern struct of_device *of_find_device_by_node(struct device_node *np);
 
 extern int of_bus_type_init(struct bus_type *bus, const char *name);
+#endif /* CONFIG_OF_DEVICE */
 
 #endif /* _LINUX_OF_PLATFORM_H */
index 1cd9b301df0357dd7802626c93731d22c5efc73b..3fd1a7e24928fdbc08e45f727ed34b3625d7effc 100644 (file)
@@ -992,7 +992,7 @@ static int aoa_fabric_layout_probe(struct soundbus_dev *sdev)
                return -ENODEV;
 
        /* by breaking out we keep a reference */
-       while ((sound = of_get_next_child(sdev->ofdev.node, sound))) {
+       while ((sound = of_get_next_child(sdev->ofdev.dev.of_node, sound))) {
                if (sound->type && strcasecmp(sound->type, "soundchip") == 0)
                        break;
        }
index fa8ab2815a982676d1f3a0ef3c47ebcec8f3ee39..99ca7120e269fc677eddd608150ce86769bfe78c 100644 (file)
@@ -74,11 +74,11 @@ static int soundbus_uevent(struct device *dev, struct kobj_uevent_env *env)
        of = &soundbus_dev->ofdev;
 
        /* stuff we want to pass to /sbin/hotplug */
-       retval = add_uevent_var(env, "OF_NAME=%s", of->node->name);
+       retval = add_uevent_var(env, "OF_NAME=%s", of->dev.of_node->name);
        if (retval)
                return retval;
 
-       retval = add_uevent_var(env, "OF_TYPE=%s", of->node->type);
+       retval = add_uevent_var(env, "OF_TYPE=%s", of->dev.of_node->type);
        if (retval)
                return retval;
 
@@ -86,7 +86,7 @@ static int soundbus_uevent(struct device *dev, struct kobj_uevent_env *env)
         * it's not really legal to split it out with commas. We split it
         * up using a number of environment variables instead. */
 
-       compat = of_get_property(of->node, "compatible", &cplen);
+       compat = of_get_property(of->dev.of_node, "compatible", &cplen);
        while (compat && cplen > 0) {
                int tmp = env->buflen;
                retval = add_uevent_var(env, "OF_COMPATIBLE_%d=%s", seen, compat);
@@ -169,7 +169,7 @@ int soundbus_add_one(struct soundbus_dev *dev)
 
        /* sanity checks */
        if (!dev->attach_codec ||
-           !dev->ofdev.node ||
+           !dev->ofdev.dev.of_node ||
            dev->pcmname ||
            dev->pcmid != -1) {
                printk(KERN_ERR "soundbus: adding device failed sanity check!\n");
index 47f854c2001facf5f19f2df68686007972bb7d3f..4dc9b49c02cf78a983e9a38ec02ee24adac399bd 100644 (file)
@@ -42,7 +42,7 @@ int i2sbus_control_add_dev(struct i2sbus_control *c,
 {
        struct device_node *np;
 
-       np = i2sdev->sound.ofdev.node;
+       np = i2sdev->sound.ofdev.dev.of_node;
        i2sdev->enable = pmf_find_function(np, "enable");
        i2sdev->cell_enable = pmf_find_function(np, "cell-enable");
        i2sdev->clock_enable = pmf_find_function(np, "clock-enable");
index 9d6f3b176ed1ac73f20c4e8427403a9970ca0156..67893372173581601fbcd5c71ca9c30cab0b5a7a 100644 (file)
@@ -221,9 +221,9 @@ static int i2sbus_add_dev(struct macio_dev *macio,
 
        mutex_init(&dev->lock);
        spin_lock_init(&dev->low_lock);
-       dev->sound.ofdev.node = np;
-       dev->sound.ofdev.dma_mask = macio->ofdev.dma_mask;
-       dev->sound.ofdev.dev.dma_mask = &dev->sound.ofdev.dma_mask;
+       dev->sound.ofdev.archdata.dma_mask = macio->ofdev.archdata.dma_mask;
+       dev->sound.ofdev.dev.of_node = np;
+       dev->sound.ofdev.dev.dma_mask = &dev->sound.ofdev.archdata.dma_mask;
        dev->sound.ofdev.dev.parent = &macio->ofdev.dev;
        dev->sound.ofdev.dev.release = i2sbus_release_dev;
        dev->sound.attach_codec = i2sbus_attach_codec;
@@ -346,7 +346,7 @@ static int i2sbus_probe(struct macio_dev* dev, const struct of_device_id *match)
                return -ENODEV;
        }
 
-       while ((np = of_get_next_child(dev->ofdev.node, np))) {
+       while ((np = of_get_next_child(dev->ofdev.dev.of_node, np))) {
                if (of_device_is_compatible(np, "i2sbus") ||
                    of_device_is_compatible(np, "i2s-modem")) {
                        got += i2sbus_add_dev(dev, control, np);
index f580942b5c09b0f2392fd11860c0cb14e76cf99b..6496e754f00a2b1bb470f9942cc7d5f1f569b3c9 100644 (file)
@@ -9,7 +9,7 @@ field##_show (struct device *dev, struct device_attribute *attr,        \
               char *buf)                                               \
 {                                                                      \
        struct soundbus_dev *mdev = to_soundbus_device (dev);           \
-       return sprintf (buf, format_string, mdev->ofdev.node->field);   \
+       return sprintf (buf, format_string, mdev->ofdev.dev.of_node->field); \
 }
 
 static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
@@ -25,7 +25,7 @@ static ssize_t modalias_show(struct device *dev, struct device_attribute *attr,
                length = strlen(buf);
        } else {
                length = sprintf(buf, "of:N%sT%s\n",
-                                of->node->name, of->node->type);
+                                of->dev.of_node->name, of->dev.of_node->type);
        }
 
        return length;
index d639e55c51241dad15eb984815c69f9461a26797..1d4e7164e80af1c4dfd98c057e42b88f52e448f1 100644 (file)
@@ -380,8 +380,8 @@ int mpc5200_audio_dma_create(struct of_device *op)
        int ret;
 
        /* Fetch the registers and IRQ of the PSC */
-       irq = irq_of_parse_and_map(op->node, 0);
-       if (of_address_to_resource(op->node, 0, &res)) {
+       irq = irq_of_parse_and_map(op->dev.of_node, 0);
+       if (of_address_to_resource(op->dev.of_node, 0, &res)) {
                dev_err(&op->dev, "Missing reg property\n");
                return -ENODEV;
        }
@@ -399,7 +399,7 @@ int mpc5200_audio_dma_create(struct of_device *op)
        }
 
        /* Get the PSC ID */
-       prop = of_get_property(op->node, "cell-index", &size);
+       prop = of_get_property(op->dev.of_node, "cell-index", &size);
        if (!prop || size < sizeof *prop) {
                ret = -ENODEV;
                goto out_free;
index 3dbc7f7cd7b9a01a9b89cc3512a46159cc804133..e2ee220bfb7ea86dcd322da92a5025c0ce026f7e 100644 (file)
@@ -317,12 +317,12 @@ static struct of_device_id psc_ac97_match[] __devinitdata = {
 MODULE_DEVICE_TABLE(of, psc_ac97_match);
 
 static struct of_platform_driver psc_ac97_driver = {
-       .match_table = psc_ac97_match,
        .probe = psc_ac97_of_probe,
        .remove = __devexit_p(psc_ac97_of_remove),
        .driver = {
                .name = "mpc5200-psc-ac97",
                .owner = THIS_MODULE,
+               .of_match_table = psc_ac97_match,
        },
 };
 
index ce8de90fb94ae54d5ce7adbd05735f5395a4d7f7..4f455bd6851ffd87102e6003dfd868b12f5b13f8 100644 (file)
@@ -181,7 +181,7 @@ static int __devinit psc_i2s_of_probe(struct of_device *op,
 
        /* Check for the codec handle.  If it is not present then we
         * are done */
-       if (!of_get_property(op->node, "codec-handle", NULL))
+       if (!of_get_property(op->dev.of_node, "codec-handle", NULL))
                return 0;
 
        /* Due to errata in the dma mode; need to line up enabling
@@ -220,12 +220,12 @@ static struct of_device_id psc_i2s_match[] __devinitdata = {
 MODULE_DEVICE_TABLE(of, psc_i2s_match);
 
 static struct of_platform_driver psc_i2s_driver = {
-       .match_table = psc_i2s_match,
        .probe = psc_i2s_of_probe,
        .remove = __devexit_p(psc_i2s_of_remove),
        .driver = {
                .name = "mpc5200-psc-i2s",
                .owner = THIS_MODULE,
+               .of_match_table = psc_i2s_match,
        },
 };
 
index 83de1c81c8c410e580ae9b2b286cf8a99faca4b0..6a2764ee8203980b25b07227f3aba9978c72e286 100644 (file)
@@ -203,7 +203,7 @@ static struct snd_soc_ops mpc8610_hpcd_ops = {
 static int mpc8610_hpcd_probe(struct of_device *ofdev,
        const struct of_device_id *match)
 {
-       struct device_node *np = ofdev->node;
+       struct device_node *np = ofdev->dev.of_node;
        struct device_node *codec_np = NULL;
        struct device_node *guts_np = NULL;
        struct device_node *dma_np = NULL;
@@ -580,9 +580,11 @@ static struct of_device_id mpc8610_hpcd_match[] = {
 MODULE_DEVICE_TABLE(of, mpc8610_hpcd_match);
 
 static struct of_platform_driver mpc8610_hpcd_of_driver = {
-       .owner          = THIS_MODULE,
-       .name           = "mpc8610_hpcd",
-       .match_table    = mpc8610_hpcd_match,
+       .driver = {
+               .name = "mpc8610_hpcd",
+               .owner = THIS_MODULE,
+               .of_match_table = mpc8610_hpcd_match,
+       },
        .probe          = mpc8610_hpcd_probe,
        .remove         = mpc8610_hpcd_remove,
 };
index 574af56ba8a6fa6d4b690f4b2079ea459281712c..71221fd209445b55a09093986a7a330546277381 100644 (file)
@@ -1065,8 +1065,11 @@ static const struct of_device_id amd7930_match[] = {
 };
 
 static struct of_platform_driver amd7930_sbus_driver = {
-       .name           = "audio",
-       .match_table    = amd7930_match,
+       .driver = {
+               .name = "audio",
+               .owner = THIS_MODULE,
+               .of_match_table = amd7930_match,
+       },
        .probe          = amd7930_sbus_probe,
 };
 
index 7dcc06512e8684c60c738f6eb7fe9eeeff499070..fb4c6f2f29e5d1b97a69ec2ccd00d6ff7b750ff4 100644 (file)
@@ -2075,12 +2075,12 @@ static int __devinit cs4231_ebus_probe(struct of_device *op, const struct of_dev
 static int __devinit cs4231_probe(struct of_device *op, const struct of_device_id *match)
 {
 #ifdef EBUS_SUPPORT
-       if (!strcmp(op->node->parent->name, "ebus"))
+       if (!strcmp(op->dev.of_node->parent->name, "ebus"))
                return cs4231_ebus_probe(op, match);
 #endif
 #ifdef SBUS_SUPPORT
-       if (!strcmp(op->node->parent->name, "sbus") ||
-           !strcmp(op->node->parent->name, "sbi"))
+       if (!strcmp(op->dev.of_node->parent->name, "sbus") ||
+           !strcmp(op->dev.of_node->parent->name, "sbi"))
                return cs4231_sbus_probe(op, match);
 #endif
        return -ENODEV;
@@ -2109,8 +2109,11 @@ static const struct of_device_id cs4231_match[] = {
 MODULE_DEVICE_TABLE(of, cs4231_match);
 
 static struct of_platform_driver cs4231_driver = {
-       .name           = "audio",
-       .match_table    = cs4231_match,
+       .driver = {
+               .name = "audio",
+               .owner = THIS_MODULE,
+               .of_match_table = cs4231_match,
+       },
        .probe          = cs4231_probe,
        .remove         = __devexit_p(cs4231_remove),
 };
index 2eab6ce48852233dbf58a44b227e7e522d8bd352..1557bf132e732fe172a383f3f64cec7ca4bb27f4 100644 (file)
@@ -2651,7 +2651,7 @@ static int __devinit dbri_probe(struct of_device *op, const struct of_device_id
 
        printk(KERN_INFO "audio%d at %p (irq %d) is DBRI(%c)+CS4215(%d)\n",
               dev, dbri->regs,
-              dbri->irq, op->node->name[9], dbri->mm.version);
+              dbri->irq, op->dev.of_node->name[9], dbri->mm.version);
        dev++;
 
        return 0;
@@ -2687,8 +2687,11 @@ static const struct of_device_id dbri_match[] = {
 MODULE_DEVICE_TABLE(of, dbri_match);
 
 static struct of_platform_driver dbri_sbus_driver = {
-       .name           = "dbri",
-       .match_table    = dbri_match,
+       .driver = {
+               .name = "dbri",
+               .owner = THIS_MODULE,
+               .of_match_table = dbri_match,
+       },
        .probe          = dbri_probe,
        .remove         = __devexit_p(dbri_remove),
 };