OF: move device node pointer into struct device.
Subsystems (43)
cover OF: move device node pointer into struct device.
Currently on OF enabled platforms, the device node pointer is stored in both device.archdata.of_node (.prom_node on sparc), and in of_device.node OF device tree support is being generalized to work on any platform, so instead of adding the of_node pointer to each platform's archdata individually, this patch series moves the of_node pointer into struct device proper and fixes up all users to reference the new location.
The last 3 patches in this series remove the old .archdata.of_node, .archdata.prom_node and of_device.node instances.
This series has been compile tested on powerpc, sparc and microblaze, (allmodconfig used on sparc and powerpc) and boot tested on an mpc5200 powerpc. All known (or at least all I could find) in-tree users of the old names have been removed.
This series should also be fully bisectable. After I collect acks, I would like to get this whole series into linux-next to see if I've missed any references, but I can probably hold off merging the last three patches when the 2.6.35 merge window opens to give out of tree users a bit more time to adapt. In fact, I'd probably wait a few extra days after pushing out the bulk of this series before I push the last 3 patches into my linux-next branch to isolate the drivers that I missed while fixing.
Cheers,
g.
---
Grant Likely (37):
arch/sparc: Remove .archdata.of_node and use .of_node in struct device arch/microblaze: Remove .archdata.of_node and use .of_node in struct device arch/powerpc: Remove .archdata.of_node and use .of_node in struct device sound/sparc: use .dev.of_node instead of .node in struct of_device sound/soc: use .dev.of_node instead of .node in struct of_device sound/aoa: use .dev.of_node instead of .node in struct of_device drivers/of: use .of_node instead of .archdata.of_node in struct device drivers/cdrom: use .of_node instead of .archdata.of_node in struct device drivers/char: use .of_node instead of .archdata.of_node in struct device drivers/scsi: use .of_node instead of .archdata.of_node in struct device drivers/of: use .dev.of_node instead of .node in struct of_device drivers/mtd: use .dev.of_node instead of .node in struct of_device drivers/infiniband: use .dev.of_node instead of .node in struct of_device drivers/char: use .dev.of_node instead of .node in struct of_device drivers/i2c: use .dev.of_node instead of .node in struct of_device drivers/leds: use .dev.of_node instead of .node in struct of_device drivers/ata: use .dev.of_node instead of .node in struct of_device drivers/input: use .dev.of_node instead of .node in struct of_device drivers/serial: use .dev.of_node instead of .node in struct of_device drivers/pcmcia: use .dev.of_node instead of .node in struct of_device drivers/net: use .dev.of_node instead of .node in struct of_device drivers/sbus: use .dev.of_node instead of .node in struct of_device drivers/mmc: use .dev.of_node instead of .node in struct of_device drivers/spi: use .dev.of_node instead of .node in struct of_device drivers/macintosh: use .dev.of_node instead of .node in struct of_device drivers/usb: use .dev.of_node instead of .node in struct of_device drivers/scsi: use .dev.of_node instead of .node in struct of_device drivers/video: use .dev.of_node instead of .node in struct of_device drivers/atm: use .dev.of_node instead of .node in struct of_device drivers/watchdog: use .dev.of_node instead of .node in struct of_device drivers/serial: use .dev.of_node instead of .node in struct of_device arch/microblaze: use .dev.of_node instead of .node in struct of_device arch/powerpc: use .dev.of_node instead of .node in struct of_device arch/sparc: use .dev.of_node instead of .node in struct of_device of/sparc: use dev->of_node instead of dev->archdata.prom_node
of: Eliminate dev_archdata_get_node()
i2c/of: Allow device node to be passed via i2c_board_info
arch/microblaze/include/asm/device.h | 14 ------------ arch/microblaze/include/asm/of_device.h | 1 - arch/microblaze/kernel/of_device.c | 12 ++++------ arch/microblaze/kernel/of_platform.c | 4 ++- arch/powerpc/include/asm/device.h | 22 +++++++------------ arch/powerpc/include/asm/macio.h | 2 +- arch/powerpc/include/asm/of_device.h | 1 - arch/powerpc/kernel/ibmebus.c | 4 ++- arch/powerpc/kernel/of_device.c | 12 ++++------ arch/powerpc/kernel/of_platform.c | 16 +++++++------- arch/powerpc/kernel/pci-common.c | 1 - arch/powerpc/kernel/vio.c | 17 +++++++-------- arch/powerpc/platforms/52xx/mpc52xx_gpio.c | 4 ++- arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 16 +++++++------- arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | 6 +++-- arch/powerpc/platforms/82xx/ep8248e.c | 6 +++-- arch/powerpc/platforms/83xx/suspend.c | 2 +- arch/powerpc/platforms/cell/axon_msi.c | 2 +- arch/powerpc/platforms/cell/iommu.c | 5 ++-- arch/powerpc/platforms/pasemi/gpio_mdio.c | 2 +- arch/powerpc/platforms/pasemi/setup.c | 4 ++- arch/powerpc/platforms/ps3/system-bus.c | 1 - arch/powerpc/platforms/pseries/iommu.c | 2 +- arch/powerpc/sysdev/axonram.c | 6 +++-- arch/powerpc/sysdev/bestcomm/bestcomm.c | 8 +++---- arch/powerpc/sysdev/fsl_msi.c | 14 ++++++------ arch/powerpc/sysdev/fsl_pmc.c | 2 +- arch/powerpc/sysdev/pmi.c | 2 +- arch/sparc/include/asm/device.h | 15 ------------- arch/sparc/include/asm/fb.h | 2 +- arch/sparc/include/asm/floppy_64.h | 4 ++- arch/sparc/include/asm/of_device.h | 1 - arch/sparc/include/asm/parport.h | 2 +- arch/sparc/kernel/auxio_64.c | 2 +- arch/sparc/kernel/central.c | 4 ++- arch/sparc/kernel/chmc.c | 10 ++++----- arch/sparc/kernel/ioport.c | 2 +- arch/sparc/kernel/of_device_32.c | 18 +++++++--------- arch/sparc/kernel/of_device_64.c | 29 ++++++++++++------------- arch/sparc/kernel/of_device_common.c | 4 ++- arch/sparc/kernel/pci.c | 13 ++++------- arch/sparc/kernel/pci_common.c | 9 ++++---- arch/sparc/kernel/pci_fire.c | 4 ++- arch/sparc/kernel/pci_msi.c | 18 ++++++++-------- arch/sparc/kernel/pci_psycho.c | 4 ++- arch/sparc/kernel/pci_sabre.c | 4 ++- arch/sparc/kernel/pci_schizo.c | 14 ++++++------ arch/sparc/kernel/pci_sun4v.c | 8 +++---- arch/sparc/kernel/power.c | 4 ++- arch/sparc/kernel/psycho_common.c | 2 +- arch/sparc/kernel/sbus.c | 16 +++++++------- arch/sparc/kernel/time_32.c | 2 +- arch/sparc/kernel/time_64.c | 6 +++-- drivers/ata/pata_macio.c | 2 +- drivers/ata/pata_of_platform.c | 2 +- drivers/atm/fore200e.c | 16 ++++++++------ drivers/cdrom/viocd.c | 2 +- drivers/char/hw_random/n2-drv.c | 2 +- drivers/char/hw_random/pasemi-rng.c | 2 +- drivers/char/ipmi/ipmi_si_intf.c | 4 ++- drivers/char/viotape.c | 2 +- drivers/gpio/pca953x.c | 2 +- drivers/i2c/busses/i2c-mpc.c | 17 ++++++++------- drivers/i2c/i2c-core.c | 3 +++ drivers/ide/pmac.c | 10 ++++----- drivers/infiniband/hw/ehca/ehca_main.c | 11 +++++---- drivers/input/serio/i8042-sparcio.h | 2 +- drivers/input/serio/xilinx_ps2.c | 8 +++---- drivers/leds/leds-gpio.c | 2 +- drivers/macintosh/macio_asic.c | 16 +++++++------- drivers/macintosh/macio_sysfs.c | 6 +++-- drivers/macintosh/rack-meter.c | 4 ++- drivers/macintosh/therm_pm72.c | 2 +- drivers/mmc/host/of_mmc_spi.c | 4 ++- drivers/mmc/host/sdhci-of-core.c | 2 +- drivers/mtd/maps/physmap_of.c | 6 +++-- drivers/mtd/maps/sun_uflash.c | 2 +- drivers/mtd/nand/fsl_elbc_nand.c | 6 +++-- drivers/mtd/nand/pasemi_nand.c | 2 +- drivers/net/can/sja1000/sja1000_of_platform.c | 4 ++- drivers/net/ehea/ehea_main.c | 14 ++++++------ drivers/net/greth.c | 3 ++- drivers/net/ibm_newemac/core.c | 13 ++++++----- drivers/net/ibm_newemac/debug.c | 9 ++++---- drivers/net/ibm_newemac/debug.h | 4 ++- drivers/net/ibm_newemac/mal.c | 28 ++++++++++++------------ drivers/net/ibm_newemac/rgmii.c | 12 +++++----- drivers/net/ibm_newemac/tah.c | 7 +++--- drivers/net/ibm_newemac/zmii.c | 9 ++++---- drivers/net/myri_sbus.c | 2 +- drivers/net/niu.c | 10 ++++----- drivers/net/phy/mdio-gpio.c | 6 +++-- drivers/net/sunbmac.c | 6 +++-- drivers/net/sunhme.c | 8 +++---- drivers/net/sunlance.c | 6 +++-- drivers/net/sunqe.c | 6 +++-- drivers/net/xilinx_emaclite.c | 8 +++---- drivers/of/device.c | 20 +++++++++-------- drivers/of/of_i2c.c | 4 ++- drivers/of/of_mdio.c | 5 ++-- drivers/of/of_spi.c | 1 - drivers/pcmcia/electra_cf.c | 2 +- drivers/sbus/char/bbc_envctrl.c | 4 ++- drivers/sbus/char/bbc_i2c.c | 4 ++- drivers/sbus/char/display7seg.c | 2 +- drivers/sbus/char/envctrl.c | 2 +- drivers/sbus/char/flash.c | 4 ++- drivers/sbus/char/uctrl.c | 2 +- drivers/scsi/ibmvscsi/ibmvfc.c | 2 +- drivers/scsi/ibmvscsi/ibmvscsi.c | 2 +- drivers/scsi/qlogicpti.c | 10 ++++----- drivers/scsi/sun_esp.c | 16 +++++++------- drivers/serial/apbuart.c | 2 +- drivers/serial/mpc52xx_uart.c | 8 +++---- drivers/serial/nwpserial.c | 2 +- drivers/serial/of_serial.c | 4 ++- drivers/serial/pmac_zilog.c | 2 +- drivers/serial/sunhv.c | 2 +- drivers/serial/sunsab.c | 6 +++-- drivers/serial/sunsu.c | 6 +++-- drivers/serial/sunzilog.c | 8 +++---- drivers/serial/uartlite.c | 6 +++-- drivers/spi/mpc52xx_psc_spi.c | 11 +++++---- drivers/spi/mpc52xx_spi.c | 14 ++++++------ drivers/spi/spi_mpc8xxx.c | 6 +++-- drivers/usb/host/ehci-ppc-of.c | 2 +- drivers/usb/host/isp1760-if.c | 2 +- drivers/usb/host/ohci-ppc-of.c | 2 +- drivers/video/cg6.c | 2 +- drivers/video/ffb.c | 2 +- drivers/watchdog/cpwd.c | 2 +- include/linux/i2c.h | 4 +++ sound/aoa/fabrics/layout.c | 2 +- sound/aoa/soundbus/core.c | 8 +++---- sound/aoa/soundbus/i2sbus/control.c | 2 +- sound/aoa/soundbus/i2sbus/core.c | 4 ++- sound/aoa/soundbus/sysfs.c | 4 ++- sound/soc/fsl/mpc8610_hpcd.c | 2 +- sound/sparc/cs4231.c | 6 +++-- sound/sparc/dbri.c | 2 +- 140 files changed, 422 insertions(+), 458 deletions(-)
Signature · 1 line
Signature
PATCH 1/37 i2c/of: Allow device node to be passed via i2c_board_info
The struct device_node *of_node pointer is moving out of dev->archdata and into the struct device proper. of_i2c.c needs to set the of_node pointer before the device is registered. Since the i2c subsystem doesn't allow 2 stage allocation and registration of i2c devices, the of_node pointer needs to be passed via the i2c_board_info structure so that it is set prior to registration.
This patch adds of_node to struct i2c_board_info (conditional on CONFIG_OF), sets of_node in i2c_new_device(), and modifies of_i2c.c to use the new parameter. The calling of dev_archdata_set_node() from of_i2c will be removed in a subsequent patch when of_node is removed from archdata and all users are converted over.
---
drivers/i2c/i2c-core.c | 3 +++ drivers/of/of_i2c.c | 3 ++- include/linux/i2c.h | 4 ++++ 3 files changed, 9 insertions(+), 1 deletions(-)
drivers/i2c/i2c-core.c +3 -0
@@ -387,6 +387,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);
drivers/of/of_i2c.c +2 -1
@@ -42,7 +42,8 @@ void of_register_i2c_devices(struct i2c_adapter *adap, info.addr =be32_to_cpup (addr); -dev_archdata_set_node (&dev_ad, node); +dev_archdata_set_node (&dev_ad, node);/* temporary */ + info.of_node = node; info.archdata = &dev_ad;request_module ("%s" , info.type);
include/linux/i2c.h +4 -0
@@ -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; };
PATCH 1/37 i2c/of: Allow device node to be passed via i2c_board_info
In reply to Grant LikelyThe struct device_node *of_node pointer is moving out of dev->archdata and into the struct device proper. of_i2c.c needs to set the of_node pointer before the device is registered. Since the i2c subsystem doesn't allow 2 stage allocation and registration of i2c devices, the of_node pointer needs to be passed via the i2c_board_info structure so that it is set prior to registration.
This patch adds of_node to struct i2c_board_info (conditional on CONFIG_OF), sets of_node in i2c_new_device(), and modifies of_i2c.c to use the new parameter. The calling of dev_archdata_set_node() from of_i2c will be removed in a subsequent patch when of_node is removed from archdata and all users are converted over.
---
drivers/i2c/i2c-core.c | 3 +++ drivers/of/of_i2c.c | 3 ++- include/linux/i2c.h | 4 ++++ 3 files changed, 9 insertions(+), 1 deletions(-)
drivers/i2c/i2c-core.c +3 -0
@@ -387,6 +387,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);
drivers/of/of_i2c.c +2 -1
@@ -42,7 +42,8 @@ void of_register_i2c_devices(struct i2c_adapter *adap, info.addr =be32_to_cpup (addr); -dev_archdata_set_node (&dev_ad, node); +dev_archdata_set_node (&dev_ad, node);/* temporary */ + info.of_node = node; info.archdata = &dev_ad;request_module ("%s" , info.type);
include/linux/i2c.h +4 -0
@@ -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; };
PATCH 1/37 i2c/of: Allow device node to be passed via i2c_board_info
In reply to Grant LikelyThe struct device_node *of_node pointer is moving out of dev->archdata and into the struct device proper. of_i2c.c needs to set the of_node pointer before the device is registered. Since the i2c subsystem doesn't allow 2 stage allocation and registration of i2c devices, the of_node pointer needs to be passed via the i2c_board_info structure so that it is set prior to registration.
This patch adds of_node to struct i2c_board_info (conditional on CONFIG_OF), sets of_node in i2c_new_device(), and modifies of_i2c.c to use the new parameter. The calling of dev_archdata_set_node() from of_i2c will be removed in a subsequent patch when of_node is removed from archdata and all users are converted over.
---
drivers/i2c/i2c-core.c | 3 +++ drivers/of/of_i2c.c | 3 ++- include/linux/i2c.h | 4 ++++ 3 files changed, 9 insertions(+), 1 deletions(-)
drivers/i2c/i2c-core.c +3 -0
@@ -387,6 +387,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);
drivers/of/of_i2c.c +2 -1
@@ -42,7 +42,8 @@ void of_register_i2c_devices(struct i2c_adapter *adap, info.addr =be32_to_cpup (addr); -dev_archdata_set_node (&dev_ad, node); +dev_archdata_set_node (&dev_ad, node);/* temporary */ + info.of_node = node; info.archdata = &dev_ad;request_module ("%s" , info.type);
include/linux/i2c.h +4 -0
@@ -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; };
PATCH 1/37 i2c/of: Allow device node to be passed via i2c_board_info
In reply to Grant LikelyThe struct device_node *of_node pointer is moving out of dev->archdata and into the struct device proper. of_i2c.c needs to set the of_node pointer before the device is registered. Since the i2c subsystem doesn't allow 2 stage allocation and registration of i2c devices, the of_node pointer needs to be passed via the i2c_board_info structure so that it is set prior to registration.
This patch adds of_node to struct i2c_board_info (conditional on CONFIG_OF), sets of_node in i2c_new_device(), and modifies of_i2c.c to use the new parameter. The calling of dev_archdata_set_node() from of_i2c will be removed in a subsequent patch when of_node is removed from archdata and all users are converted over.
---
drivers/i2c/i2c-core.c | 3 +++ drivers/of/of_i2c.c | 3 ++- include/linux/i2c.h | 4 ++++ 3 files changed, 9 insertions(+), 1 deletions(-)
drivers/i2c/i2c-core.c +3 -0
@@ -387,6 +387,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);
drivers/of/of_i2c.c +2 -1
@@ -42,7 +42,8 @@ void of_register_i2c_devices(struct i2c_adapter *adap, info.addr =be32_to_cpup (addr); -dev_archdata_set_node (&dev_ad, node); +dev_archdata_set_node (&dev_ad, node);/* temporary */ + info.of_node = node; info.archdata = &dev_ad;request_module ("%s" , info.type);
include/linux/i2c.h +4 -0
@@ -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; };
PATCH 1/37 i2c/of: Allow device node to be passed via i2c_board_info
In reply to Grant LikelyThe struct device_node *of_node pointer is moving out of dev->archdata and into the struct device proper. of_i2c.c needs to set the of_node pointer before the device is registered. Since the i2c subsystem doesn't allow 2 stage allocation and registration of i2c devices, the of_node pointer needs to be passed via the i2c_board_info structure so that it is set prior to registration.
This patch adds of_node to struct i2c_board_info (conditional on CONFIG_OF), sets of_node in i2c_new_device(), and modifies of_i2c.c to use the new parameter. The calling of dev_archdata_set_node() from of_i2c will be removed in a subsequent patch when of_node is removed from archdata and all users are converted over.
---
drivers/i2c/i2c-core.c | 3 +++ drivers/of/of_i2c.c | 3 ++- include/linux/i2c.h | 4 ++++ 3 files changed, 9 insertions(+), 1 deletions(-)
drivers/i2c/i2c-core.c +3 -0
@@ -387,6 +387,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);
drivers/of/of_i2c.c +2 -1
@@ -42,7 +42,8 @@ void of_register_i2c_devices(struct i2c_adapter *adap, info.addr =be32_to_cpup (addr); -dev_archdata_set_node (&dev_ad, node); +dev_archdata_set_node (&dev_ad, node);/* temporary */ + info.of_node = node; info.archdata = &dev_ad;request_module ("%s" , info.type);
include/linux/i2c.h +4 -0
@@ -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; };
PATCH 2/37 of: Eliminate dev_archdata_get_node()
In reply to Grant LikelyThe device_node pointer is now stored in struct device->of_node so we no longer need the dev_archdata_get_node() accessor. Read the of_node directly instead.
---
arch/microblaze/include/asm/device.h | 6 ------ arch/powerpc/include/asm/device.h | 6 ------ arch/sparc/include/asm/device.h | 6 ------ drivers/gpio/pca953x.c | 2 +- drivers/mmc/host/of_mmc_spi.c | 4 ++-- drivers/of/of_i2c.c | 2 +- drivers/of/of_mdio.c | 4 ++-- drivers/spi/spi_mpc8xxx.c | 6 +++--- 8 files changed, 9 insertions(+), 27 deletions(-)
arch/microblaze/include/asm/device.h +0 -6
@@ -25,12 +25,6 @@ static inline void dev_archdata_set_node(struct dev_archdata *ad, 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 */
arch/powerpc/include/asm/device.h +0 -6
@@ -36,12 +36,6 @@ static inline void dev_archdata_set_node(struct dev_archdata *ad, 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 { };
arch/sparc/include/asm/device.h +0 -6
@@ -26,12 +26,6 @@ static inline void dev_archdata_set_node(struct dev_archdata *ad, 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 { };
drivers/gpio/pca953x.c +1 -1
@@ -436,7 +436,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 ;
drivers/mmc/host/of_mmc_spi.c +2 -2
@@ -63,7 +63,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;
@@ -134,7 +134,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;
drivers/of/of_i2c.c +1 -1
@@ -69,7 +69,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 */
drivers/of/of_mdio.c +2 -2
@@ -101,7 +101,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; }/**
@@ -167,7 +167,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 ;
drivers/spi/spi_mpc8xxx.c +3 -3
@@ -796,7 +796,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;
@@ -850,7 +850,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;
@@ -1122,7 +1122,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;
PATCH 2/37 of: Eliminate dev_archdata_get_node()
In reply to Grant LikelyThe device_node pointer is now stored in struct device->of_node so we no longer need the dev_archdata_get_node() accessor. Read the of_node directly instead.
---
arch/microblaze/include/asm/device.h | 6 ------ arch/powerpc/include/asm/device.h | 6 ------ arch/sparc/include/asm/device.h | 6 ------ drivers/gpio/pca953x.c | 2 +- drivers/mmc/host/of_mmc_spi.c | 4 ++-- drivers/of/of_i2c.c | 2 +- drivers/of/of_mdio.c | 4 ++-- drivers/spi/spi_mpc8xxx.c | 6 +++--- 8 files changed, 9 insertions(+), 27 deletions(-)
arch/microblaze/include/asm/device.h +0 -6
@@ -25,12 +25,6 @@ static inline void dev_archdata_set_node(struct dev_archdata *ad, 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 */
arch/powerpc/include/asm/device.h +0 -6
@@ -36,12 +36,6 @@ static inline void dev_archdata_set_node(struct dev_archdata *ad, 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 { };
arch/sparc/include/asm/device.h +0 -6
@@ -26,12 +26,6 @@ static inline void dev_archdata_set_node(struct dev_archdata *ad, 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 { };
drivers/gpio/pca953x.c +1 -1
@@ -436,7 +436,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 ;
drivers/mmc/host/of_mmc_spi.c +2 -2
@@ -63,7 +63,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;
@@ -134,7 +134,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;
drivers/of/of_i2c.c +1 -1
@@ -69,7 +69,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 */
drivers/of/of_mdio.c +2 -2
@@ -101,7 +101,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; }/**
@@ -167,7 +167,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 ;
drivers/spi/spi_mpc8xxx.c +3 -3
@@ -796,7 +796,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;
@@ -850,7 +850,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;
@@ -1122,7 +1122,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;
PATCH 1/37 i2c/of: Allow device node to be passed via i2c_board_info
In reply to Grant LikelyThe struct device_node *of_node pointer is moving out of dev->archdata and into the struct device proper. of_i2c.c needs to set the of_node pointer before the device is registered. Since the i2c subsystem doesn't allow 2 stage allocation and registration of i2c devices, the of_node pointer needs to be passed via the i2c_board_info structure so that it is set prior to registration.
This patch adds of_node to struct i2c_board_info (conditional on CONFIG_OF), sets of_node in i2c_new_device(), and modifies of_i2c.c to use the new parameter. The calling of dev_archdata_set_node() from of_i2c will be removed in a subsequent patch when of_node is removed from archdata and all users are converted over.
---
drivers/i2c/i2c-core.c | 3 +++ drivers/of/of_i2c.c | 3 ++- include/linux/i2c.h | 4 ++++ 3 files changed, 9 insertions(+), 1 deletions(-)
drivers/i2c/i2c-core.c +3 -0
@@ -387,6 +387,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);
drivers/of/of_i2c.c +2 -1
@@ -42,7 +42,8 @@ void of_register_i2c_devices(struct i2c_adapter *adap, info.addr =be32_to_cpup (addr); -dev_archdata_set_node (&dev_ad, node); +dev_archdata_set_node (&dev_ad, node);/* temporary */ + info.of_node = node; info.archdata = &dev_ad;request_module ("%s" , info.type);
include/linux/i2c.h +4 -0
@@ -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; };
PATCH 1/37 i2c/of: Allow device node to be passed via i2c_board_info
In reply to Grant LikelyThe struct device_node *of_node pointer is moving out of dev->archdata and into the struct device proper. of_i2c.c needs to set the of_node pointer before the device is registered. Since the i2c subsystem doesn't allow 2 stage allocation and registration of i2c devices, the of_node pointer needs to be passed via the i2c_board_info structure so that it is set prior to registration.
This patch adds of_node to struct i2c_board_info (conditional on CONFIG_OF), sets of_node in i2c_new_device(), and modifies of_i2c.c to use the new parameter. The calling of dev_archdata_set_node() from of_i2c will be removed in a subsequent patch when of_node is removed from archdata and all users are converted over.
---
drivers/i2c/i2c-core.c | 3 +++ drivers/of/of_i2c.c | 3 ++- include/linux/i2c.h | 4 ++++ 3 files changed, 9 insertions(+), 1 deletions(-)
drivers/i2c/i2c-core.c +3 -0
@@ -387,6 +387,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);
drivers/of/of_i2c.c +2 -1
@@ -42,7 +42,8 @@ void of_register_i2c_devices(struct i2c_adapter *adap, info.addr =be32_to_cpup (addr); -dev_archdata_set_node (&dev_ad, node); +dev_archdata_set_node (&dev_ad, node);/* temporary */ + info.of_node = node; info.archdata = &dev_ad;request_module ("%s" , info.type);
include/linux/i2c.h +4 -0
@@ -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; };
PATCH 2/37 of: Eliminate dev_archdata_get_node()
In reply to Grant LikelyThe device_node pointer is now stored in struct device->of_node so we no longer need the dev_archdata_get_node() accessor. Read the of_node directly instead.
---
arch/microblaze/include/asm/device.h | 6 ------ arch/powerpc/include/asm/device.h | 6 ------ arch/sparc/include/asm/device.h | 6 ------ drivers/gpio/pca953x.c | 2 +- drivers/mmc/host/of_mmc_spi.c | 4 ++-- drivers/of/of_i2c.c | 2 +- drivers/of/of_mdio.c | 4 ++-- drivers/spi/spi_mpc8xxx.c | 6 +++--- 8 files changed, 9 insertions(+), 27 deletions(-)
arch/microblaze/include/asm/device.h +0 -6
@@ -25,12 +25,6 @@ static inline void dev_archdata_set_node(struct dev_archdata *ad, 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 */
arch/powerpc/include/asm/device.h +0 -6
@@ -36,12 +36,6 @@ static inline void dev_archdata_set_node(struct dev_archdata *ad, 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 { };
arch/sparc/include/asm/device.h +0 -6
@@ -26,12 +26,6 @@ static inline void dev_archdata_set_node(struct dev_archdata *ad, 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 { };
drivers/gpio/pca953x.c +1 -1
@@ -436,7 +436,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 ;
drivers/mmc/host/of_mmc_spi.c +2 -2
@@ -63,7 +63,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;
@@ -134,7 +134,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;
drivers/of/of_i2c.c +1 -1
@@ -69,7 +69,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 */
drivers/of/of_mdio.c +2 -2
@@ -101,7 +101,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; }/**
@@ -167,7 +167,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 ;
drivers/spi/spi_mpc8xxx.c +3 -3
@@ -796,7 +796,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;
@@ -850,7 +850,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;
@@ -1122,7 +1122,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;
PATCH 2/37 of: Eliminate dev_archdata_get_node()
In reply to Grant LikelyThe device_node pointer is now stored in struct device->of_node so we no longer need the dev_archdata_get_node() accessor. Read the of_node directly instead.
---
arch/microblaze/include/asm/device.h | 6 ------ arch/powerpc/include/asm/device.h | 6 ------ arch/sparc/include/asm/device.h | 6 ------ drivers/gpio/pca953x.c | 2 +- drivers/mmc/host/of_mmc_spi.c | 4 ++-- drivers/of/of_i2c.c | 2 +- drivers/of/of_mdio.c | 4 ++-- drivers/spi/spi_mpc8xxx.c | 6 +++--- 8 files changed, 9 insertions(+), 27 deletions(-)
arch/microblaze/include/asm/device.h +0 -6
@@ -25,12 +25,6 @@ static inline void dev_archdata_set_node(struct dev_archdata *ad, 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 */
arch/powerpc/include/asm/device.h +0 -6
@@ -36,12 +36,6 @@ static inline void dev_archdata_set_node(struct dev_archdata *ad, 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 { };
arch/sparc/include/asm/device.h +0 -6
@@ -26,12 +26,6 @@ static inline void dev_archdata_set_node(struct dev_archdata *ad, 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 { };
drivers/gpio/pca953x.c +1 -1
@@ -436,7 +436,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 ;
drivers/mmc/host/of_mmc_spi.c +2 -2
@@ -63,7 +63,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;
@@ -134,7 +134,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;
drivers/of/of_i2c.c +1 -1
@@ -69,7 +69,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 */
drivers/of/of_mdio.c +2 -2
@@ -101,7 +101,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; }/**
@@ -167,7 +167,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 ;
drivers/spi/spi_mpc8xxx.c +3 -3
@@ -796,7 +796,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;
@@ -850,7 +850,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;
@@ -1122,7 +1122,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;
PATCH 3/37 of/sparc: use dev->of_node instead of dev->archdata.prom_node
In reply to Grant LikelyThe prom_node pointer is being moved out of archdata to dev->of_node. This patch changes users of prom_node to use the new location.
---
arch/sparc/include/asm/fb.h | 2 +- arch/sparc/kernel/of_device_32.c | 3 ++- arch/sparc/kernel/of_device_64.c | 3 ++- arch/sparc/kernel/pci.c | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-)
arch/sparc/include/asm/fb.h +1 -1
@@ -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 ;
arch/sparc/kernel/of_device_32.c +2 -1
@@ -345,8 +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->prom_node = dp;/* temporary */ sd->op = op; + op->dev.of_node = dp; op->node = dp;
arch/sparc/kernel/of_device_64.c +2 -1
@@ -640,9 +640,10 @@ static struct of_device * __init scan_one_device(struct device_node *dp,return NULL ; sd = &op->dev.archdata; - sd->prom_node = dp; + sd->prom_node = dp;/* temporary */ sd->op = op; + op->dev.of_node = dp; op->node = dp; op->clock_freq = of_getintprop_default(dp, "clock-frequency",
arch/sparc/kernel/pci.c +2 -2
@@ -654,7 +654,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); }
@@ -1023,7 +1023,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);
PATCH 3/37 of/sparc: use dev->of_node instead of dev->archdata.prom_node
In reply to Grant LikelyThe prom_node pointer is being moved out of archdata to dev->of_node. This patch changes users of prom_node to use the new location.
---
arch/sparc/include/asm/fb.h | 2 +- arch/sparc/kernel/of_device_32.c | 3 ++- arch/sparc/kernel/of_device_64.c | 3 ++- arch/sparc/kernel/pci.c | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-)
arch/sparc/include/asm/fb.h +1 -1
@@ -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 ;
arch/sparc/kernel/of_device_32.c +2 -1
@@ -345,8 +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->prom_node = dp;/* temporary */ sd->op = op; + op->dev.of_node = dp; op->node = dp;
arch/sparc/kernel/of_device_64.c +2 -1
@@ -640,9 +640,10 @@ static struct of_device * __init scan_one_device(struct device_node *dp,return NULL ; sd = &op->dev.archdata; - sd->prom_node = dp; + sd->prom_node = dp;/* temporary */ sd->op = op; + op->dev.of_node = dp; op->node = dp; op->clock_freq = of_getintprop_default(dp, "clock-frequency",
arch/sparc/kernel/pci.c +2 -2
@@ -654,7 +654,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); }
@@ -1023,7 +1023,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);
PATCH 2/37 of: Eliminate dev_archdata_get_node()
In reply to Grant LikelyThe device_node pointer is now stored in struct device->of_node so we no longer need the dev_archdata_get_node() accessor. Read the of_node directly instead.
---
arch/microblaze/include/asm/device.h | 6 ------ arch/powerpc/include/asm/device.h | 6 ------ arch/sparc/include/asm/device.h | 6 ------ drivers/gpio/pca953x.c | 2 +- drivers/mmc/host/of_mmc_spi.c | 4 ++-- drivers/of/of_i2c.c | 2 +- drivers/of/of_mdio.c | 4 ++-- drivers/spi/spi_mpc8xxx.c | 6 +++--- 8 files changed, 9 insertions(+), 27 deletions(-)
arch/microblaze/include/asm/device.h +0 -6
@@ -25,12 +25,6 @@ static inline void dev_archdata_set_node(struct dev_archdata *ad, 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 */
arch/powerpc/include/asm/device.h +0 -6
@@ -36,12 +36,6 @@ static inline void dev_archdata_set_node(struct dev_archdata *ad, 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 { };
arch/sparc/include/asm/device.h +0 -6
@@ -26,12 +26,6 @@ static inline void dev_archdata_set_node(struct dev_archdata *ad, 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 { };
drivers/gpio/pca953x.c +1 -1
@@ -436,7 +436,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 ;
drivers/mmc/host/of_mmc_spi.c +2 -2
@@ -63,7 +63,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;
@@ -134,7 +134,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;
drivers/of/of_i2c.c +1 -1
@@ -69,7 +69,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 */
drivers/of/of_mdio.c +2 -2
@@ -101,7 +101,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; }/**
@@ -167,7 +167,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 ;
drivers/spi/spi_mpc8xxx.c +3 -3
@@ -796,7 +796,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;
@@ -850,7 +850,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;
@@ -1122,7 +1122,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;
PATCH 2/37 of: Eliminate dev_archdata_get_node()
In reply to Grant LikelyThe device_node pointer is now stored in struct device->of_node so we no longer need the dev_archdata_get_node() accessor. Read the of_node directly instead.
---
arch/microblaze/include/asm/device.h | 6 ------ arch/powerpc/include/asm/device.h | 6 ------ arch/sparc/include/asm/device.h | 6 ------ drivers/gpio/pca953x.c | 2 +- drivers/mmc/host/of_mmc_spi.c | 4 ++-- drivers/of/of_i2c.c | 2 +- drivers/of/of_mdio.c | 4 ++-- drivers/spi/spi_mpc8xxx.c | 6 +++--- 8 files changed, 9 insertions(+), 27 deletions(-)
arch/microblaze/include/asm/device.h +0 -6
@@ -25,12 +25,6 @@ static inline void dev_archdata_set_node(struct dev_archdata *ad, 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 */
arch/powerpc/include/asm/device.h +0 -6
@@ -36,12 +36,6 @@ static inline void dev_archdata_set_node(struct dev_archdata *ad, 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 { };
arch/sparc/include/asm/device.h +0 -6
@@ -26,12 +26,6 @@ static inline void dev_archdata_set_node(struct dev_archdata *ad, 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 { };
drivers/gpio/pca953x.c +1 -1
@@ -436,7 +436,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 ;
drivers/mmc/host/of_mmc_spi.c +2 -2
@@ -63,7 +63,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;
@@ -134,7 +134,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;
drivers/of/of_i2c.c +1 -1
@@ -69,7 +69,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 */
drivers/of/of_mdio.c +2 -2
@@ -101,7 +101,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; }/**
@@ -167,7 +167,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 ;
drivers/spi/spi_mpc8xxx.c +3 -3
@@ -796,7 +796,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;
@@ -850,7 +850,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;
@@ -1122,7 +1122,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;
PATCH 3/37 of/sparc: use dev->of_node instead of dev->archdata.prom_node
In reply to Grant LikelyThe prom_node pointer is being moved out of archdata to dev->of_node. This patch changes users of prom_node to use the new location.
---
arch/sparc/include/asm/fb.h | 2 +- arch/sparc/kernel/of_device_32.c | 3 ++- arch/sparc/kernel/of_device_64.c | 3 ++- arch/sparc/kernel/pci.c | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-)
arch/sparc/include/asm/fb.h +1 -1
@@ -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 ;
arch/sparc/kernel/of_device_32.c +2 -1
@@ -345,8 +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->prom_node = dp;/* temporary */ sd->op = op; + op->dev.of_node = dp; op->node = dp;
arch/sparc/kernel/of_device_64.c +2 -1
@@ -640,9 +640,10 @@ static struct of_device * __init scan_one_device(struct device_node *dp,return NULL ; sd = &op->dev.archdata; - sd->prom_node = dp; + sd->prom_node = dp;/* temporary */ sd->op = op; + op->dev.of_node = dp; op->node = dp; op->clock_freq = of_getintprop_default(dp, "clock-frequency",
arch/sparc/kernel/pci.c +2 -2
@@ -654,7 +654,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); }
@@ -1023,7 +1023,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);
PATCH 3/37 of/sparc: use dev->of_node instead of dev->archdata.prom_node
In reply to Grant LikelyThe prom_node pointer is being moved out of archdata to dev->of_node. This patch changes users of prom_node to use the new location.
---
arch/sparc/include/asm/fb.h | 2 +- arch/sparc/kernel/of_device_32.c | 3 ++- arch/sparc/kernel/of_device_64.c | 3 ++- arch/sparc/kernel/pci.c | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-)
arch/sparc/include/asm/fb.h +1 -1
@@ -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 ;
arch/sparc/kernel/of_device_32.c +2 -1
@@ -345,8 +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->prom_node = dp;/* temporary */ sd->op = op; + op->dev.of_node = dp; op->node = dp;
arch/sparc/kernel/of_device_64.c +2 -1
@@ -640,9 +640,10 @@ static struct of_device * __init scan_one_device(struct device_node *dp,return NULL ; sd = &op->dev.archdata; - sd->prom_node = dp; + sd->prom_node = dp;/* temporary */ sd->op = op; + op->dev.of_node = dp; op->node = dp; op->clock_freq = of_getintprop_default(dp, "clock-frequency",
arch/sparc/kernel/pci.c +2 -2
@@ -654,7 +654,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); }
@@ -1023,7 +1023,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);
PATCH 3/37 of/sparc: use dev->of_node instead of dev->archdata.prom_node
In reply to Grant LikelyThe prom_node pointer is being moved out of archdata to dev->of_node. This patch changes users of prom_node to use the new location.
---
arch/sparc/include/asm/fb.h | 2 +- arch/sparc/kernel/of_device_32.c | 3 ++- arch/sparc/kernel/of_device_64.c | 3 ++- arch/sparc/kernel/pci.c | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-)
arch/sparc/include/asm/fb.h +1 -1
@@ -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 ;
arch/sparc/kernel/of_device_32.c +2 -1
@@ -345,8 +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->prom_node = dp;/* temporary */ sd->op = op; + op->dev.of_node = dp; op->node = dp;
arch/sparc/kernel/of_device_64.c +2 -1
@@ -640,9 +640,10 @@ static struct of_device * __init scan_one_device(struct device_node *dp,return NULL ; sd = &op->dev.archdata; - sd->prom_node = dp; + sd->prom_node = dp;/* temporary */ sd->op = op; + op->dev.of_node = dp; op->node = dp; op->clock_freq = of_getintprop_default(dp, "clock-frequency",
arch/sparc/kernel/pci.c +2 -2
@@ -654,7 +654,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); }
@@ -1023,7 +1023,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);
PATCH 3/37 of/sparc: use dev->of_node instead of dev->archdata.prom_node
In reply to Grant LikelyThe prom_node pointer is being moved out of archdata to dev->of_node. This patch changes users of prom_node to use the new location.
---
arch/sparc/include/asm/fb.h | 2 +- arch/sparc/kernel/of_device_32.c | 3 ++- arch/sparc/kernel/of_device_64.c | 3 ++- arch/sparc/kernel/pci.c | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-)
arch/sparc/include/asm/fb.h +1 -1
@@ -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 ;
arch/sparc/kernel/of_device_32.c +2 -1
@@ -345,8 +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->prom_node = dp;/* temporary */ sd->op = op; + op->dev.of_node = dp; op->node = dp;
arch/sparc/kernel/of_device_64.c +2 -1
@@ -640,9 +640,10 @@ static struct of_device * __init scan_one_device(struct device_node *dp,return NULL ; sd = &op->dev.archdata; - sd->prom_node = dp; + sd->prom_node = dp;/* temporary */ sd->op = op; + op->dev.of_node = dp; op->node = dp; op->clock_freq = of_getintprop_default(dp, "clock-frequency",
arch/sparc/kernel/pci.c +2 -2
@@ -654,7 +654,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); }
@@ -1023,7 +1023,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);
PATCH 4/37 arch/sparc: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
arch/sparc/include/asm/floppy_64.h | 4 ++-- arch/sparc/include/asm/parport.h | 2 +- arch/sparc/kernel/auxio_64.c | 2 +- arch/sparc/kernel/central.c | 4 ++-- arch/sparc/kernel/chmc.c | 10 +++++----- arch/sparc/kernel/ioport.c | 2 +- arch/sparc/kernel/of_device_32.c | 14 +++++++------- arch/sparc/kernel/of_device_64.c | 26 +++++++++++++------------- arch/sparc/kernel/of_device_common.c | 4 ++-- arch/sparc/kernel/pci.c | 8 +++----- arch/sparc/kernel/pci_common.c | 9 +++++---- arch/sparc/kernel/pci_fire.c | 4 ++-- arch/sparc/kernel/pci_msi.c | 18 +++++++++--------- arch/sparc/kernel/pci_psycho.c | 4 ++-- arch/sparc/kernel/pci_sabre.c | 4 ++-- arch/sparc/kernel/pci_schizo.c | 14 +++++++------- arch/sparc/kernel/pci_sun4v.c | 8 ++++---- arch/sparc/kernel/power.c | 4 ++-- arch/sparc/kernel/psycho_common.c | 2 +- arch/sparc/kernel/sbus.c | 16 ++++++++-------- arch/sparc/kernel/time_32.c | 2 +- arch/sparc/kernel/time_64.c | 6 +++--- 22 files changed, 83 insertions(+), 84 deletions(-)
arch/sparc/include/asm/floppy_64.h +2 -2
@@ -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 ;
arch/sparc/include/asm/parport.h +1 -1
@@ -113,7 +113,7 @@ static int __devinit ecpp_probe(struct of_device *op, const struct of_device_idstruct 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,
arch/sparc/kernel/auxio_64.c +1 -1
@@ -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" )) {
arch/sparc/kernel/central.c +2 -2
@@ -167,7 +167,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,
@@ -182,7 +182,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;
arch/sparc/kernel/chmc.c +5 -5
@@ -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;
arch/sparc/kernel/ioport.c +1 -1
@@ -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;
arch/sparc/kernel/of_device_32.c +7 -7
@@ -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; } }
arch/sparc/kernel/of_device_64.c +13 -13
@@ -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);
arch/sparc/kernel/of_device_common.c +2 -2
@@ -17,7 +17,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)
@@ -49,7 +49,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) {
arch/sparc/kernel/pci.c +3 -5
@@ -684,7 +684,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);
@@ -1152,15 +1152,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);
arch/sparc/kernel/pci_common.c +5 -4
@@ -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 );
@@ -389,7 +390,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",
arch/sparc/kernel/pci_fire.c +2 -2
@@ -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;
arch/sparc/kernel/pci_msi.c +9 -9
@@ -323,7 +323,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;
@@ -346,16 +346,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;
@@ -363,27 +363,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;
arch/sparc/kernel/pci_psycho.c +2 -2
@@ -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;
arch/sparc/kernel/pci_sabre.c +2 -2
@@ -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;
arch/sparc/kernel/pci_schizo.c +7 -6
@@ -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;
arch/sparc/kernel/pci_sun4v.c +4 -4
@@ -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,
arch/sparc/kernel/power.c +2 -2
@@ -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" );
arch/sparc/kernel/psycho_common.c +1 -1
@@ -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 ;
arch/sparc/kernel/sbus.c +8 -8
@@ -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);
arch/sparc/kernel/time_32.c +1 -1
@@ -152,7 +152,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)
arch/sparc/kernel/time_64.c +3 -3
@@ -423,7 +423,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.
@@ -479,7 +479,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);
@@ -533,7 +533,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.
PATCH 4/37 arch/sparc: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
arch/sparc/include/asm/floppy_64.h | 4 ++-- arch/sparc/include/asm/parport.h | 2 +- arch/sparc/kernel/auxio_64.c | 2 +- arch/sparc/kernel/central.c | 4 ++-- arch/sparc/kernel/chmc.c | 10 +++++----- arch/sparc/kernel/ioport.c | 2 +- arch/sparc/kernel/of_device_32.c | 14 +++++++------- arch/sparc/kernel/of_device_64.c | 26 +++++++++++++------------- arch/sparc/kernel/of_device_common.c | 4 ++-- arch/sparc/kernel/pci.c | 8 +++----- arch/sparc/kernel/pci_common.c | 9 +++++---- arch/sparc/kernel/pci_fire.c | 4 ++-- arch/sparc/kernel/pci_msi.c | 18 +++++++++--------- arch/sparc/kernel/pci_psycho.c | 4 ++-- arch/sparc/kernel/pci_sabre.c | 4 ++-- arch/sparc/kernel/pci_schizo.c | 14 +++++++------- arch/sparc/kernel/pci_sun4v.c | 8 ++++---- arch/sparc/kernel/power.c | 4 ++-- arch/sparc/kernel/psycho_common.c | 2 +- arch/sparc/kernel/sbus.c | 16 ++++++++-------- arch/sparc/kernel/time_32.c | 2 +- arch/sparc/kernel/time_64.c | 6 +++--- 22 files changed, 83 insertions(+), 84 deletions(-)
arch/sparc/include/asm/floppy_64.h +2 -2
@@ -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 ;
arch/sparc/include/asm/parport.h +1 -1
@@ -113,7 +113,7 @@ static int __devinit ecpp_probe(struct of_device *op, const struct of_device_idstruct 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,
arch/sparc/kernel/auxio_64.c +1 -1
@@ -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" )) {
arch/sparc/kernel/central.c +2 -2
@@ -167,7 +167,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,
@@ -182,7 +182,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;
arch/sparc/kernel/chmc.c +5 -5
@@ -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;
arch/sparc/kernel/ioport.c +1 -1
@@ -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;
arch/sparc/kernel/of_device_32.c +7 -7
@@ -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; } }
arch/sparc/kernel/of_device_64.c +13 -13
@@ -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);
arch/sparc/kernel/of_device_common.c +2 -2
@@ -17,7 +17,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)
@@ -49,7 +49,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) {
arch/sparc/kernel/pci.c +3 -5
@@ -684,7 +684,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);
@@ -1152,15 +1152,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);
arch/sparc/kernel/pci_common.c +5 -4
@@ -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 );
@@ -389,7 +390,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",
arch/sparc/kernel/pci_fire.c +2 -2
@@ -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;
arch/sparc/kernel/pci_msi.c +9 -9
@@ -323,7 +323,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;
@@ -346,16 +346,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;
@@ -363,27 +363,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;
arch/sparc/kernel/pci_psycho.c +2 -2
@@ -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;
arch/sparc/kernel/pci_sabre.c +2 -2
@@ -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;
arch/sparc/kernel/pci_schizo.c +7 -7
@@ -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;
arch/sparc/kernel/pci_sun4v.c +4 -4
@@ -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,
arch/sparc/kernel/power.c +2 -2
@@ -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" );
arch/sparc/kernel/psycho_common.c +1 -1
@@ -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 ;
arch/sparc/kernel/sbus.c +8 -8
@@ -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);
arch/sparc/kernel/time_32.c +1 -1
@@ -152,7 +152,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)
arch/sparc/kernel/time_64.c +3 -3
@@ -423,7 +423,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.
@@ -479,7 +479,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);
@@ -533,7 +533,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.
PATCH 4/37 arch/sparc: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
arch/sparc/include/asm/floppy_64.h | 4 ++-- arch/sparc/include/asm/parport.h | 2 +- arch/sparc/kernel/auxio_64.c | 2 +- arch/sparc/kernel/central.c | 4 ++-- arch/sparc/kernel/chmc.c | 10 +++++----- arch/sparc/kernel/ioport.c | 2 +- arch/sparc/kernel/of_device_32.c | 14 +++++++------- arch/sparc/kernel/of_device_64.c | 26 +++++++++++++------------- arch/sparc/kernel/of_device_common.c | 4 ++-- arch/sparc/kernel/pci.c | 8 +++----- arch/sparc/kernel/pci_common.c | 9 +++++---- arch/sparc/kernel/pci_fire.c | 4 ++-- arch/sparc/kernel/pci_msi.c | 18 +++++++++--------- arch/sparc/kernel/pci_psycho.c | 4 ++-- arch/sparc/kernel/pci_sabre.c | 4 ++-- arch/sparc/kernel/pci_schizo.c | 14 +++++++------- arch/sparc/kernel/pci_sun4v.c | 8 ++++---- arch/sparc/kernel/power.c | 4 ++-- arch/sparc/kernel/psycho_common.c | 2 +- arch/sparc/kernel/sbus.c | 16 ++++++++-------- arch/sparc/kernel/time_32.c | 2 +- arch/sparc/kernel/time_64.c | 6 +++--- 22 files changed, 83 insertions(+), 84 deletions(-)
arch/sparc/include/asm/floppy_64.h +2 -2
@@ -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 ;
arch/sparc/include/asm/parport.h +1 -1
@@ -113,7 +113,7 @@ static int __devinit ecpp_probe(struct of_device *op, const struct of_device_idstruct 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,
arch/sparc/kernel/auxio_64.c +1 -1
@@ -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" )) {
arch/sparc/kernel/central.c +2 -2
@@ -167,7 +167,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,
@@ -182,7 +182,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;
arch/sparc/kernel/chmc.c +5 -5
@@ -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;
arch/sparc/kernel/ioport.c +1 -1
@@ -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;
arch/sparc/kernel/of_device_32.c +7 -7
@@ -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; } }
arch/sparc/kernel/of_device_64.c +13 -13
@@ -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);
arch/sparc/kernel/of_device_common.c +2 -2
@@ -17,7 +17,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)
@@ -49,7 +49,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) {
arch/sparc/kernel/pci.c +3 -5
@@ -684,7 +684,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);
@@ -1152,15 +1152,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);
arch/sparc/kernel/pci_common.c +5 -4
@@ -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 );
@@ -389,7 +390,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",
arch/sparc/kernel/pci_fire.c +2 -2
@@ -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;
arch/sparc/kernel/pci_msi.c +9 -9
@@ -323,7 +323,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;
@@ -346,16 +346,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;
@@ -363,27 +363,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;
arch/sparc/kernel/pci_psycho.c +2 -2
@@ -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;
arch/sparc/kernel/pci_sabre.c +2 -2
@@ -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;
arch/sparc/kernel/pci_schizo.c +7 -7
@@ -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;
arch/sparc/kernel/pci_sun4v.c +4 -4
@@ -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,
arch/sparc/kernel/power.c +2 -2
@@ -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" );
arch/sparc/kernel/psycho_common.c +1 -1
@@ -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 ;
arch/sparc/kernel/sbus.c +8 -8
@@ -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);
arch/sparc/kernel/time_32.c +1 -1
@@ -152,7 +152,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)
arch/sparc/kernel/time_64.c +3 -3
@@ -423,7 +423,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.
@@ -479,7 +479,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);
@@ -533,7 +533,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.
PATCH 4/37 arch/sparc: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
arch/sparc/include/asm/floppy_64.h | 4 ++-- arch/sparc/include/asm/parport.h | 2 +- arch/sparc/kernel/auxio_64.c | 2 +- arch/sparc/kernel/central.c | 4 ++-- arch/sparc/kernel/chmc.c | 10 +++++----- arch/sparc/kernel/ioport.c | 2 +- arch/sparc/kernel/of_device_32.c | 14 +++++++------- arch/sparc/kernel/of_device_64.c | 26 +++++++++++++------------- arch/sparc/kernel/of_device_common.c | 4 ++-- arch/sparc/kernel/pci.c | 8 +++----- arch/sparc/kernel/pci_common.c | 9 +++++---- arch/sparc/kernel/pci_fire.c | 4 ++-- arch/sparc/kernel/pci_msi.c | 18 +++++++++--------- arch/sparc/kernel/pci_psycho.c | 4 ++-- arch/sparc/kernel/pci_sabre.c | 4 ++-- arch/sparc/kernel/pci_schizo.c | 14 +++++++------- arch/sparc/kernel/pci_sun4v.c | 8 ++++---- arch/sparc/kernel/power.c | 4 ++-- arch/sparc/kernel/psycho_common.c | 2 +- arch/sparc/kernel/sbus.c | 16 ++++++++-------- arch/sparc/kernel/time_32.c | 2 +- arch/sparc/kernel/time_64.c | 6 +++--- 22 files changed, 83 insertions(+), 84 deletions(-)
arch/sparc/include/asm/floppy_64.h +2 -2
@@ -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 ;
arch/sparc/include/asm/parport.h +1 -1
@@ -113,7 +113,7 @@ static int __devinit ecpp_probe(struct of_device *op, const struct of_device_idstruct 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,
arch/sparc/kernel/auxio_64.c +1 -1
@@ -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" )) {
arch/sparc/kernel/central.c +2 -2
@@ -167,7 +167,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,
@@ -182,7 +182,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;
arch/sparc/kernel/chmc.c +5 -5
@@ -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;
arch/sparc/kernel/ioport.c +1 -1
@@ -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;
arch/sparc/kernel/of_device_32.c +7 -7
@@ -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; } }
arch/sparc/kernel/of_device_64.c +13 -13
@@ -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);
arch/sparc/kernel/of_device_common.c +2 -2
@@ -17,7 +17,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)
@@ -49,7 +49,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) {
arch/sparc/kernel/pci.c +3 -5
@@ -684,7 +684,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);
@@ -1152,15 +1152,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);
arch/sparc/kernel/pci_common.c +5 -4
@@ -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 );
@@ -389,7 +390,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",
arch/sparc/kernel/pci_fire.c +2 -2
@@ -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;
arch/sparc/kernel/pci_msi.c +9 -9
@@ -323,7 +323,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;
@@ -346,16 +346,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;
@@ -363,27 +363,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;
arch/sparc/kernel/pci_psycho.c +2 -2
@@ -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;
arch/sparc/kernel/pci_sabre.c +2 -2
@@ -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;
arch/sparc/kernel/pci_schizo.c +7 -7
@@ -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;
arch/sparc/kernel/pci_sun4v.c +4 -4
@@ -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,
arch/sparc/kernel/power.c +2 -2
@@ -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" );
arch/sparc/kernel/psycho_common.c +1 -1
@@ -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 ;
arch/sparc/kernel/sbus.c +8 -8
@@ -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);
arch/sparc/kernel/time_32.c +1 -1
@@ -152,7 +152,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)
arch/sparc/kernel/time_64.c +3 -3
@@ -423,7 +423,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.
@@ -479,7 +479,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);
@@ -533,7 +533,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.
PATCH 4/37 arch/sparc: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
arch/sparc/include/asm/floppy_64.h | 4 ++-- arch/sparc/include/asm/parport.h | 2 +- arch/sparc/kernel/auxio_64.c | 2 +- arch/sparc/kernel/central.c | 4 ++-- arch/sparc/kernel/chmc.c | 10 +++++----- arch/sparc/kernel/ioport.c | 2 +- arch/sparc/kernel/of_device_32.c | 14 +++++++------- arch/sparc/kernel/of_device_64.c | 26 +++++++++++++------------- arch/sparc/kernel/of_device_common.c | 4 ++-- arch/sparc/kernel/pci.c | 8 +++----- arch/sparc/kernel/pci_common.c | 9 +++++---- arch/sparc/kernel/pci_fire.c | 4 ++-- arch/sparc/kernel/pci_msi.c | 18 +++++++++--------- arch/sparc/kernel/pci_psycho.c | 4 ++-- arch/sparc/kernel/pci_sabre.c | 4 ++-- arch/sparc/kernel/pci_schizo.c | 14 +++++++------- arch/sparc/kernel/pci_sun4v.c | 8 ++++---- arch/sparc/kernel/power.c | 4 ++-- arch/sparc/kernel/psycho_common.c | 2 +- arch/sparc/kernel/sbus.c | 16 ++++++++-------- arch/sparc/kernel/time_32.c | 2 +- arch/sparc/kernel/time_64.c | 6 +++--- 22 files changed, 83 insertions(+), 84 deletions(-)
arch/sparc/include/asm/floppy_64.h +2 -2
@@ -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 ;
arch/sparc/include/asm/parport.h +1 -1
@@ -113,7 +113,7 @@ static int __devinit ecpp_probe(struct of_device *op, const struct of_device_idstruct 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,
arch/sparc/kernel/auxio_64.c +1 -1
@@ -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" )) {
arch/sparc/kernel/central.c +2 -2
@@ -167,7 +167,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,
@@ -182,7 +182,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;
arch/sparc/kernel/chmc.c +5 -5
@@ -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;
arch/sparc/kernel/ioport.c +1 -1
@@ -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;
arch/sparc/kernel/of_device_32.c +7 -7
@@ -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; } }
arch/sparc/kernel/of_device_64.c +13 -13
@@ -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);
arch/sparc/kernel/of_device_common.c +2 -2
@@ -17,7 +17,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)
@@ -49,7 +49,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) {
arch/sparc/kernel/pci.c +3 -5
@@ -684,7 +684,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);
@@ -1152,15 +1152,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);
arch/sparc/kernel/pci_common.c +5 -4
@@ -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 );
@@ -389,7 +390,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",
arch/sparc/kernel/pci_fire.c +2 -2
@@ -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;
arch/sparc/kernel/pci_msi.c +9 -9
@@ -323,7 +323,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;
@@ -346,16 +346,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;
@@ -363,27 +363,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;
arch/sparc/kernel/pci_psycho.c +2 -2
@@ -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;
arch/sparc/kernel/pci_sabre.c +2 -2
@@ -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;
arch/sparc/kernel/pci_schizo.c +7 -7
@@ -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;
arch/sparc/kernel/pci_sun4v.c +4 -4
@@ -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,
arch/sparc/kernel/power.c +2 -2
@@ -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" );
arch/sparc/kernel/psycho_common.c +1 -1
@@ -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 ;
arch/sparc/kernel/sbus.c +8 -8
@@ -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);
arch/sparc/kernel/time_32.c +1 -1
@@ -152,7 +152,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)
arch/sparc/kernel/time_64.c +3 -3
@@ -423,7 +423,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.
@@ -479,7 +479,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);
@@ -533,7 +533,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.
PATCH 4/37 arch/sparc: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
arch/sparc/include/asm/floppy_64.h | 4 ++-- arch/sparc/include/asm/parport.h | 2 +- arch/sparc/kernel/auxio_64.c | 2 +- arch/sparc/kernel/central.c | 4 ++-- arch/sparc/kernel/chmc.c | 10 +++++----- arch/sparc/kernel/ioport.c | 2 +- arch/sparc/kernel/of_device_32.c | 14 +++++++------- arch/sparc/kernel/of_device_64.c | 26 +++++++++++++------------- arch/sparc/kernel/of_device_common.c | 4 ++-- arch/sparc/kernel/pci.c | 8 +++----- arch/sparc/kernel/pci_common.c | 9 +++++---- arch/sparc/kernel/pci_fire.c | 4 ++-- arch/sparc/kernel/pci_msi.c | 18 +++++++++--------- arch/sparc/kernel/pci_psycho.c | 4 ++-- arch/sparc/kernel/pci_sabre.c | 4 ++-- arch/sparc/kernel/pci_schizo.c | 14 +++++++------- arch/sparc/kernel/pci_sun4v.c | 8 ++++---- arch/sparc/kernel/power.c | 4 ++-- arch/sparc/kernel/psycho_common.c | 2 +- arch/sparc/kernel/sbus.c | 16 ++++++++-------- arch/sparc/kernel/time_32.c | 2 +- arch/sparc/kernel/time_64.c | 6 +++--- 22 files changed, 83 insertions(+), 84 deletions(-)
arch/sparc/include/asm/floppy_64.h +2 -2
@@ -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 ;
arch/sparc/include/asm/parport.h +1 -1
@@ -113,7 +113,7 @@ static int __devinit ecpp_probe(struct of_device *op, const struct of_device_idstruct 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,
arch/sparc/kernel/auxio_64.c +1 -1
@@ -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" )) {
arch/sparc/kernel/central.c +2 -2
@@ -167,7 +167,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,
@@ -182,7 +182,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;
arch/sparc/kernel/chmc.c +5 -5
@@ -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;
arch/sparc/kernel/ioport.c +1 -1
@@ -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;
arch/sparc/kernel/of_device_32.c +7 -7
@@ -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; } }
arch/sparc/kernel/of_device_64.c +13 -13
@@ -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);
arch/sparc/kernel/of_device_common.c +2 -2
@@ -17,7 +17,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)
@@ -49,7 +49,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) {
arch/sparc/kernel/pci.c +3 -5
@@ -684,7 +684,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);
@@ -1152,15 +1152,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);
arch/sparc/kernel/pci_common.c +5 -4
@@ -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 );
@@ -389,7 +390,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",
arch/sparc/kernel/pci_fire.c +2 -2
@@ -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;
arch/sparc/kernel/pci_msi.c +9 -9
@@ -323,7 +323,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;
@@ -346,16 +346,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;
@@ -363,27 +363,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;
arch/sparc/kernel/pci_psycho.c +2 -2
@@ -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;
arch/sparc/kernel/pci_sabre.c +2 -2
@@ -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;
arch/sparc/kernel/pci_schizo.c +7 -7
@@ -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;
arch/sparc/kernel/pci_sun4v.c +4 -4
@@ -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,
arch/sparc/kernel/power.c +2 -2
@@ -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" );
arch/sparc/kernel/psycho_common.c +1 -1
@@ -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 ;
arch/sparc/kernel/sbus.c +8 -8
@@ -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);
arch/sparc/kernel/time_32.c +1 -1
@@ -152,7 +152,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)
arch/sparc/kernel/time_64.c +3 -3
@@ -423,7 +423,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.
@@ -479,7 +479,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);
@@ -533,7 +533,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.
PATCH 5/37 arch/powerpc: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
arch/powerpc/include/asm/macio.h | 2 +- arch/powerpc/kernel/ibmebus.c | 4 ++-- arch/powerpc/kernel/of_device.c | 8 ++++---- arch/powerpc/kernel/of_platform.c | 16 ++++++++-------- arch/powerpc/platforms/52xx/mpc52xx_gpio.c | 4 ++-- arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 16 ++++++++-------- arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | 6 +++--- arch/powerpc/platforms/82xx/ep8248e.c | 6 +++--- arch/powerpc/platforms/83xx/suspend.c | 2 +- arch/powerpc/platforms/cell/axon_msi.c | 2 +- arch/powerpc/platforms/pasemi/gpio_mdio.c | 2 +- arch/powerpc/sysdev/axonram.c | 6 +++--- arch/powerpc/sysdev/bestcomm/bestcomm.c | 8 ++++---- arch/powerpc/sysdev/fsl_msi.c | 14 +++++++------- arch/powerpc/sysdev/fsl_pmc.c | 2 +- arch/powerpc/sysdev/pmi.c | 2 +- 16 files changed, 50 insertions(+), 50 deletions(-)
arch/powerpc/include/asm/macio.h +1 -1
@@ -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
arch/powerpc/kernel/ibmebus.c +2 -2
@@ -139,14 +139,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)
arch/powerpc/kernel/of_device.c +4 -4
@@ -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;
@@ -96,17 +96,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 ;
arch/powerpc/kernel/of_platform.c +8 -8
@@ -196,7 +196,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)
@@ -214,7 +214,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)
@@ -247,10 +247,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 ;
@@ -264,19 +264,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 ;
arch/powerpc/platforms/52xx/mpc52xx_gpio.c +2 -2
@@ -167,7 +167,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;
@@ -328,7 +328,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;
arch/powerpc/platforms/52xx/mpc52xx_gpt.c +8 -8
@@ -729,8 +729,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 ;
@@ -738,21 +738,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;
arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c +3 -3
@@ -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 ;
arch/powerpc/platforms/82xx/ep8248e.c +3 -3
@@ -118,12 +118,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;
@@ -141,7 +141,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;
arch/powerpc/platforms/83xx/suspend.c +1 -1
@@ -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 ;
arch/powerpc/platforms/cell/axon_msi.c +1 -1
@@ -344,7 +344,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;
arch/powerpc/platforms/pasemi/gpio_mdio.c +1 -1
@@ -219,7 +219,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;
arch/powerpc/sysdev/axonram.c +3 -3
@@ -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 ;
arch/powerpc/sysdev/bestcomm/bestcomm.c +4 -4
@@ -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" );
arch/powerpc/sysdev/fsl_msi.c +7 -7
@@ -248,7 +248,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 ) {
@@ -258,10 +258,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; }
@@ -284,16 +284,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; }
@@ -302,7 +302,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);
arch/powerpc/sysdev/fsl_pmc.c +1 -1
@@ -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 ;
arch/powerpc/sysdev/pmi.c +1 -1
@@ -123,7 +123,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) {
PATCH 5/37 arch/powerpc: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
arch/powerpc/include/asm/macio.h | 2 +- arch/powerpc/kernel/ibmebus.c | 4 ++-- arch/powerpc/kernel/of_device.c | 8 ++++---- arch/powerpc/kernel/of_platform.c | 16 ++++++++-------- arch/powerpc/platforms/52xx/mpc52xx_gpio.c | 4 ++-- arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 16 ++++++++-------- arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | 6 +++--- arch/powerpc/platforms/82xx/ep8248e.c | 6 +++--- arch/powerpc/platforms/83xx/suspend.c | 2 +- arch/powerpc/platforms/cell/axon_msi.c | 2 +- arch/powerpc/platforms/pasemi/gpio_mdio.c | 2 +- arch/powerpc/sysdev/axonram.c | 6 +++--- arch/powerpc/sysdev/bestcomm/bestcomm.c | 8 ++++---- arch/powerpc/sysdev/fsl_msi.c | 14 +++++++------- arch/powerpc/sysdev/fsl_pmc.c | 2 +- arch/powerpc/sysdev/pmi.c | 2 +- 16 files changed, 50 insertions(+), 50 deletions(-)
arch/powerpc/include/asm/macio.h +1 -1
@@ -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
arch/powerpc/kernel/ibmebus.c +2 -2
@@ -139,14 +139,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)
arch/powerpc/kernel/of_device.c +4 -4
@@ -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;
@@ -96,17 +96,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 ;
arch/powerpc/kernel/of_platform.c +8 -8
@@ -196,7 +196,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)
@@ -214,7 +214,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)
@@ -247,10 +247,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 ;
@@ -264,19 +264,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 ;
arch/powerpc/platforms/52xx/mpc52xx_gpio.c +2 -2
@@ -167,7 +167,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;
@@ -328,7 +328,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;
arch/powerpc/platforms/52xx/mpc52xx_gpt.c +8 -8
@@ -729,8 +729,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 ;
@@ -738,21 +738,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;
arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c +3 -3
@@ -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 ;
arch/powerpc/platforms/82xx/ep8248e.c +3 -3
@@ -118,12 +118,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;
@@ -141,7 +141,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;
arch/powerpc/platforms/83xx/suspend.c +1 -1
@@ -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 ;
arch/powerpc/platforms/cell/axon_msi.c +1 -1
@@ -344,7 +344,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;
arch/powerpc/platforms/pasemi/gpio_mdio.c +1 -1
@@ -219,7 +219,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;
arch/powerpc/sysdev/axonram.c +3 -3
@@ -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 ;
arch/powerpc/sysdev/bestcomm/bestcomm.c +4 -4
@@ -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" );
arch/powerpc/sysdev/fsl_msi.c +7 -7
@@ -248,7 +248,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 ) {
@@ -258,10 +258,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; }
@@ -284,16 +284,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; }
@@ -302,7 +302,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);
arch/powerpc/sysdev/fsl_pmc.c +1 -1
@@ -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 ;
arch/powerpc/sysdev/pmi.c +1 -1
@@ -123,7 +123,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) {
PATCH 5/37 arch/powerpc: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
arch/powerpc/include/asm/macio.h | 2 +- arch/powerpc/kernel/ibmebus.c | 4 ++-- arch/powerpc/kernel/of_device.c | 8 ++++---- arch/powerpc/kernel/of_platform.c | 16 ++++++++-------- arch/powerpc/platforms/52xx/mpc52xx_gpio.c | 4 ++-- arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 16 ++++++++-------- arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | 6 +++--- arch/powerpc/platforms/82xx/ep8248e.c | 6 +++--- arch/powerpc/platforms/83xx/suspend.c | 2 +- arch/powerpc/platforms/cell/axon_msi.c | 2 +- arch/powerpc/platforms/pasemi/gpio_mdio.c | 2 +- arch/powerpc/sysdev/axonram.c | 6 +++--- arch/powerpc/sysdev/bestcomm/bestcomm.c | 8 ++++---- arch/powerpc/sysdev/fsl_msi.c | 14 +++++++------- arch/powerpc/sysdev/fsl_pmc.c | 2 +- arch/powerpc/sysdev/pmi.c | 2 +- 16 files changed, 50 insertions(+), 50 deletions(-)
arch/powerpc/include/asm/macio.h +1 -1
@@ -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
arch/powerpc/kernel/ibmebus.c +2 -2
@@ -139,14 +139,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)
arch/powerpc/kernel/of_device.c +4 -4
@@ -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;
@@ -96,17 +96,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 ;
arch/powerpc/kernel/of_platform.c +8 -8
@@ -196,7 +196,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)
@@ -214,7 +214,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)
@@ -247,10 +247,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 ;
@@ -264,19 +264,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 ;
arch/powerpc/platforms/52xx/mpc52xx_gpio.c +2 -2
@@ -167,7 +167,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;
@@ -328,7 +328,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;
arch/powerpc/platforms/52xx/mpc52xx_gpt.c +8 -8
@@ -729,8 +729,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 ;
@@ -738,21 +738,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;
arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c +3 -3
@@ -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 ;
arch/powerpc/platforms/82xx/ep8248e.c +3 -3
@@ -118,12 +118,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;
@@ -141,7 +141,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;
arch/powerpc/platforms/83xx/suspend.c +1 -1
@@ -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 ;
arch/powerpc/platforms/cell/axon_msi.c +1 -1
@@ -344,7 +344,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;
arch/powerpc/platforms/pasemi/gpio_mdio.c +1 -1
@@ -219,7 +219,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;
arch/powerpc/sysdev/axonram.c +3 -3
@@ -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 ;
arch/powerpc/sysdev/bestcomm/bestcomm.c +4 -4
@@ -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" );
arch/powerpc/sysdev/fsl_msi.c +7 -7
@@ -248,7 +248,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 ) {
@@ -258,10 +258,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; }
@@ -284,16 +284,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; }
@@ -302,7 +302,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);
arch/powerpc/sysdev/fsl_pmc.c +1 -1
@@ -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 ;
arch/powerpc/sysdev/pmi.c +1 -1
@@ -123,7 +123,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) {
PATCH 5/37 arch/powerpc: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
arch/powerpc/include/asm/macio.h | 2 +- arch/powerpc/kernel/ibmebus.c | 4 ++-- arch/powerpc/kernel/of_device.c | 8 ++++---- arch/powerpc/kernel/of_platform.c | 16 ++++++++-------- arch/powerpc/platforms/52xx/mpc52xx_gpio.c | 4 ++-- arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 16 ++++++++-------- arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | 6 +++--- arch/powerpc/platforms/82xx/ep8248e.c | 6 +++--- arch/powerpc/platforms/83xx/suspend.c | 2 +- arch/powerpc/platforms/cell/axon_msi.c | 2 +- arch/powerpc/platforms/pasemi/gpio_mdio.c | 2 +- arch/powerpc/sysdev/axonram.c | 6 +++--- arch/powerpc/sysdev/bestcomm/bestcomm.c | 8 ++++---- arch/powerpc/sysdev/fsl_msi.c | 14 +++++++------- arch/powerpc/sysdev/fsl_pmc.c | 2 +- arch/powerpc/sysdev/pmi.c | 2 +- 16 files changed, 50 insertions(+), 50 deletions(-)
arch/powerpc/include/asm/macio.h +1 -1
@@ -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
arch/powerpc/kernel/ibmebus.c +2 -2
@@ -139,14 +139,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)
arch/powerpc/kernel/of_device.c +4 -4
@@ -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;
@@ -96,17 +96,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 ;
arch/powerpc/kernel/of_platform.c +8 -8
@@ -196,7 +196,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)
@@ -214,7 +214,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)
@@ -247,10 +247,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 ;
@@ -264,19 +264,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 ;
arch/powerpc/platforms/52xx/mpc52xx_gpio.c +2 -2
@@ -167,7 +167,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;
@@ -328,7 +328,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;
arch/powerpc/platforms/52xx/mpc52xx_gpt.c +8 -8
@@ -729,8 +729,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 ;
@@ -738,21 +738,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;
arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c +3 -3
@@ -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 ;
arch/powerpc/platforms/82xx/ep8248e.c +3 -3
@@ -118,12 +118,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;
@@ -141,7 +141,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;
arch/powerpc/platforms/83xx/suspend.c +1 -1
@@ -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 ;
arch/powerpc/platforms/cell/axon_msi.c +1 -1
@@ -344,7 +344,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;
arch/powerpc/platforms/pasemi/gpio_mdio.c +1 -1
@@ -219,7 +219,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;
arch/powerpc/sysdev/axonram.c +3 -3
@@ -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 ;
arch/powerpc/sysdev/bestcomm/bestcomm.c +4 -4
@@ -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" );
arch/powerpc/sysdev/fsl_msi.c +7 -7
@@ -248,7 +248,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 ) {
@@ -258,10 +258,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; }
@@ -284,16 +284,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; }
@@ -302,7 +302,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);
arch/powerpc/sysdev/fsl_pmc.c +1 -1
@@ -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 ;
arch/powerpc/sysdev/pmi.c +1 -1
@@ -123,7 +123,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) {
PATCH 5/37 arch/powerpc: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
arch/powerpc/include/asm/macio.h | 2 +- arch/powerpc/kernel/ibmebus.c | 4 ++-- arch/powerpc/kernel/of_device.c | 8 ++++---- arch/powerpc/kernel/of_platform.c | 16 ++++++++-------- arch/powerpc/platforms/52xx/mpc52xx_gpio.c | 4 ++-- arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 16 ++++++++-------- arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | 6 +++--- arch/powerpc/platforms/82xx/ep8248e.c | 6 +++--- arch/powerpc/platforms/83xx/suspend.c | 2 +- arch/powerpc/platforms/cell/axon_msi.c | 2 +- arch/powerpc/platforms/pasemi/gpio_mdio.c | 2 +- arch/powerpc/sysdev/axonram.c | 6 +++--- arch/powerpc/sysdev/bestcomm/bestcomm.c | 8 ++++---- arch/powerpc/sysdev/fsl_msi.c | 14 +++++++------- arch/powerpc/sysdev/fsl_pmc.c | 2 +- arch/powerpc/sysdev/pmi.c | 2 +- 16 files changed, 50 insertions(+), 50 deletions(-)
arch/powerpc/include/asm/macio.h +1 -1
@@ -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
arch/powerpc/kernel/ibmebus.c +2 -2
@@ -139,14 +139,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)
arch/powerpc/kernel/of_device.c +4 -4
@@ -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;
@@ -96,17 +96,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 ;
arch/powerpc/kernel/of_platform.c +8 -8
@@ -196,7 +196,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)
@@ -214,7 +214,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)
@@ -247,10 +247,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 ;
@@ -264,19 +264,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 ;
arch/powerpc/platforms/52xx/mpc52xx_gpio.c +2 -2
@@ -167,7 +167,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;
@@ -328,7 +328,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;
arch/powerpc/platforms/52xx/mpc52xx_gpt.c +8 -8
@@ -729,8 +729,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 ;
@@ -738,21 +738,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;
arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c +3 -3
@@ -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 ;
arch/powerpc/platforms/82xx/ep8248e.c +3 -3
@@ -118,12 +118,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;
@@ -141,7 +141,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;
arch/powerpc/platforms/83xx/suspend.c +1 -1
@@ -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 ;
arch/powerpc/platforms/cell/axon_msi.c +1 -1
@@ -344,7 +344,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;
arch/powerpc/platforms/pasemi/gpio_mdio.c +1 -1
@@ -219,7 +219,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;
arch/powerpc/sysdev/axonram.c +3 -3
@@ -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 ;
arch/powerpc/sysdev/bestcomm/bestcomm.c +4 -4
@@ -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" );
arch/powerpc/sysdev/fsl_msi.c +7 -7
@@ -248,7 +248,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 ) {
@@ -258,10 +258,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; }
@@ -284,16 +284,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; }
@@ -302,7 +302,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);
arch/powerpc/sysdev/fsl_pmc.c +1 -1
@@ -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 ;
arch/powerpc/sysdev/pmi.c +1 -1
@@ -123,7 +123,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) {
PATCH 5/37 arch/powerpc: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
arch/powerpc/include/asm/macio.h | 2 +- arch/powerpc/kernel/ibmebus.c | 4 ++-- arch/powerpc/kernel/of_device.c | 8 ++++---- arch/powerpc/kernel/of_platform.c | 16 ++++++++-------- arch/powerpc/platforms/52xx/mpc52xx_gpio.c | 4 ++-- arch/powerpc/platforms/52xx/mpc52xx_gpt.c | 16 ++++++++-------- arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c | 6 +++--- arch/powerpc/platforms/82xx/ep8248e.c | 6 +++--- arch/powerpc/platforms/83xx/suspend.c | 2 +- arch/powerpc/platforms/cell/axon_msi.c | 2 +- arch/powerpc/platforms/pasemi/gpio_mdio.c | 2 +- arch/powerpc/sysdev/axonram.c | 6 +++--- arch/powerpc/sysdev/bestcomm/bestcomm.c | 8 ++++---- arch/powerpc/sysdev/fsl_msi.c | 14 +++++++------- arch/powerpc/sysdev/fsl_pmc.c | 2 +- arch/powerpc/sysdev/pmi.c | 2 +- 16 files changed, 50 insertions(+), 50 deletions(-)
arch/powerpc/include/asm/macio.h +1 -1
@@ -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
arch/powerpc/kernel/ibmebus.c +2 -2
@@ -139,14 +139,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)
arch/powerpc/kernel/of_device.c +4 -4
@@ -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;
@@ -96,17 +96,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 ;
arch/powerpc/kernel/of_platform.c +8 -8
@@ -196,7 +196,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)
@@ -214,7 +214,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)
@@ -247,10 +247,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 ;
@@ -264,19 +264,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 ;
arch/powerpc/platforms/52xx/mpc52xx_gpio.c +2 -2
@@ -167,7 +167,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;
@@ -328,7 +328,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;
arch/powerpc/platforms/52xx/mpc52xx_gpt.c +8 -8
@@ -729,8 +729,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 ;
@@ -738,21 +738,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;
arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c +3 -3
@@ -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 ;
arch/powerpc/platforms/82xx/ep8248e.c +3 -3
@@ -118,12 +118,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;
@@ -141,7 +141,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;
arch/powerpc/platforms/83xx/suspend.c +1 -1
@@ -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 ;
arch/powerpc/platforms/cell/axon_msi.c +1 -1
@@ -344,7 +344,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;
arch/powerpc/platforms/pasemi/gpio_mdio.c +1 -1
@@ -219,7 +219,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;
arch/powerpc/sysdev/axonram.c +3 -3
@@ -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 ;
arch/powerpc/sysdev/bestcomm/bestcomm.c +4 -4
@@ -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" );
arch/powerpc/sysdev/fsl_msi.c +7 -7
@@ -248,7 +248,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 ) {
@@ -258,10 +258,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; }
@@ -284,16 +284,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; }
@@ -302,7 +302,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);
arch/powerpc/sysdev/fsl_pmc.c +1 -1
@@ -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 ;
arch/powerpc/sysdev/pmi.c +1 -1
@@ -123,7 +123,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) {
PATCH 6/37 arch/microblaze: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
arch/microblaze/kernel/of_device.c | 8 ++++---- arch/microblaze/kernel/of_platform.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
arch/microblaze/kernel/of_device.c +4 -4
@@ -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;
@@ -76,17 +76,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 ;
arch/microblaze/kernel/of_platform.c +2 -2
@@ -167,7 +167,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)
@@ -185,7 +185,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)
PATCH 6/37 arch/microblaze: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
arch/microblaze/kernel/of_device.c | 8 ++++---- arch/microblaze/kernel/of_platform.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
arch/microblaze/kernel/of_device.c +4 -4
@@ -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;
@@ -76,17 +76,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 ;
arch/microblaze/kernel/of_platform.c +2 -2
@@ -167,7 +167,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)
@@ -185,7 +185,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)
PATCH 6/37 arch/microblaze: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
arch/microblaze/kernel/of_device.c | 8 ++++---- arch/microblaze/kernel/of_platform.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
arch/microblaze/kernel/of_device.c +4 -4
@@ -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;
@@ -76,17 +76,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 ;
arch/microblaze/kernel/of_platform.c +2 -2
@@ -167,7 +167,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)
@@ -185,7 +185,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)
PATCH 6/37 arch/microblaze: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
arch/microblaze/kernel/of_device.c | 8 ++++---- arch/microblaze/kernel/of_platform.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
arch/microblaze/kernel/of_device.c +4 -4
@@ -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;
@@ -76,17 +76,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 ;
arch/microblaze/kernel/of_platform.c +2 -2
@@ -167,7 +167,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)
@@ -185,7 +185,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)
PATCH 6/37 arch/microblaze: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
arch/microblaze/kernel/of_device.c | 8 ++++---- arch/microblaze/kernel/of_platform.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
arch/microblaze/kernel/of_device.c +4 -4
@@ -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;
@@ -76,17 +76,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 ;
arch/microblaze/kernel/of_platform.c +2 -2
@@ -167,7 +167,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)
@@ -185,7 +185,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)
PATCH 7/37 drivers/serial: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/serial/mpc52xx_uart.c | 8 ++++---- drivers/serial/sunsu.c | 6 +++--- drivers/serial/sunzilog.c | 8 ++++---- drivers/serial/uartlite.c | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-)
drivers/serial/mpc52xx_uart.c +4 -4
@@ -1328,14 +1328,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 ;
@@ -1355,7 +1355,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;
@@ -1365,7 +1365,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 ;
drivers/serial/sunsu.c +3 -3
@@ -1199,7 +1199,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);
@@ -1351,7 +1351,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;
@@ -1408,7 +1408,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;
drivers/serial/sunzilog.c +4 -4
@@ -1180,7 +1180,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.
@@ -1358,7 +1358,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *mint 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 */
@@ -1415,7 +1415,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *msunzilog_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 ;
@@ -1425,7 +1425,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 ;
drivers/serial/uartlite.c +3 -3
@@ -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+3 , irq); }
PATCH 7/37 drivers/serial: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/serial/mpc52xx_uart.c | 8 ++++---- drivers/serial/sunsu.c | 6 +++--- drivers/serial/sunzilog.c | 8 ++++---- drivers/serial/uartlite.c | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-)
drivers/serial/mpc52xx_uart.c +4 -4
@@ -1328,14 +1328,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 ;
@@ -1355,7 +1355,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;
@@ -1365,7 +1365,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 ;
drivers/serial/sunsu.c +3 -3
@@ -1199,7 +1199,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);
@@ -1351,7 +1351,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;
@@ -1408,7 +1408,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;
drivers/serial/sunzilog.c +4 -4
@@ -1180,7 +1180,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.
@@ -1358,7 +1358,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *mint 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 */
@@ -1415,7 +1415,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *msunzilog_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 ;
@@ -1425,7 +1425,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 ;
drivers/serial/uartlite.c +3 -3
@@ -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+3 , irq); }
PATCH 6/37 arch/microblaze: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
arch/microblaze/kernel/of_device.c | 8 ++++---- arch/microblaze/kernel/of_platform.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
arch/microblaze/kernel/of_device.c +4 -4
@@ -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;
@@ -76,17 +76,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 ;
arch/microblaze/kernel/of_platform.c +2 -2
@@ -167,7 +167,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)
@@ -185,7 +185,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)
PATCH 6/37 arch/microblaze: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
arch/microblaze/kernel/of_device.c | 8 ++++---- arch/microblaze/kernel/of_platform.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
arch/microblaze/kernel/of_device.c +4 -4
@@ -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;
@@ -76,17 +76,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 ;
arch/microblaze/kernel/of_platform.c +2 -2
@@ -167,7 +167,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)
@@ -185,7 +185,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)
PATCH 7/37 drivers/serial: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/serial/mpc52xx_uart.c | 8 ++++---- drivers/serial/sunsu.c | 6 +++--- drivers/serial/sunzilog.c | 8 ++++---- drivers/serial/uartlite.c | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-)
drivers/serial/mpc52xx_uart.c +4 -4
@@ -1328,14 +1328,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 ;
@@ -1355,7 +1355,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;
@@ -1365,7 +1365,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 ;
drivers/serial/sunsu.c +3 -3
@@ -1199,7 +1199,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);
@@ -1351,7 +1351,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;
@@ -1408,7 +1408,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;
drivers/serial/sunzilog.c +4 -4
@@ -1180,7 +1180,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.
@@ -1358,7 +1358,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *mint 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 */
@@ -1415,7 +1415,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *msunzilog_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 ;
@@ -1425,7 +1425,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 ;
drivers/serial/uartlite.c +3 -3
@@ -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+3 , irq); }
PATCH 7/37 drivers/serial: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/serial/mpc52xx_uart.c | 8 ++++---- drivers/serial/sunsu.c | 6 +++--- drivers/serial/sunzilog.c | 8 ++++---- drivers/serial/uartlite.c | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-)
drivers/serial/mpc52xx_uart.c +4 -4
@@ -1328,14 +1328,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 ;
@@ -1355,7 +1355,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;
@@ -1365,7 +1365,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 ;
drivers/serial/sunsu.c +3 -3
@@ -1199,7 +1199,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);
@@ -1351,7 +1351,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;
@@ -1408,7 +1408,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;
drivers/serial/sunzilog.c +4 -4
@@ -1180,7 +1180,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.
@@ -1358,7 +1358,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *mint 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 */
@@ -1415,7 +1415,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *msunzilog_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 ;
@@ -1425,7 +1425,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 ;
drivers/serial/uartlite.c +3 -3
@@ -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+3 , irq); }
PATCH 7/37 drivers/serial: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/serial/mpc52xx_uart.c | 8 ++++---- drivers/serial/sunsu.c | 6 +++--- drivers/serial/sunzilog.c | 8 ++++---- drivers/serial/uartlite.c | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-)
drivers/serial/mpc52xx_uart.c +4 -4
@@ -1328,14 +1328,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 ;
@@ -1355,7 +1355,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;
@@ -1365,7 +1365,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 ;
drivers/serial/sunsu.c +3 -3
@@ -1199,7 +1199,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);
@@ -1351,7 +1351,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;
@@ -1408,7 +1408,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;
drivers/serial/sunzilog.c +4 -4
@@ -1180,7 +1180,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.
@@ -1358,7 +1358,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *mint 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 */
@@ -1415,7 +1415,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *msunzilog_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 ;
@@ -1425,7 +1425,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 ;
drivers/serial/uartlite.c +3 -3
@@ -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+3 , irq); }
PATCH 7/37 drivers/serial: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/serial/mpc52xx_uart.c | 8 ++++---- drivers/serial/sunsu.c | 6 +++--- drivers/serial/sunzilog.c | 8 ++++---- drivers/serial/uartlite.c | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-)
drivers/serial/mpc52xx_uart.c +4 -4
@@ -1328,14 +1328,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 ;
@@ -1355,7 +1355,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;
@@ -1365,7 +1365,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 ;
drivers/serial/sunsu.c +3 -3
@@ -1199,7 +1199,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);
@@ -1351,7 +1351,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;
@@ -1408,7 +1408,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;
drivers/serial/sunzilog.c +4 -4
@@ -1180,7 +1180,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.
@@ -1358,7 +1358,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *mint 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 */
@@ -1415,7 +1415,7 @@ static int __devinit zs_probe(struct of_device *op, const struct of_device_id *msunzilog_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 ;
@@ -1425,7 +1425,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 ;
drivers/serial/uartlite.c +3 -3
@@ -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+3 , irq); }
PATCH 8/37 drivers/watchdog: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/watchdog/cpwd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/watchdog/cpwd.c +1 -1
@@ -576,7 +576,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)
PATCH 8/37 drivers/watchdog: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/watchdog/cpwd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/watchdog/cpwd.c +1 -1
@@ -576,7 +576,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)
PATCH 8/37 drivers/watchdog: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/watchdog/cpwd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/watchdog/cpwd.c +1 -1
@@ -576,7 +576,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)
PATCH 8/37 drivers/watchdog: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/watchdog/cpwd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/watchdog/cpwd.c +1 -1
@@ -576,7 +576,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)
PATCH 8/37 drivers/watchdog: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/watchdog/cpwd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/watchdog/cpwd.c +1 -1
@@ -576,7 +576,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)
PATCH 8/37 drivers/watchdog: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/watchdog/cpwd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/watchdog/cpwd.c +1 -1
@@ -576,7 +576,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)
PATCH 8/37 drivers/watchdog: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/watchdog/cpwd.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/watchdog/cpwd.c +1 -1
@@ -576,7 +576,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)
PATCH 9/37 drivers/atm: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/atm/fore200e.c | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-)
drivers/atm/fore200e.c +9 -7
@@ -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 */
PATCH 9/37 drivers/atm: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/atm/fore200e.c | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-)
drivers/atm/fore200e.c +9 -7
@@ -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 */
PATCH 9/37 drivers/atm: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/atm/fore200e.c | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-)
drivers/atm/fore200e.c +9 -7
@@ -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 */
PATCH 9/37 drivers/atm: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/atm/fore200e.c | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-)
drivers/atm/fore200e.c +9 -7
@@ -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 */
PATCH 10/37 drivers/video: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/video/cg6.c | 2 +- drivers/video/ffb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/video/cg6.c +1 -1
@@ -741,7 +741,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;
drivers/video/ffb.c +1 -1
@@ -897,7 +897,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;
PATCH 10/37 drivers/video: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/video/cg6.c | 2 +- drivers/video/ffb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/video/cg6.c +1 -1
@@ -741,7 +741,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;
drivers/video/ffb.c +1 -1
@@ -897,7 +897,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;
PATCH 9/37 drivers/atm: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/atm/fore200e.c | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-)
drivers/atm/fore200e.c +9 -7
@@ -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 */
PATCH 11/37 drivers/scsi: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/scsi/qlogicpti.c | 10 +++++----- drivers/scsi/sun_esp.c | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-)
drivers/scsi/qlogicpti.c +5 -5
@@ -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 )
drivers/scsi/sun_esp.c +8 -8
@@ -124,7 +124,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;
@@ -133,7 +133,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:
@@ -146,7 +146,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
@@ -159,7 +159,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 );
@@ -171,12 +171,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 )
@@ -564,7 +564,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 ;
@@ -573,7 +573,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)
PATCH 11/37 drivers/scsi: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/scsi/qlogicpti.c | 10 +++++----- drivers/scsi/sun_esp.c | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-)
drivers/scsi/qlogicpti.c +5 -5
@@ -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 )
drivers/scsi/sun_esp.c +8 -8
@@ -124,7 +124,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;
@@ -133,7 +133,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:
@@ -146,7 +146,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
@@ -159,7 +159,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 );
@@ -171,12 +171,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 )
@@ -564,7 +564,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 ;
@@ -573,7 +573,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)
PATCH 9/37 drivers/atm: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/atm/fore200e.c | 16 +++++++++------- 1 files changed, 9 insertions(+), 7 deletions(-)
drivers/atm/fore200e.c +9 -7
@@ -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 */
PATCH 10/37 drivers/video: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/video/cg6.c | 2 +- drivers/video/ffb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/video/cg6.c +1 -1
@@ -741,7 +741,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;
drivers/video/ffb.c +1 -1
@@ -897,7 +897,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;
PATCH 10/37 drivers/video: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/video/cg6.c | 2 +- drivers/video/ffb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/video/cg6.c +1 -1
@@ -741,7 +741,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;
drivers/video/ffb.c +1 -1
@@ -897,7 +897,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;
PATCH 10/37 drivers/video: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/video/cg6.c | 2 +- drivers/video/ffb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/video/cg6.c +1 -1
@@ -741,7 +741,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;
drivers/video/ffb.c +1 -1
@@ -897,7 +897,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;
PATCH 10/37 drivers/video: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/video/cg6.c | 2 +- drivers/video/ffb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/video/cg6.c +1 -1
@@ -741,7 +741,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;
drivers/video/ffb.c +1 -1
@@ -897,7 +897,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;
PATCH 11/37 drivers/scsi: use .dev.of_node instead of .node in struct of_device
In reply to Grant Likely.node is being removed
---
drivers/scsi/qlogicpti.c | 10 +++++----- drivers/scsi/sun_esp.c | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-)
drivers/scsi/qlogicpti.c +5 -5
@@ -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 )
drivers/scsi/sun_esp.c +8 -8
@@ -124,7 +124,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;
@@ -133,7 +133,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:
@@ -146,7 +146,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
@@ -159,7 +159,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 );
@@ -171,12 +171,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 )
@@ -564,7 +564,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 ;
@@ -573,7 +573,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)