aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ehea
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2010-04-13 19:12:29 -0400
committerGrant Likely <grant.likely@secretlab.ca>2010-05-18 18:10:44 -0400
commit61c7a080a5a061c976988fd4b844dfb468dda255 (patch)
tree8cb492b73f2755c38a6164d770da34d5af6486a0 /drivers/net/ehea
parentd12d42f744f805a9ccc33cd76f04b237cd83ce56 (diff)
of: Always use 'struct device.of_node' to get device node pointer.
The following structure elements duplicate the information in 'struct device.of_node' and so are being eliminated. This patch makes all readers of these elements use device.of_node instead. (struct of_device *)->node (struct dev_archdata *)->prom_node (sparc) (struct dev_archdata *)->of_node (powerpc & microblaze) Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/net/ehea')
-rw-r--r--drivers/net/ehea/ehea_main.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index 809ccc9ff09c..59dac232006c 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -3035,7 +3035,7 @@ static DEVICE_ATTR(log_port_id, S_IRUSR | S_IRGRP | S_IROTH, ehea_show_port_id,
3035static void __devinit logical_port_release(struct device *dev) 3035static void __devinit logical_port_release(struct device *dev)
3036{ 3036{
3037 struct ehea_port *port = container_of(dev, struct ehea_port, ofdev.dev); 3037 struct ehea_port *port = container_of(dev, struct ehea_port, ofdev.dev);
3038 of_node_put(port->ofdev.node); 3038 of_node_put(port->ofdev.dev.of_node);
3039} 3039}
3040 3040
3041static struct device *ehea_register_port(struct ehea_port *port, 3041static struct device *ehea_register_port(struct ehea_port *port,
@@ -3043,7 +3043,7 @@ static struct device *ehea_register_port(struct ehea_port *port,
3043{ 3043{
3044 int ret; 3044 int ret;
3045 3045
3046 port->ofdev.node = of_node_get(dn); 3046 port->ofdev.dev.of_node = of_node_get(dn);
3047 port->ofdev.dev.parent = &port->adapter->ofdev->dev; 3047 port->ofdev.dev.parent = &port->adapter->ofdev->dev;
3048 port->ofdev.dev.bus = &ibmebus_bus_type; 3048 port->ofdev.dev.bus = &ibmebus_bus_type;
3049 3049
@@ -3210,7 +3210,7 @@ static int ehea_setup_ports(struct ehea_adapter *adapter)
3210 const u32 *dn_log_port_id; 3210 const u32 *dn_log_port_id;
3211 int i = 0; 3211 int i = 0;
3212 3212
3213 lhea_dn = adapter->ofdev->node; 3213 lhea_dn = adapter->ofdev->dev.of_node;
3214 while ((eth_dn = of_get_next_child(lhea_dn, eth_dn))) { 3214 while ((eth_dn = of_get_next_child(lhea_dn, eth_dn))) {
3215 3215
3216 dn_log_port_id = of_get_property(eth_dn, "ibm,hea-port-no", 3216 dn_log_port_id = of_get_property(eth_dn, "ibm,hea-port-no",
@@ -3249,7 +3249,7 @@ static struct device_node *ehea_get_eth_dn(struct ehea_adapter *adapter,
3249 struct device_node *eth_dn = NULL; 3249 struct device_node *eth_dn = NULL;
3250 const u32 *dn_log_port_id; 3250 const u32 *dn_log_port_id;
3251 3251
3252 lhea_dn = adapter->ofdev->node; 3252 lhea_dn = adapter->ofdev->dev.of_node;
3253 while ((eth_dn = of_get_next_child(lhea_dn, eth_dn))) { 3253 while ((eth_dn = of_get_next_child(lhea_dn, eth_dn))) {
3254 3254
3255 dn_log_port_id = of_get_property(eth_dn, "ibm,hea-port-no", 3255 dn_log_port_id = of_get_property(eth_dn, "ibm,hea-port-no",
@@ -3379,7 +3379,7 @@ static int __devinit ehea_probe_adapter(struct of_device *dev,
3379 const u64 *adapter_handle; 3379 const u64 *adapter_handle;
3380 int ret; 3380 int ret;
3381 3381
3382 if (!dev || !dev->node) { 3382 if (!dev || !dev->dev.of_node) {
3383 ehea_error("Invalid ibmebus device probed"); 3383 ehea_error("Invalid ibmebus device probed");
3384 return -EINVAL; 3384 return -EINVAL;
3385 } 3385 }
@@ -3395,14 +3395,14 @@ static int __devinit ehea_probe_adapter(struct of_device *dev,
3395 3395
3396 adapter->ofdev = dev; 3396 adapter->ofdev = dev;
3397 3397
3398 adapter_handle = of_get_property(dev->node, "ibm,hea-handle", 3398 adapter_handle = of_get_property(dev->dev.of_node, "ibm,hea-handle",
3399 NULL); 3399 NULL);
3400 if (adapter_handle) 3400 if (adapter_handle)
3401 adapter->handle = *adapter_handle; 3401 adapter->handle = *adapter_handle;
3402 3402
3403 if (!adapter->handle) { 3403 if (!adapter->handle) {
3404 dev_err(&dev->dev, "failed getting handle for adapter" 3404 dev_err(&dev->dev, "failed getting handle for adapter"
3405 " '%s'\n", dev->node->full_name); 3405 " '%s'\n", dev->dev.of_node->full_name);
3406 ret = -ENODEV; 3406 ret = -ENODEV;
3407 goto out_free_ad; 3407 goto out_free_ad;
3408 } 3408 }