diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-04-13 19:12:29 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-05-18 18:10:44 -0400 |
commit | 61c7a080a5a061c976988fd4b844dfb468dda255 (patch) | |
tree | 8cb492b73f2755c38a6164d770da34d5af6486a0 /drivers/net | |
parent | d12d42f744f805a9ccc33cd76f04b237cd83ce56 (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')
29 files changed, 115 insertions, 110 deletions
diff --git a/drivers/net/can/sja1000/sja1000_of_platform.c b/drivers/net/can/sja1000/sja1000_of_platform.c index 9dd076a626a5..dc5f20cdf93c 100644 --- a/drivers/net/can/sja1000/sja1000_of_platform.c +++ b/drivers/net/can/sja1000/sja1000_of_platform.c | |||
@@ -72,7 +72,7 @@ static int __devexit sja1000_ofp_remove(struct of_device *ofdev) | |||
72 | { | 72 | { |
73 | struct net_device *dev = dev_get_drvdata(&ofdev->dev); | 73 | struct net_device *dev = dev_get_drvdata(&ofdev->dev); |
74 | struct sja1000_priv *priv = netdev_priv(dev); | 74 | struct sja1000_priv *priv = netdev_priv(dev); |
75 | struct device_node *np = ofdev->node; | 75 | struct device_node *np = ofdev->dev.of_node; |
76 | struct resource res; | 76 | struct resource res; |
77 | 77 | ||
78 | dev_set_drvdata(&ofdev->dev, NULL); | 78 | dev_set_drvdata(&ofdev->dev, NULL); |
@@ -91,7 +91,7 @@ static int __devexit sja1000_ofp_remove(struct of_device *ofdev) | |||
91 | static int __devinit sja1000_ofp_probe(struct of_device *ofdev, | 91 | static int __devinit sja1000_ofp_probe(struct of_device *ofdev, |
92 | const struct of_device_id *id) | 92 | const struct of_device_id *id) |
93 | { | 93 | { |
94 | struct device_node *np = ofdev->node; | 94 | struct device_node *np = ofdev->dev.of_node; |
95 | struct net_device *dev; | 95 | struct net_device *dev; |
96 | struct sja1000_priv *priv; | 96 | struct sja1000_priv *priv; |
97 | struct resource res; | 97 | struct resource res; |
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, | |||
3035 | static void __devinit logical_port_release(struct device *dev) | 3035 | static 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 | ||
3041 | static struct device *ehea_register_port(struct ehea_port *port, | 3041 | static 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 | } |
diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c index 4a43e56b7394..3342056f8aac 100644 --- a/drivers/net/fec_mpc52xx.c +++ b/drivers/net/fec_mpc52xx.c | |||
@@ -873,7 +873,7 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match) | |||
873 | priv->ndev = ndev; | 873 | priv->ndev = ndev; |
874 | 874 | ||
875 | /* Reserve FEC control zone */ | 875 | /* Reserve FEC control zone */ |
876 | rv = of_address_to_resource(op->node, 0, &mem); | 876 | rv = of_address_to_resource(op->dev.of_node, 0, &mem); |
877 | if (rv) { | 877 | if (rv) { |
878 | printk(KERN_ERR DRIVER_NAME ": " | 878 | printk(KERN_ERR DRIVER_NAME ": " |
879 | "Error while parsing device node resource\n" ); | 879 | "Error while parsing device node resource\n" ); |
@@ -921,7 +921,7 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match) | |||
921 | 921 | ||
922 | /* Get the IRQ we need one by one */ | 922 | /* Get the IRQ we need one by one */ |
923 | /* Control */ | 923 | /* Control */ |
924 | ndev->irq = irq_of_parse_and_map(op->node, 0); | 924 | ndev->irq = irq_of_parse_and_map(op->dev.of_node, 0); |
925 | 925 | ||
926 | /* RX */ | 926 | /* RX */ |
927 | priv->r_irq = bcom_get_task_irq(priv->rx_dmatsk); | 927 | priv->r_irq = bcom_get_task_irq(priv->rx_dmatsk); |
@@ -944,20 +944,20 @@ mpc52xx_fec_probe(struct of_device *op, const struct of_device_id *match) | |||
944 | /* Start with safe defaults for link connection */ | 944 | /* Start with safe defaults for link connection */ |
945 | priv->speed = 100; | 945 | priv->speed = 100; |
946 | priv->duplex = DUPLEX_HALF; | 946 | priv->duplex = DUPLEX_HALF; |
947 | priv->mdio_speed = ((mpc5xxx_get_bus_frequency(op->node) >> 20) / 5) << 1; | 947 | priv->mdio_speed = ((mpc5xxx_get_bus_frequency(op->dev.of_node) >> 20) / 5) << 1; |
948 | 948 | ||
949 | /* The current speed preconfigures the speed of the MII link */ | 949 | /* The current speed preconfigures the speed of the MII link */ |
950 | prop = of_get_property(op->node, "current-speed", &prop_size); | 950 | prop = of_get_property(op->dev.of_node, "current-speed", &prop_size); |
951 | if (prop && (prop_size >= sizeof(u32) * 2)) { | 951 | if (prop && (prop_size >= sizeof(u32) * 2)) { |
952 | priv->speed = prop[0]; | 952 | priv->speed = prop[0]; |
953 | priv->duplex = prop[1] ? DUPLEX_FULL : DUPLEX_HALF; | 953 | priv->duplex = prop[1] ? DUPLEX_FULL : DUPLEX_HALF; |
954 | } | 954 | } |
955 | 955 | ||
956 | /* If there is a phy handle, then get the PHY node */ | 956 | /* If there is a phy handle, then get the PHY node */ |
957 | priv->phy_node = of_parse_phandle(op->node, "phy-handle", 0); | 957 | priv->phy_node = of_parse_phandle(op->dev.of_node, "phy-handle", 0); |
958 | 958 | ||
959 | /* the 7-wire property means don't use MII mode */ | 959 | /* the 7-wire property means don't use MII mode */ |
960 | if (of_find_property(op->node, "fsl,7-wire-mode", NULL)) { | 960 | if (of_find_property(op->dev.of_node, "fsl,7-wire-mode", NULL)) { |
961 | priv->seven_wire_mode = 1; | 961 | priv->seven_wire_mode = 1; |
962 | dev_info(&ndev->dev, "using 7-wire PHY mode\n"); | 962 | dev_info(&ndev->dev, "using 7-wire PHY mode\n"); |
963 | } | 963 | } |
diff --git a/drivers/net/fec_mpc52xx_phy.c b/drivers/net/fec_mpc52xx_phy.c index 7658a082e390..0d099e5a652d 100644 --- a/drivers/net/fec_mpc52xx_phy.c +++ b/drivers/net/fec_mpc52xx_phy.c | |||
@@ -66,7 +66,7 @@ static int mpc52xx_fec_mdio_probe(struct of_device *of, | |||
66 | const struct of_device_id *match) | 66 | const struct of_device_id *match) |
67 | { | 67 | { |
68 | struct device *dev = &of->dev; | 68 | struct device *dev = &of->dev; |
69 | struct device_node *np = of->node; | 69 | struct device_node *np = of->dev.of_node; |
70 | struct mii_bus *bus; | 70 | struct mii_bus *bus; |
71 | struct mpc52xx_fec_mdio_priv *priv; | 71 | struct mpc52xx_fec_mdio_priv *priv; |
72 | struct resource res = {}; | 72 | struct resource res = {}; |
@@ -107,7 +107,7 @@ static int mpc52xx_fec_mdio_probe(struct of_device *of, | |||
107 | 107 | ||
108 | /* set MII speed */ | 108 | /* set MII speed */ |
109 | out_be32(&priv->regs->mii_speed, | 109 | out_be32(&priv->regs->mii_speed, |
110 | ((mpc5xxx_get_bus_frequency(of->node) >> 20) / 5) << 1); | 110 | ((mpc5xxx_get_bus_frequency(of->dev.of_node) >> 20) / 5) << 1); |
111 | 111 | ||
112 | err = of_mdiobus_register(bus, np); | 112 | err = of_mdiobus_register(bus, np); |
113 | if (err) | 113 | if (err) |
diff --git a/drivers/net/fs_enet/fs_enet-main.c b/drivers/net/fs_enet/fs_enet-main.c index 0770e2f6da6b..caeb88b67bc6 100644 --- a/drivers/net/fs_enet/fs_enet-main.c +++ b/drivers/net/fs_enet/fs_enet-main.c | |||
@@ -1015,7 +1015,7 @@ static int __devinit fs_enet_probe(struct of_device *ofdev, | |||
1015 | return -ENOMEM; | 1015 | return -ENOMEM; |
1016 | 1016 | ||
1017 | if (!IS_FEC(match)) { | 1017 | if (!IS_FEC(match)) { |
1018 | data = of_get_property(ofdev->node, "fsl,cpm-command", &len); | 1018 | data = of_get_property(ofdev->dev.of_node, "fsl,cpm-command", &len); |
1019 | if (!data || len != 4) | 1019 | if (!data || len != 4) |
1020 | goto out_free_fpi; | 1020 | goto out_free_fpi; |
1021 | 1021 | ||
@@ -1027,8 +1027,8 @@ static int __devinit fs_enet_probe(struct of_device *ofdev, | |||
1027 | fpi->rx_copybreak = 240; | 1027 | fpi->rx_copybreak = 240; |
1028 | fpi->use_napi = 1; | 1028 | fpi->use_napi = 1; |
1029 | fpi->napi_weight = 17; | 1029 | fpi->napi_weight = 17; |
1030 | fpi->phy_node = of_parse_phandle(ofdev->node, "phy-handle", 0); | 1030 | fpi->phy_node = of_parse_phandle(ofdev->dev.of_node, "phy-handle", 0); |
1031 | if ((!fpi->phy_node) && (!of_get_property(ofdev->node, "fixed-link", | 1031 | if ((!fpi->phy_node) && (!of_get_property(ofdev->dev.of_node, "fixed-link", |
1032 | NULL))) | 1032 | NULL))) |
1033 | goto out_free_fpi; | 1033 | goto out_free_fpi; |
1034 | 1034 | ||
@@ -1061,7 +1061,7 @@ static int __devinit fs_enet_probe(struct of_device *ofdev, | |||
1061 | spin_lock_init(&fep->lock); | 1061 | spin_lock_init(&fep->lock); |
1062 | spin_lock_init(&fep->tx_lock); | 1062 | spin_lock_init(&fep->tx_lock); |
1063 | 1063 | ||
1064 | mac_addr = of_get_mac_address(ofdev->node); | 1064 | mac_addr = of_get_mac_address(ofdev->dev.of_node); |
1065 | if (mac_addr) | 1065 | if (mac_addr) |
1066 | memcpy(ndev->dev_addr, mac_addr, 6); | 1066 | memcpy(ndev->dev_addr, mac_addr, 6); |
1067 | 1067 | ||
diff --git a/drivers/net/fs_enet/mac-fcc.c b/drivers/net/fs_enet/mac-fcc.c index 0a973e71876b..9d4f272137d6 100644 --- a/drivers/net/fs_enet/mac-fcc.c +++ b/drivers/net/fs_enet/mac-fcc.c | |||
@@ -88,19 +88,19 @@ static int do_pd_setup(struct fs_enet_private *fep) | |||
88 | struct fs_platform_info *fpi = fep->fpi; | 88 | struct fs_platform_info *fpi = fep->fpi; |
89 | int ret = -EINVAL; | 89 | int ret = -EINVAL; |
90 | 90 | ||
91 | fep->interrupt = of_irq_to_resource(ofdev->node, 0, NULL); | 91 | fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL); |
92 | if (fep->interrupt == NO_IRQ) | 92 | if (fep->interrupt == NO_IRQ) |
93 | goto out; | 93 | goto out; |
94 | 94 | ||
95 | fep->fcc.fccp = of_iomap(ofdev->node, 0); | 95 | fep->fcc.fccp = of_iomap(ofdev->dev.of_node, 0); |
96 | if (!fep->fcc.fccp) | 96 | if (!fep->fcc.fccp) |
97 | goto out; | 97 | goto out; |
98 | 98 | ||
99 | fep->fcc.ep = of_iomap(ofdev->node, 1); | 99 | fep->fcc.ep = of_iomap(ofdev->dev.of_node, 1); |
100 | if (!fep->fcc.ep) | 100 | if (!fep->fcc.ep) |
101 | goto out_fccp; | 101 | goto out_fccp; |
102 | 102 | ||
103 | fep->fcc.fcccp = of_iomap(ofdev->node, 2); | 103 | fep->fcc.fcccp = of_iomap(ofdev->dev.of_node, 2); |
104 | if (!fep->fcc.fcccp) | 104 | if (!fep->fcc.fcccp) |
105 | goto out_ep; | 105 | goto out_ep; |
106 | 106 | ||
diff --git a/drivers/net/fs_enet/mac-fec.c b/drivers/net/fs_enet/mac-fec.c index ec81f50d5919..bd7a6e7064bb 100644 --- a/drivers/net/fs_enet/mac-fec.c +++ b/drivers/net/fs_enet/mac-fec.c | |||
@@ -98,11 +98,11 @@ static int do_pd_setup(struct fs_enet_private *fep) | |||
98 | { | 98 | { |
99 | struct of_device *ofdev = to_of_device(fep->dev); | 99 | struct of_device *ofdev = to_of_device(fep->dev); |
100 | 100 | ||
101 | fep->interrupt = of_irq_to_resource(ofdev->node, 0, NULL); | 101 | fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL); |
102 | if (fep->interrupt == NO_IRQ) | 102 | if (fep->interrupt == NO_IRQ) |
103 | return -EINVAL; | 103 | return -EINVAL; |
104 | 104 | ||
105 | fep->fec.fecp = of_iomap(ofdev->node, 0); | 105 | fep->fec.fecp = of_iomap(ofdev->dev.of_node, 0); |
106 | if (!fep->fcc.fccp) | 106 | if (!fep->fcc.fccp) |
107 | return -EINVAL; | 107 | return -EINVAL; |
108 | 108 | ||
diff --git a/drivers/net/fs_enet/mac-scc.c b/drivers/net/fs_enet/mac-scc.c index 34d3da751eb4..49a4d8c60168 100644 --- a/drivers/net/fs_enet/mac-scc.c +++ b/drivers/net/fs_enet/mac-scc.c | |||
@@ -98,15 +98,15 @@ static int do_pd_setup(struct fs_enet_private *fep) | |||
98 | { | 98 | { |
99 | struct of_device *ofdev = to_of_device(fep->dev); | 99 | struct of_device *ofdev = to_of_device(fep->dev); |
100 | 100 | ||
101 | fep->interrupt = of_irq_to_resource(ofdev->node, 0, NULL); | 101 | fep->interrupt = of_irq_to_resource(ofdev->dev.of_node, 0, NULL); |
102 | if (fep->interrupt == NO_IRQ) | 102 | if (fep->interrupt == NO_IRQ) |
103 | return -EINVAL; | 103 | return -EINVAL; |
104 | 104 | ||
105 | fep->scc.sccp = of_iomap(ofdev->node, 0); | 105 | fep->scc.sccp = of_iomap(ofdev->dev.of_node, 0); |
106 | if (!fep->scc.sccp) | 106 | if (!fep->scc.sccp) |
107 | return -EINVAL; | 107 | return -EINVAL; |
108 | 108 | ||
109 | fep->scc.ep = of_iomap(ofdev->node, 1); | 109 | fep->scc.ep = of_iomap(ofdev->dev.of_node, 1); |
110 | if (!fep->scc.ep) { | 110 | if (!fep->scc.ep) { |
111 | iounmap(fep->scc.sccp); | 111 | iounmap(fep->scc.sccp); |
112 | return -EINVAL; | 112 | return -EINVAL; |
diff --git a/drivers/net/fs_enet/mii-fec.c b/drivers/net/fs_enet/mii-fec.c index 5944b65082cb..dc862e779c1f 100644 --- a/drivers/net/fs_enet/mii-fec.c +++ b/drivers/net/fs_enet/mii-fec.c | |||
@@ -124,7 +124,7 @@ static int __devinit fs_enet_mdio_probe(struct of_device *ofdev, | |||
124 | new_bus->write = &fs_enet_fec_mii_write; | 124 | new_bus->write = &fs_enet_fec_mii_write; |
125 | new_bus->reset = &fs_enet_fec_mii_reset; | 125 | new_bus->reset = &fs_enet_fec_mii_reset; |
126 | 126 | ||
127 | ret = of_address_to_resource(ofdev->node, 0, &res); | 127 | ret = of_address_to_resource(ofdev->dev.of_node, 0, &res); |
128 | if (ret) | 128 | if (ret) |
129 | goto out_res; | 129 | goto out_res; |
130 | 130 | ||
@@ -135,7 +135,7 @@ static int __devinit fs_enet_mdio_probe(struct of_device *ofdev, | |||
135 | goto out_fec; | 135 | goto out_fec; |
136 | 136 | ||
137 | if (get_bus_freq) { | 137 | if (get_bus_freq) { |
138 | clock = get_bus_freq(ofdev->node); | 138 | clock = get_bus_freq(ofdev->dev.of_node); |
139 | if (!clock) { | 139 | if (!clock) { |
140 | /* Use maximum divider if clock is unknown */ | 140 | /* Use maximum divider if clock is unknown */ |
141 | dev_warn(&ofdev->dev, "could not determine IPS clock\n"); | 141 | dev_warn(&ofdev->dev, "could not determine IPS clock\n"); |
@@ -172,7 +172,7 @@ static int __devinit fs_enet_mdio_probe(struct of_device *ofdev, | |||
172 | new_bus->parent = &ofdev->dev; | 172 | new_bus->parent = &ofdev->dev; |
173 | dev_set_drvdata(&ofdev->dev, new_bus); | 173 | dev_set_drvdata(&ofdev->dev, new_bus); |
174 | 174 | ||
175 | ret = of_mdiobus_register(new_bus, ofdev->node); | 175 | ret = of_mdiobus_register(new_bus, ofdev->dev.of_node); |
176 | if (ret) | 176 | if (ret) |
177 | goto out_free_irqs; | 177 | goto out_free_irqs; |
178 | 178 | ||
diff --git a/drivers/net/fsl_pq_mdio.c b/drivers/net/fsl_pq_mdio.c index d5160edf2fcf..72489a213bf7 100644 --- a/drivers/net/fsl_pq_mdio.c +++ b/drivers/net/fsl_pq_mdio.c | |||
@@ -271,7 +271,7 @@ static int get_ucc_id_for_range(u64 start, u64 end, u32 *ucc_id) | |||
271 | static int fsl_pq_mdio_probe(struct of_device *ofdev, | 271 | static int fsl_pq_mdio_probe(struct of_device *ofdev, |
272 | const struct of_device_id *match) | 272 | const struct of_device_id *match) |
273 | { | 273 | { |
274 | struct device_node *np = ofdev->node; | 274 | struct device_node *np = ofdev->dev.of_node; |
275 | struct device_node *tbi; | 275 | struct device_node *tbi; |
276 | struct fsl_pq_mdio_priv *priv; | 276 | struct fsl_pq_mdio_priv *priv; |
277 | struct fsl_pq_mdio __iomem *regs = NULL; | 277 | struct fsl_pq_mdio __iomem *regs = NULL; |
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 080d1cea5b26..b71bba91064c 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -603,7 +603,7 @@ static int gfar_of_init(struct of_device *ofdev, struct net_device **pdev) | |||
603 | int err = 0, i; | 603 | int err = 0, i; |
604 | struct net_device *dev = NULL; | 604 | struct net_device *dev = NULL; |
605 | struct gfar_private *priv = NULL; | 605 | struct gfar_private *priv = NULL; |
606 | struct device_node *np = ofdev->node; | 606 | struct device_node *np = ofdev->dev.of_node; |
607 | struct device_node *child = NULL; | 607 | struct device_node *child = NULL; |
608 | const u32 *stash; | 608 | const u32 *stash; |
609 | const u32 *stash_len; | 609 | const u32 *stash_len; |
@@ -641,7 +641,7 @@ static int gfar_of_init(struct of_device *ofdev, struct net_device **pdev) | |||
641 | return -ENOMEM; | 641 | return -ENOMEM; |
642 | 642 | ||
643 | priv = netdev_priv(dev); | 643 | priv = netdev_priv(dev); |
644 | priv->node = ofdev->node; | 644 | priv->node = ofdev->dev.of_node; |
645 | priv->ndev = dev; | 645 | priv->ndev = dev; |
646 | 646 | ||
647 | dev->num_tx_queues = num_tx_qs; | 647 | dev->num_tx_queues = num_tx_qs; |
@@ -888,7 +888,7 @@ static int gfar_probe(struct of_device *ofdev, | |||
888 | priv = netdev_priv(dev); | 888 | priv = netdev_priv(dev); |
889 | priv->ndev = dev; | 889 | priv->ndev = dev; |
890 | priv->ofdev = ofdev; | 890 | priv->ofdev = ofdev; |
891 | priv->node = ofdev->node; | 891 | priv->node = ofdev->dev.of_node; |
892 | SET_NETDEV_DEV(dev, &ofdev->dev); | 892 | SET_NETDEV_DEV(dev, &ofdev->dev); |
893 | 893 | ||
894 | spin_lock_init(&priv->bflock); | 894 | spin_lock_init(&priv->bflock); |
diff --git a/drivers/net/greth.c b/drivers/net/greth.c index 3a90430de918..61fd54d35f63 100644 --- a/drivers/net/greth.c +++ b/drivers/net/greth.c | |||
@@ -1500,7 +1500,8 @@ static int __devinit greth_of_probe(struct of_device *ofdev, const struct of_dev | |||
1500 | if (i == 6) { | 1500 | if (i == 6) { |
1501 | const unsigned char *addr; | 1501 | const unsigned char *addr; |
1502 | int len; | 1502 | int len; |
1503 | addr = of_get_property(ofdev->node, "local-mac-address", &len); | 1503 | addr = of_get_property(ofdev->dev.of_node, "local-mac-address", |
1504 | &len); | ||
1504 | if (addr != NULL && len == 6) { | 1505 | if (addr != NULL && len == 6) { |
1505 | for (i = 0; i < 6; i++) | 1506 | for (i = 0; i < 6; i++) |
1506 | macaddr[i] = (unsigned int) addr[i]; | 1507 | macaddr[i] = (unsigned int) addr[i]; |
diff --git a/drivers/net/ibm_newemac/core.c b/drivers/net/ibm_newemac/core.c index dd873cc41c2b..cda2ba891344 100644 --- a/drivers/net/ibm_newemac/core.c +++ b/drivers/net/ibm_newemac/core.c | |||
@@ -136,7 +136,8 @@ static inline void emac_report_timeout_error(struct emac_instance *dev, | |||
136 | EMAC_FTR_440EP_PHY_CLK_FIX)) | 136 | EMAC_FTR_440EP_PHY_CLK_FIX)) |
137 | DBG(dev, "%s" NL, error); | 137 | DBG(dev, "%s" NL, error); |
138 | else if (net_ratelimit()) | 138 | else if (net_ratelimit()) |
139 | printk(KERN_ERR "%s: %s\n", dev->ofdev->node->full_name, error); | 139 | printk(KERN_ERR "%s: %s\n", dev->ofdev->dev.of_node->full_name, |
140 | error); | ||
140 | } | 141 | } |
141 | 142 | ||
142 | /* EMAC PHY clock workaround: | 143 | /* EMAC PHY clock workaround: |
@@ -2185,7 +2186,7 @@ static void emac_ethtool_get_drvinfo(struct net_device *ndev, | |||
2185 | strcpy(info->version, DRV_VERSION); | 2186 | strcpy(info->version, DRV_VERSION); |
2186 | info->fw_version[0] = '\0'; | 2187 | info->fw_version[0] = '\0'; |
2187 | sprintf(info->bus_info, "PPC 4xx EMAC-%d %s", | 2188 | sprintf(info->bus_info, "PPC 4xx EMAC-%d %s", |
2188 | dev->cell_index, dev->ofdev->node->full_name); | 2189 | dev->cell_index, dev->ofdev->dev.of_node->full_name); |
2189 | info->regdump_len = emac_ethtool_get_regs_len(ndev); | 2190 | info->regdump_len = emac_ethtool_get_regs_len(ndev); |
2190 | } | 2191 | } |
2191 | 2192 | ||
@@ -2379,7 +2380,7 @@ static int __devinit emac_read_uint_prop(struct device_node *np, const char *nam | |||
2379 | 2380 | ||
2380 | static int __devinit emac_init_phy(struct emac_instance *dev) | 2381 | static int __devinit emac_init_phy(struct emac_instance *dev) |
2381 | { | 2382 | { |
2382 | struct device_node *np = dev->ofdev->node; | 2383 | struct device_node *np = dev->ofdev->dev.of_node; |
2383 | struct net_device *ndev = dev->ndev; | 2384 | struct net_device *ndev = dev->ndev; |
2384 | u32 phy_map, adv; | 2385 | u32 phy_map, adv; |
2385 | int i; | 2386 | int i; |
@@ -2514,7 +2515,7 @@ static int __devinit emac_init_phy(struct emac_instance *dev) | |||
2514 | 2515 | ||
2515 | static int __devinit emac_init_config(struct emac_instance *dev) | 2516 | static int __devinit emac_init_config(struct emac_instance *dev) |
2516 | { | 2517 | { |
2517 | struct device_node *np = dev->ofdev->node; | 2518 | struct device_node *np = dev->ofdev->dev.of_node; |
2518 | const void *p; | 2519 | const void *p; |
2519 | unsigned int plen; | 2520 | unsigned int plen; |
2520 | const char *pm, *phy_modes[] = { | 2521 | const char *pm, *phy_modes[] = { |
@@ -2723,7 +2724,7 @@ static int __devinit emac_probe(struct of_device *ofdev, | |||
2723 | { | 2724 | { |
2724 | struct net_device *ndev; | 2725 | struct net_device *ndev; |
2725 | struct emac_instance *dev; | 2726 | struct emac_instance *dev; |
2726 | struct device_node *np = ofdev->node; | 2727 | struct device_node *np = ofdev->dev.of_node; |
2727 | struct device_node **blist = NULL; | 2728 | struct device_node **blist = NULL; |
2728 | int err, i; | 2729 | int err, i; |
2729 | 2730 | ||
@@ -2810,7 +2811,7 @@ static int __devinit emac_probe(struct of_device *ofdev, | |||
2810 | err = mal_register_commac(dev->mal, &dev->commac); | 2811 | err = mal_register_commac(dev->mal, &dev->commac); |
2811 | if (err) { | 2812 | if (err) { |
2812 | printk(KERN_ERR "%s: failed to register with mal %s!\n", | 2813 | printk(KERN_ERR "%s: failed to register with mal %s!\n", |
2813 | np->full_name, dev->mal_dev->node->full_name); | 2814 | np->full_name, dev->mal_dev->dev.of_node->full_name); |
2814 | goto err_rel_deps; | 2815 | goto err_rel_deps; |
2815 | } | 2816 | } |
2816 | dev->rx_skb_size = emac_rx_skb_size(ndev->mtu); | 2817 | dev->rx_skb_size = emac_rx_skb_size(ndev->mtu); |
diff --git a/drivers/net/ibm_newemac/debug.c b/drivers/net/ibm_newemac/debug.c index 775c850a425a..3995fafc1e08 100644 --- a/drivers/net/ibm_newemac/debug.c +++ b/drivers/net/ibm_newemac/debug.c | |||
@@ -33,7 +33,7 @@ static void emac_desc_dump(struct emac_instance *p) | |||
33 | int i; | 33 | int i; |
34 | printk("** EMAC %s TX BDs **\n" | 34 | printk("** EMAC %s TX BDs **\n" |
35 | " tx_cnt = %d tx_slot = %d ack_slot = %d\n", | 35 | " tx_cnt = %d tx_slot = %d ack_slot = %d\n", |
36 | p->ofdev->node->full_name, | 36 | p->ofdev->dev.of_node->full_name, |
37 | p->tx_cnt, p->tx_slot, p->ack_slot); | 37 | p->tx_cnt, p->tx_slot, p->ack_slot); |
38 | for (i = 0; i < NUM_TX_BUFF / 2; ++i) | 38 | for (i = 0; i < NUM_TX_BUFF / 2; ++i) |
39 | printk | 39 | printk |
@@ -49,7 +49,7 @@ static void emac_desc_dump(struct emac_instance *p) | |||
49 | printk("** EMAC %s RX BDs **\n" | 49 | printk("** EMAC %s RX BDs **\n" |
50 | " rx_slot = %d flags = 0x%lx rx_skb_size = %d rx_sync_size = %d\n" | 50 | " rx_slot = %d flags = 0x%lx rx_skb_size = %d rx_sync_size = %d\n" |
51 | " rx_sg_skb = 0x%p\n", | 51 | " rx_sg_skb = 0x%p\n", |
52 | p->ofdev->node->full_name, | 52 | p->ofdev->dev.of_node->full_name, |
53 | p->rx_slot, p->commac.flags, p->rx_skb_size, | 53 | p->rx_slot, p->commac.flags, p->rx_skb_size, |
54 | p->rx_sync_size, p->rx_sg_skb); | 54 | p->rx_sync_size, p->rx_sg_skb); |
55 | for (i = 0; i < NUM_RX_BUFF / 2; ++i) | 55 | for (i = 0; i < NUM_RX_BUFF / 2; ++i) |
@@ -77,7 +77,8 @@ static void emac_mac_dump(struct emac_instance *dev) | |||
77 | "MR0 = 0x%08x MR1 = 0x%08x TMR0 = 0x%08x TMR1 = 0x%08x\n" | 77 | "MR0 = 0x%08x MR1 = 0x%08x TMR0 = 0x%08x TMR1 = 0x%08x\n" |
78 | "RMR = 0x%08x ISR = 0x%08x ISER = 0x%08x\n" | 78 | "RMR = 0x%08x ISR = 0x%08x ISER = 0x%08x\n" |
79 | "IAR = %04x%08x VTPID = 0x%04x VTCI = 0x%04x\n", | 79 | "IAR = %04x%08x VTPID = 0x%04x VTCI = 0x%04x\n", |
80 | dev->ofdev->node->full_name, in_be32(&p->mr0), in_be32(&p->mr1), | 80 | dev->ofdev->dev.of_node->full_name, |
81 | in_be32(&p->mr0), in_be32(&p->mr1), | ||
81 | in_be32(&p->tmr0), in_be32(&p->tmr1), | 82 | in_be32(&p->tmr0), in_be32(&p->tmr1), |
82 | in_be32(&p->rmr), in_be32(&p->isr), in_be32(&p->iser), | 83 | in_be32(&p->rmr), in_be32(&p->isr), in_be32(&p->iser), |
83 | in_be32(&p->iahr), in_be32(&p->ialr), in_be32(&p->vtpid), | 84 | in_be32(&p->iahr), in_be32(&p->ialr), in_be32(&p->vtpid), |
@@ -128,7 +129,7 @@ static void emac_mal_dump(struct mal_instance *mal) | |||
128 | "CFG = 0x%08x ESR = 0x%08x IER = 0x%08x\n" | 129 | "CFG = 0x%08x ESR = 0x%08x IER = 0x%08x\n" |
129 | "TX|CASR = 0x%08x CARR = 0x%08x EOBISR = 0x%08x DEIR = 0x%08x\n" | 130 | "TX|CASR = 0x%08x CARR = 0x%08x EOBISR = 0x%08x DEIR = 0x%08x\n" |
130 | "RX|CASR = 0x%08x CARR = 0x%08x EOBISR = 0x%08x DEIR = 0x%08x\n", | 131 | "RX|CASR = 0x%08x CARR = 0x%08x EOBISR = 0x%08x DEIR = 0x%08x\n", |
131 | mal->ofdev->node->full_name, | 132 | mal->ofdev->dev.of_node->full_name, |
132 | get_mal_dcrn(mal, MAL_CFG), get_mal_dcrn(mal, MAL_ESR), | 133 | get_mal_dcrn(mal, MAL_CFG), get_mal_dcrn(mal, MAL_ESR), |
133 | get_mal_dcrn(mal, MAL_IER), | 134 | get_mal_dcrn(mal, MAL_IER), |
134 | get_mal_dcrn(mal, MAL_TXCASR), get_mal_dcrn(mal, MAL_TXCARR), | 135 | get_mal_dcrn(mal, MAL_TXCASR), get_mal_dcrn(mal, MAL_TXCARR), |
diff --git a/drivers/net/ibm_newemac/debug.h b/drivers/net/ibm_newemac/debug.h index b631842ec8d0..e596c77ccdf7 100644 --- a/drivers/net/ibm_newemac/debug.h +++ b/drivers/net/ibm_newemac/debug.h | |||
@@ -53,8 +53,8 @@ extern void emac_dbg_dump_all(void); | |||
53 | 53 | ||
54 | #endif | 54 | #endif |
55 | 55 | ||
56 | #define EMAC_DBG(dev, name, fmt, arg...) \ | 56 | #define EMAC_DBG(d, name, fmt, arg...) \ |
57 | printk(KERN_DEBUG #name "%s: " fmt, dev->ofdev->node->full_name, ## arg) | 57 | printk(KERN_DEBUG #name "%s: " fmt, d->ofdev->dev.of_node->full_name, ## arg) |
58 | 58 | ||
59 | #if DBG_LEVEL > 0 | 59 | #if DBG_LEVEL > 0 |
60 | # define DBG(d,f,x...) EMAC_DBG(d, emac, f, ##x) | 60 | # define DBG(d,f,x...) EMAC_DBG(d, emac, f, ##x) |
diff --git a/drivers/net/ibm_newemac/mal.c b/drivers/net/ibm_newemac/mal.c index 5b3d94419fe6..aba17947e208 100644 --- a/drivers/net/ibm_newemac/mal.c +++ b/drivers/net/ibm_newemac/mal.c | |||
@@ -538,11 +538,11 @@ static int __devinit mal_probe(struct of_device *ofdev, | |||
538 | } | 538 | } |
539 | mal->index = index; | 539 | mal->index = index; |
540 | mal->ofdev = ofdev; | 540 | mal->ofdev = ofdev; |
541 | mal->version = of_device_is_compatible(ofdev->node, "ibm,mcmal2") ? 2 : 1; | 541 | mal->version = of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal2") ? 2 : 1; |
542 | 542 | ||
543 | MAL_DBG(mal, "probe" NL); | 543 | MAL_DBG(mal, "probe" NL); |
544 | 544 | ||
545 | prop = of_get_property(ofdev->node, "num-tx-chans", NULL); | 545 | prop = of_get_property(ofdev->dev.of_node, "num-tx-chans", NULL); |
546 | if (prop == NULL) { | 546 | if (prop == NULL) { |
547 | printk(KERN_ERR | 547 | printk(KERN_ERR |
548 | "mal%d: can't find MAL num-tx-chans property!\n", | 548 | "mal%d: can't find MAL num-tx-chans property!\n", |
@@ -552,7 +552,7 @@ static int __devinit mal_probe(struct of_device *ofdev, | |||
552 | } | 552 | } |
553 | mal->num_tx_chans = prop[0]; | 553 | mal->num_tx_chans = prop[0]; |
554 | 554 | ||
555 | prop = of_get_property(ofdev->node, "num-rx-chans", NULL); | 555 | prop = of_get_property(ofdev->dev.of_node, "num-rx-chans", NULL); |
556 | if (prop == NULL) { | 556 | if (prop == NULL) { |
557 | printk(KERN_ERR | 557 | printk(KERN_ERR |
558 | "mal%d: can't find MAL num-rx-chans property!\n", | 558 | "mal%d: can't find MAL num-rx-chans property!\n", |
@@ -562,14 +562,14 @@ static int __devinit mal_probe(struct of_device *ofdev, | |||
562 | } | 562 | } |
563 | mal->num_rx_chans = prop[0]; | 563 | mal->num_rx_chans = prop[0]; |
564 | 564 | ||
565 | dcr_base = dcr_resource_start(ofdev->node, 0); | 565 | dcr_base = dcr_resource_start(ofdev->dev.of_node, 0); |
566 | if (dcr_base == 0) { | 566 | if (dcr_base == 0) { |
567 | printk(KERN_ERR | 567 | printk(KERN_ERR |
568 | "mal%d: can't find DCR resource!\n", index); | 568 | "mal%d: can't find DCR resource!\n", index); |
569 | err = -ENODEV; | 569 | err = -ENODEV; |
570 | goto fail; | 570 | goto fail; |
571 | } | 571 | } |
572 | mal->dcr_host = dcr_map(ofdev->node, dcr_base, 0x100); | 572 | mal->dcr_host = dcr_map(ofdev->dev.of_node, dcr_base, 0x100); |
573 | if (!DCR_MAP_OK(mal->dcr_host)) { | 573 | if (!DCR_MAP_OK(mal->dcr_host)) { |
574 | printk(KERN_ERR | 574 | printk(KERN_ERR |
575 | "mal%d: failed to map DCRs !\n", index); | 575 | "mal%d: failed to map DCRs !\n", index); |
@@ -577,28 +577,28 @@ static int __devinit mal_probe(struct of_device *ofdev, | |||
577 | goto fail; | 577 | goto fail; |
578 | } | 578 | } |
579 | 579 | ||
580 | if (of_device_is_compatible(ofdev->node, "ibm,mcmal-405ez")) { | 580 | if (of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal-405ez")) { |
581 | #if defined(CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT) && \ | 581 | #if defined(CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT) && \ |
582 | defined(CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR) | 582 | defined(CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR) |
583 | mal->features |= (MAL_FTR_CLEAR_ICINTSTAT | | 583 | mal->features |= (MAL_FTR_CLEAR_ICINTSTAT | |
584 | MAL_FTR_COMMON_ERR_INT); | 584 | MAL_FTR_COMMON_ERR_INT); |
585 | #else | 585 | #else |
586 | printk(KERN_ERR "%s: Support for 405EZ not enabled!\n", | 586 | printk(KERN_ERR "%s: Support for 405EZ not enabled!\n", |
587 | ofdev->node->full_name); | 587 | ofdev->dev.of_node->full_name); |
588 | err = -ENODEV; | 588 | err = -ENODEV; |
589 | goto fail; | 589 | goto fail; |
590 | #endif | 590 | #endif |
591 | } | 591 | } |
592 | 592 | ||
593 | mal->txeob_irq = irq_of_parse_and_map(ofdev->node, 0); | 593 | mal->txeob_irq = irq_of_parse_and_map(ofdev->dev.of_node, 0); |
594 | mal->rxeob_irq = irq_of_parse_and_map(ofdev->node, 1); | 594 | mal->rxeob_irq = irq_of_parse_and_map(ofdev->dev.of_node, 1); |
595 | mal->serr_irq = irq_of_parse_and_map(ofdev->node, 2); | 595 | mal->serr_irq = irq_of_parse_and_map(ofdev->dev.of_node, 2); |
596 | 596 | ||
597 | if (mal_has_feature(mal, MAL_FTR_COMMON_ERR_INT)) { | 597 | if (mal_has_feature(mal, MAL_FTR_COMMON_ERR_INT)) { |
598 | mal->txde_irq = mal->rxde_irq = mal->serr_irq; | 598 | mal->txde_irq = mal->rxde_irq = mal->serr_irq; |
599 | } else { | 599 | } else { |
600 | mal->txde_irq = irq_of_parse_and_map(ofdev->node, 3); | 600 | mal->txde_irq = irq_of_parse_and_map(ofdev->dev.of_node, 3); |
601 | mal->rxde_irq = irq_of_parse_and_map(ofdev->node, 4); | 601 | mal->rxde_irq = irq_of_parse_and_map(ofdev->dev.of_node, 4); |
602 | } | 602 | } |
603 | 603 | ||
604 | if (mal->txeob_irq == NO_IRQ || mal->rxeob_irq == NO_IRQ || | 604 | if (mal->txeob_irq == NO_IRQ || mal->rxeob_irq == NO_IRQ || |
@@ -629,7 +629,7 @@ static int __devinit mal_probe(struct of_device *ofdev, | |||
629 | /* Current Axon is not happy with priority being non-0, it can | 629 | /* Current Axon is not happy with priority being non-0, it can |
630 | * deadlock, fix it up here | 630 | * deadlock, fix it up here |
631 | */ | 631 | */ |
632 | if (of_device_is_compatible(ofdev->node, "ibm,mcmal-axon")) | 632 | if (of_device_is_compatible(ofdev->dev.of_node, "ibm,mcmal-axon")) |
633 | cfg &= ~(MAL2_CFG_RPP_10 | MAL2_CFG_WPP_10); | 633 | cfg &= ~(MAL2_CFG_RPP_10 | MAL2_CFG_WPP_10); |
634 | 634 | ||
635 | /* Apply configuration */ | 635 | /* Apply configuration */ |
@@ -701,7 +701,7 @@ static int __devinit mal_probe(struct of_device *ofdev, | |||
701 | 701 | ||
702 | printk(KERN_INFO | 702 | printk(KERN_INFO |
703 | "MAL v%d %s, %d TX channels, %d RX channels\n", | 703 | "MAL v%d %s, %d TX channels, %d RX channels\n", |
704 | mal->version, ofdev->node->full_name, | 704 | mal->version, ofdev->dev.of_node->full_name, |
705 | mal->num_tx_chans, mal->num_rx_chans); | 705 | mal->num_tx_chans, mal->num_rx_chans); |
706 | 706 | ||
707 | /* Advertise this instance to the rest of the world */ | 707 | /* Advertise this instance to the rest of the world */ |
diff --git a/drivers/net/ibm_newemac/rgmii.c b/drivers/net/ibm_newemac/rgmii.c index 5b90d34c8455..6ab630a79e31 100644 --- a/drivers/net/ibm_newemac/rgmii.c +++ b/drivers/net/ibm_newemac/rgmii.c | |||
@@ -103,7 +103,7 @@ int __devinit rgmii_attach(struct of_device *ofdev, int input, int mode) | |||
103 | /* Check if we need to attach to a RGMII */ | 103 | /* Check if we need to attach to a RGMII */ |
104 | if (input < 0 || !rgmii_valid_mode(mode)) { | 104 | if (input < 0 || !rgmii_valid_mode(mode)) { |
105 | printk(KERN_ERR "%s: unsupported settings !\n", | 105 | printk(KERN_ERR "%s: unsupported settings !\n", |
106 | ofdev->node->full_name); | 106 | ofdev->dev.of_node->full_name); |
107 | return -ENODEV; | 107 | return -ENODEV; |
108 | } | 108 | } |
109 | 109 | ||
@@ -113,7 +113,7 @@ int __devinit rgmii_attach(struct of_device *ofdev, int input, int mode) | |||
113 | out_be32(&p->fer, in_be32(&p->fer) | rgmii_mode_mask(mode, input)); | 113 | out_be32(&p->fer, in_be32(&p->fer) | rgmii_mode_mask(mode, input)); |
114 | 114 | ||
115 | printk(KERN_NOTICE "%s: input %d in %s mode\n", | 115 | printk(KERN_NOTICE "%s: input %d in %s mode\n", |
116 | ofdev->node->full_name, input, rgmii_mode_name(mode)); | 116 | ofdev->dev.of_node->full_name, input, rgmii_mode_name(mode)); |
117 | 117 | ||
118 | ++dev->users; | 118 | ++dev->users; |
119 | 119 | ||
@@ -231,7 +231,7 @@ void *rgmii_dump_regs(struct of_device *ofdev, void *buf) | |||
231 | static int __devinit rgmii_probe(struct of_device *ofdev, | 231 | static int __devinit rgmii_probe(struct of_device *ofdev, |
232 | const struct of_device_id *match) | 232 | const struct of_device_id *match) |
233 | { | 233 | { |
234 | struct device_node *np = ofdev->node; | 234 | struct device_node *np = ofdev->dev.of_node; |
235 | struct rgmii_instance *dev; | 235 | struct rgmii_instance *dev; |
236 | struct resource regs; | 236 | struct resource regs; |
237 | int rc; | 237 | int rc; |
@@ -264,11 +264,11 @@ static int __devinit rgmii_probe(struct of_device *ofdev, | |||
264 | } | 264 | } |
265 | 265 | ||
266 | /* Check for RGMII flags */ | 266 | /* Check for RGMII flags */ |
267 | if (of_get_property(ofdev->node, "has-mdio", NULL)) | 267 | if (of_get_property(ofdev->dev.of_node, "has-mdio", NULL)) |
268 | dev->flags |= EMAC_RGMII_FLAG_HAS_MDIO; | 268 | dev->flags |= EMAC_RGMII_FLAG_HAS_MDIO; |
269 | 269 | ||
270 | /* CAB lacks the right properties, fix this up */ | 270 | /* CAB lacks the right properties, fix this up */ |
271 | if (of_device_is_compatible(ofdev->node, "ibm,rgmii-axon")) | 271 | if (of_device_is_compatible(ofdev->dev.of_node, "ibm,rgmii-axon")) |
272 | dev->flags |= EMAC_RGMII_FLAG_HAS_MDIO; | 272 | dev->flags |= EMAC_RGMII_FLAG_HAS_MDIO; |
273 | 273 | ||
274 | DBG2(dev, " Boot FER = 0x%08x, SSR = 0x%08x\n", | 274 | DBG2(dev, " Boot FER = 0x%08x, SSR = 0x%08x\n", |
@@ -279,7 +279,7 @@ static int __devinit rgmii_probe(struct of_device *ofdev, | |||
279 | 279 | ||
280 | printk(KERN_INFO | 280 | printk(KERN_INFO |
281 | "RGMII %s initialized with%s MDIO support\n", | 281 | "RGMII %s initialized with%s MDIO support\n", |
282 | ofdev->node->full_name, | 282 | ofdev->dev.of_node->full_name, |
283 | (dev->flags & EMAC_RGMII_FLAG_HAS_MDIO) ? "" : "out"); | 283 | (dev->flags & EMAC_RGMII_FLAG_HAS_MDIO) ? "" : "out"); |
284 | 284 | ||
285 | wmb(); | 285 | wmb(); |
diff --git a/drivers/net/ibm_newemac/tah.c b/drivers/net/ibm_newemac/tah.c index 30173a9fb557..4f64b00dd5e8 100644 --- a/drivers/net/ibm_newemac/tah.c +++ b/drivers/net/ibm_newemac/tah.c | |||
@@ -57,7 +57,8 @@ void tah_reset(struct of_device *ofdev) | |||
57 | --n; | 57 | --n; |
58 | 58 | ||
59 | if (unlikely(!n)) | 59 | if (unlikely(!n)) |
60 | printk(KERN_ERR "%s: reset timeout\n", ofdev->node->full_name); | 60 | printk(KERN_ERR "%s: reset timeout\n", |
61 | ofdev->dev.of_node->full_name); | ||
61 | 62 | ||
62 | /* 10KB TAH TX FIFO accomodates the max MTU of 9000 */ | 63 | /* 10KB TAH TX FIFO accomodates the max MTU of 9000 */ |
63 | out_be32(&p->mr, | 64 | out_be32(&p->mr, |
@@ -89,7 +90,7 @@ void *tah_dump_regs(struct of_device *ofdev, void *buf) | |||
89 | static int __devinit tah_probe(struct of_device *ofdev, | 90 | static int __devinit tah_probe(struct of_device *ofdev, |
90 | const struct of_device_id *match) | 91 | const struct of_device_id *match) |
91 | { | 92 | { |
92 | struct device_node *np = ofdev->node; | 93 | struct device_node *np = ofdev->dev.of_node; |
93 | struct tah_instance *dev; | 94 | struct tah_instance *dev; |
94 | struct resource regs; | 95 | struct resource regs; |
95 | int rc; | 96 | int rc; |
@@ -127,7 +128,7 @@ static int __devinit tah_probe(struct of_device *ofdev, | |||
127 | tah_reset(ofdev); | 128 | tah_reset(ofdev); |
128 | 129 | ||
129 | printk(KERN_INFO | 130 | printk(KERN_INFO |
130 | "TAH %s initialized\n", ofdev->node->full_name); | 131 | "TAH %s initialized\n", ofdev->dev.of_node->full_name); |
131 | wmb(); | 132 | wmb(); |
132 | 133 | ||
133 | return 0; | 134 | return 0; |
diff --git a/drivers/net/ibm_newemac/zmii.c b/drivers/net/ibm_newemac/zmii.c index 1f038f808ab3..b4fa823ed201 100644 --- a/drivers/net/ibm_newemac/zmii.c +++ b/drivers/net/ibm_newemac/zmii.c | |||
@@ -121,13 +121,14 @@ int __devinit zmii_attach(struct of_device *ofdev, int input, int *mode) | |||
121 | dev->mode = *mode; | 121 | dev->mode = *mode; |
122 | 122 | ||
123 | printk(KERN_NOTICE "%s: bridge in %s mode\n", | 123 | printk(KERN_NOTICE "%s: bridge in %s mode\n", |
124 | ofdev->node->full_name, zmii_mode_name(dev->mode)); | 124 | ofdev->dev.of_node->full_name, |
125 | zmii_mode_name(dev->mode)); | ||
125 | } else { | 126 | } else { |
126 | /* All inputs must use the same mode */ | 127 | /* All inputs must use the same mode */ |
127 | if (*mode != PHY_MODE_NA && *mode != dev->mode) { | 128 | if (*mode != PHY_MODE_NA && *mode != dev->mode) { |
128 | printk(KERN_ERR | 129 | printk(KERN_ERR |
129 | "%s: invalid mode %d specified for input %d\n", | 130 | "%s: invalid mode %d specified for input %d\n", |
130 | ofdev->node->full_name, *mode, input); | 131 | ofdev->dev.of_node->full_name, *mode, input); |
131 | mutex_unlock(&dev->lock); | 132 | mutex_unlock(&dev->lock); |
132 | return -EINVAL; | 133 | return -EINVAL; |
133 | } | 134 | } |
@@ -233,7 +234,7 @@ void *zmii_dump_regs(struct of_device *ofdev, void *buf) | |||
233 | static int __devinit zmii_probe(struct of_device *ofdev, | 234 | static int __devinit zmii_probe(struct of_device *ofdev, |
234 | const struct of_device_id *match) | 235 | const struct of_device_id *match) |
235 | { | 236 | { |
236 | struct device_node *np = ofdev->node; | 237 | struct device_node *np = ofdev->dev.of_node; |
237 | struct zmii_instance *dev; | 238 | struct zmii_instance *dev; |
238 | struct resource regs; | 239 | struct resource regs; |
239 | int rc; | 240 | int rc; |
@@ -273,7 +274,7 @@ static int __devinit zmii_probe(struct of_device *ofdev, | |||
273 | out_be32(&dev->base->fer, 0); | 274 | out_be32(&dev->base->fer, 0); |
274 | 275 | ||
275 | printk(KERN_INFO | 276 | printk(KERN_INFO |
276 | "ZMII %s initialized\n", ofdev->node->full_name); | 277 | "ZMII %s initialized\n", ofdev->dev.of_node->full_name); |
277 | wmb(); | 278 | wmb(); |
278 | dev_set_drvdata(&ofdev->dev, dev); | 279 | dev_set_drvdata(&ofdev->dev, dev); |
279 | 280 | ||
diff --git a/drivers/net/ll_temac_main.c b/drivers/net/ll_temac_main.c index ba617e3cf1bb..9c7395c10e44 100644 --- a/drivers/net/ll_temac_main.c +++ b/drivers/net/ll_temac_main.c | |||
@@ -858,14 +858,14 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match) | |||
858 | mutex_init(&lp->indirect_mutex); | 858 | mutex_init(&lp->indirect_mutex); |
859 | 859 | ||
860 | /* map device registers */ | 860 | /* map device registers */ |
861 | lp->regs = of_iomap(op->node, 0); | 861 | lp->regs = of_iomap(op->dev.of_node, 0); |
862 | if (!lp->regs) { | 862 | if (!lp->regs) { |
863 | dev_err(&op->dev, "could not map temac regs.\n"); | 863 | dev_err(&op->dev, "could not map temac regs.\n"); |
864 | goto nodev; | 864 | goto nodev; |
865 | } | 865 | } |
866 | 866 | ||
867 | /* Find the DMA node, map the DMA registers, and decode the DMA IRQs */ | 867 | /* Find the DMA node, map the DMA registers, and decode the DMA IRQs */ |
868 | np = of_parse_phandle(op->node, "llink-connected", 0); | 868 | np = of_parse_phandle(op->dev.of_node, "llink-connected", 0); |
869 | if (!np) { | 869 | if (!np) { |
870 | dev_err(&op->dev, "could not find DMA node\n"); | 870 | dev_err(&op->dev, "could not find DMA node\n"); |
871 | goto nodev; | 871 | goto nodev; |
@@ -890,7 +890,7 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match) | |||
890 | of_node_put(np); /* Finished with the DMA node; drop the reference */ | 890 | of_node_put(np); /* Finished with the DMA node; drop the reference */ |
891 | 891 | ||
892 | /* Retrieve the MAC address */ | 892 | /* Retrieve the MAC address */ |
893 | addr = of_get_property(op->node, "local-mac-address", &size); | 893 | addr = of_get_property(op->dev.of_node, "local-mac-address", &size); |
894 | if ((!addr) || (size != 6)) { | 894 | if ((!addr) || (size != 6)) { |
895 | dev_err(&op->dev, "could not find MAC address\n"); | 895 | dev_err(&op->dev, "could not find MAC address\n"); |
896 | rc = -ENODEV; | 896 | rc = -ENODEV; |
@@ -898,11 +898,11 @@ temac_of_probe(struct of_device *op, const struct of_device_id *match) | |||
898 | } | 898 | } |
899 | temac_set_mac_address(ndev, (void *)addr); | 899 | temac_set_mac_address(ndev, (void *)addr); |
900 | 900 | ||
901 | rc = temac_mdio_setup(lp, op->node); | 901 | rc = temac_mdio_setup(lp, op->dev.of_node); |
902 | if (rc) | 902 | if (rc) |
903 | dev_warn(&op->dev, "error registering MDIO bus\n"); | 903 | dev_warn(&op->dev, "error registering MDIO bus\n"); |
904 | 904 | ||
905 | lp->phy_node = of_parse_phandle(op->node, "phy-handle", 0); | 905 | lp->phy_node = of_parse_phandle(op->dev.of_node, "phy-handle", 0); |
906 | if (lp->phy_node) | 906 | if (lp->phy_node) |
907 | dev_dbg(lp->dev, "using PHY node %s (%p)\n", np->full_name, np); | 907 | dev_dbg(lp->dev, "using PHY node %s (%p)\n", np->full_name, np); |
908 | 908 | ||
diff --git a/drivers/net/myri_sbus.c b/drivers/net/myri_sbus.c index b72e749afdf1..e21439f1e775 100644 --- a/drivers/net/myri_sbus.c +++ b/drivers/net/myri_sbus.c | |||
@@ -928,7 +928,7 @@ static const struct net_device_ops myri_ops = { | |||
928 | 928 | ||
929 | static int __devinit myri_sbus_probe(struct of_device *op, const struct of_device_id *match) | 929 | static int __devinit myri_sbus_probe(struct of_device *op, const struct of_device_id *match) |
930 | { | 930 | { |
931 | struct device_node *dp = op->node; | 931 | struct device_node *dp = op->dev.of_node; |
932 | static unsigned version_printed; | 932 | static unsigned version_printed; |
933 | struct net_device *dev; | 933 | struct net_device *dev; |
934 | struct myri_eth *mp; | 934 | struct myri_eth *mp; |
diff --git a/drivers/net/niu.c b/drivers/net/niu.c index d5cd16bfc907..9c1604c04450 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c | |||
@@ -9094,7 +9094,7 @@ static int __devinit niu_n2_irq_init(struct niu *np, u8 *ldg_num_map) | |||
9094 | const u32 *int_prop; | 9094 | const u32 *int_prop; |
9095 | int i; | 9095 | int i; |
9096 | 9096 | ||
9097 | int_prop = of_get_property(op->node, "interrupts", NULL); | 9097 | int_prop = of_get_property(op->dev.of_node, "interrupts", NULL); |
9098 | if (!int_prop) | 9098 | if (!int_prop) |
9099 | return -ENODEV; | 9099 | return -ENODEV; |
9100 | 9100 | ||
@@ -9245,7 +9245,7 @@ static int __devinit niu_get_of_props(struct niu *np) | |||
9245 | int prop_len; | 9245 | int prop_len; |
9246 | 9246 | ||
9247 | if (np->parent->plat_type == PLAT_TYPE_NIU) | 9247 | if (np->parent->plat_type == PLAT_TYPE_NIU) |
9248 | dp = np->op->node; | 9248 | dp = np->op->dev.of_node; |
9249 | else | 9249 | else |
9250 | dp = pci_device_to_OF_node(np->pdev); | 9250 | dp = pci_device_to_OF_node(np->pdev); |
9251 | 9251 | ||
@@ -10056,10 +10056,10 @@ static int __devinit niu_of_probe(struct of_device *op, | |||
10056 | 10056 | ||
10057 | niu_driver_version(); | 10057 | niu_driver_version(); |
10058 | 10058 | ||
10059 | reg = of_get_property(op->node, "reg", NULL); | 10059 | reg = of_get_property(op->dev.of_node, "reg", NULL); |
10060 | if (!reg) { | 10060 | if (!reg) { |
10061 | dev_err(&op->dev, "%s: No 'reg' property, aborting\n", | 10061 | dev_err(&op->dev, "%s: No 'reg' property, aborting\n", |
10062 | op->node->full_name); | 10062 | op->dev.of_node->full_name); |
10063 | return -ENODEV; | 10063 | return -ENODEV; |
10064 | } | 10064 | } |
10065 | 10065 | ||
@@ -10072,7 +10072,7 @@ static int __devinit niu_of_probe(struct of_device *op, | |||
10072 | np = netdev_priv(dev); | 10072 | np = netdev_priv(dev); |
10073 | 10073 | ||
10074 | memset(&parent_id, 0, sizeof(parent_id)); | 10074 | memset(&parent_id, 0, sizeof(parent_id)); |
10075 | parent_id.of = of_get_parent(op->node); | 10075 | parent_id.of = of_get_parent(op->dev.of_node); |
10076 | 10076 | ||
10077 | np->parent = niu_get_parent(np, &parent_id, | 10077 | np->parent = niu_get_parent(np, &parent_id, |
10078 | PLAT_TYPE_NIU); | 10078 | PLAT_TYPE_NIU); |
diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c index 35897134a5dd..641973ca2417 100644 --- a/drivers/net/phy/mdio-gpio.c +++ b/drivers/net/phy/mdio-gpio.c | |||
@@ -199,12 +199,12 @@ static int __devinit mdio_ofgpio_probe(struct of_device *ofdev, | |||
199 | if (!pdata) | 199 | if (!pdata) |
200 | return -ENOMEM; | 200 | return -ENOMEM; |
201 | 201 | ||
202 | ret = of_get_gpio(ofdev->node, 0); | 202 | ret = of_get_gpio(ofdev->dev.of_node, 0); |
203 | if (ret < 0) | 203 | if (ret < 0) |
204 | goto out_free; | 204 | goto out_free; |
205 | pdata->mdc = ret; | 205 | pdata->mdc = ret; |
206 | 206 | ||
207 | ret = of_get_gpio(ofdev->node, 1); | 207 | ret = of_get_gpio(ofdev->dev.of_node, 1); |
208 | if (ret < 0) | 208 | if (ret < 0) |
209 | goto out_free; | 209 | goto out_free; |
210 | pdata->mdio = ret; | 210 | pdata->mdio = ret; |
@@ -213,7 +213,7 @@ static int __devinit mdio_ofgpio_probe(struct of_device *ofdev, | |||
213 | if (!new_bus) | 213 | if (!new_bus) |
214 | goto out_free; | 214 | goto out_free; |
215 | 215 | ||
216 | ret = of_mdiobus_register(new_bus, ofdev->node); | 216 | ret = of_mdiobus_register(new_bus, ofdev->dev.of_node); |
217 | if (ret) | 217 | if (ret) |
218 | mdio_gpio_bus_deinit(&ofdev->dev); | 218 | mdio_gpio_bus_deinit(&ofdev->dev); |
219 | 219 | ||
diff --git a/drivers/net/sunbmac.c b/drivers/net/sunbmac.c index ed7865a0b5b2..bd286ec5abd9 100644 --- a/drivers/net/sunbmac.c +++ b/drivers/net/sunbmac.c | |||
@@ -1133,8 +1133,8 @@ static int __devinit bigmac_ether_init(struct of_device *op, | |||
1133 | goto fail_and_cleanup; | 1133 | goto fail_and_cleanup; |
1134 | 1134 | ||
1135 | /* Get supported SBUS burst sizes. */ | 1135 | /* Get supported SBUS burst sizes. */ |
1136 | bsizes = of_getintprop_default(qec_op->node, "burst-sizes", 0xff); | 1136 | bsizes = of_getintprop_default(qec_op->dev.of_node, "burst-sizes", 0xff); |
1137 | bsizes_more = of_getintprop_default(qec_op->node, "burst-sizes", 0xff); | 1137 | bsizes_more = of_getintprop_default(qec_op->dev.of_node, "burst-sizes", 0xff); |
1138 | 1138 | ||
1139 | bsizes &= 0xff; | 1139 | bsizes &= 0xff; |
1140 | if (bsizes_more != 0xff) | 1140 | if (bsizes_more != 0xff) |
@@ -1186,7 +1186,7 @@ static int __devinit bigmac_ether_init(struct of_device *op, | |||
1186 | } | 1186 | } |
1187 | 1187 | ||
1188 | /* Get the board revision of this BigMAC. */ | 1188 | /* Get the board revision of this BigMAC. */ |
1189 | bp->board_rev = of_getintprop_default(bp->bigmac_op->node, | 1189 | bp->board_rev = of_getintprop_default(bp->bigmac_op->dev.of_node, |
1190 | "board-version", 1); | 1190 | "board-version", 1); |
1191 | 1191 | ||
1192 | /* Init auto-negotiation timer state. */ | 1192 | /* Init auto-negotiation timer state. */ |
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index b17dbb11bd67..c6463f71c916 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c | |||
@@ -2483,7 +2483,7 @@ static void hme_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info | |||
2483 | else { | 2483 | else { |
2484 | const struct linux_prom_registers *regs; | 2484 | const struct linux_prom_registers *regs; |
2485 | struct of_device *op = hp->happy_dev; | 2485 | struct of_device *op = hp->happy_dev; |
2486 | regs = of_get_property(op->node, "regs", NULL); | 2486 | regs = of_get_property(op->dev.of_node, "regs", NULL); |
2487 | if (regs) | 2487 | if (regs) |
2488 | sprintf(info->bus_info, "SBUS:%d", | 2488 | sprintf(info->bus_info, "SBUS:%d", |
2489 | regs->which_io); | 2489 | regs->which_io); |
@@ -2643,14 +2643,14 @@ static const struct net_device_ops hme_netdev_ops = { | |||
2643 | #ifdef CONFIG_SBUS | 2643 | #ifdef CONFIG_SBUS |
2644 | static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe) | 2644 | static int __devinit happy_meal_sbus_probe_one(struct of_device *op, int is_qfe) |
2645 | { | 2645 | { |
2646 | struct device_node *dp = op->node, *sbus_dp; | 2646 | struct device_node *dp = op->dev.of_node, *sbus_dp; |
2647 | struct quattro *qp = NULL; | 2647 | struct quattro *qp = NULL; |
2648 | struct happy_meal *hp; | 2648 | struct happy_meal *hp; |
2649 | struct net_device *dev; | 2649 | struct net_device *dev; |
2650 | int i, qfe_slot = -1; | 2650 | int i, qfe_slot = -1; |
2651 | int err = -ENODEV; | 2651 | int err = -ENODEV; |
2652 | 2652 | ||
2653 | sbus_dp = to_of_device(op->dev.parent)->node; | 2653 | sbus_dp = to_of_device(op->dev.parent)->dev.of_node; |
2654 | 2654 | ||
2655 | /* We can match PCI devices too, do not accept those here. */ | 2655 | /* We can match PCI devices too, do not accept those here. */ |
2656 | if (strcmp(sbus_dp->name, "sbus")) | 2656 | if (strcmp(sbus_dp->name, "sbus")) |
@@ -3241,7 +3241,7 @@ static void happy_meal_pci_exit(void) | |||
3241 | #ifdef CONFIG_SBUS | 3241 | #ifdef CONFIG_SBUS |
3242 | static int __devinit hme_sbus_probe(struct of_device *op, const struct of_device_id *match) | 3242 | static int __devinit hme_sbus_probe(struct of_device *op, const struct of_device_id *match) |
3243 | { | 3243 | { |
3244 | struct device_node *dp = op->node; | 3244 | struct device_node *dp = op->dev.of_node; |
3245 | const char *model = of_get_property(dp, "model", NULL); | 3245 | const char *model = of_get_property(dp, "model", NULL); |
3246 | int is_qfe = (match->data != NULL); | 3246 | int is_qfe = (match->data != NULL); |
3247 | 3247 | ||
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c index 0c21653ff9f9..28afc86e0694 100644 --- a/drivers/net/sunlance.c +++ b/drivers/net/sunlance.c | |||
@@ -1324,7 +1324,7 @@ static int __devinit sparc_lance_probe_one(struct of_device *op, | |||
1324 | struct of_device *ledma, | 1324 | struct of_device *ledma, |
1325 | struct of_device *lebuffer) | 1325 | struct of_device *lebuffer) |
1326 | { | 1326 | { |
1327 | struct device_node *dp = op->node; | 1327 | struct device_node *dp = op->dev.of_node; |
1328 | static unsigned version_printed; | 1328 | static unsigned version_printed; |
1329 | struct lance_private *lp; | 1329 | struct lance_private *lp; |
1330 | struct net_device *dev; | 1330 | struct net_device *dev; |
@@ -1411,7 +1411,7 @@ static int __devinit sparc_lance_probe_one(struct of_device *op, | |||
1411 | 1411 | ||
1412 | lp->burst_sizes = 0; | 1412 | lp->burst_sizes = 0; |
1413 | if (lp->ledma) { | 1413 | if (lp->ledma) { |
1414 | struct device_node *ledma_dp = ledma->node; | 1414 | struct device_node *ledma_dp = ledma->dev.of_node; |
1415 | struct device_node *sbus_dp; | 1415 | struct device_node *sbus_dp; |
1416 | unsigned int sbmask; | 1416 | unsigned int sbmask; |
1417 | const char *prop; | 1417 | const char *prop; |
@@ -1507,7 +1507,7 @@ fail: | |||
1507 | static int __devinit sunlance_sbus_probe(struct of_device *op, const struct of_device_id *match) | 1507 | static int __devinit sunlance_sbus_probe(struct of_device *op, const struct of_device_id *match) |
1508 | { | 1508 | { |
1509 | struct of_device *parent = to_of_device(op->dev.parent); | 1509 | struct of_device *parent = to_of_device(op->dev.parent); |
1510 | struct device_node *parent_dp = parent->node; | 1510 | struct device_node *parent_dp = parent->dev.of_node; |
1511 | int err; | 1511 | int err; |
1512 | 1512 | ||
1513 | if (!strcmp(parent_dp->name, "ledma")) { | 1513 | if (!strcmp(parent_dp->name, "ledma")) { |
diff --git a/drivers/net/sunqe.c b/drivers/net/sunqe.c index be637dce944c..9864f4fa69d5 100644 --- a/drivers/net/sunqe.c +++ b/drivers/net/sunqe.c | |||
@@ -696,7 +696,7 @@ static void qe_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info) | |||
696 | strcpy(info->version, "3.0"); | 696 | strcpy(info->version, "3.0"); |
697 | 697 | ||
698 | op = qep->op; | 698 | op = qep->op; |
699 | regs = of_get_property(op->node, "reg", NULL); | 699 | regs = of_get_property(op->dev.of_node, "reg", NULL); |
700 | if (regs) | 700 | if (regs) |
701 | sprintf(info->bus_info, "SBUS:%d", regs->which_io); | 701 | sprintf(info->bus_info, "SBUS:%d", regs->which_io); |
702 | 702 | ||
@@ -800,7 +800,7 @@ static struct sunqec * __devinit get_qec(struct of_device *child) | |||
800 | if (qec_global_reset(qecp->gregs)) | 800 | if (qec_global_reset(qecp->gregs)) |
801 | goto fail; | 801 | goto fail; |
802 | 802 | ||
803 | qecp->qec_bursts = qec_get_burst(op->node); | 803 | qecp->qec_bursts = qec_get_burst(op->dev.of_node); |
804 | 804 | ||
805 | qec_init_once(qecp, op); | 805 | qec_init_once(qecp, op); |
806 | 806 | ||
@@ -858,7 +858,7 @@ static int __devinit qec_ether_init(struct of_device *op) | |||
858 | 858 | ||
859 | res = -ENODEV; | 859 | res = -ENODEV; |
860 | 860 | ||
861 | i = of_getintprop_default(op->node, "channel#", -1); | 861 | i = of_getintprop_default(op->dev.of_node, "channel#", -1); |
862 | if (i == -1) | 862 | if (i == -1) |
863 | goto fail; | 863 | goto fail; |
864 | qe->channel = i; | 864 | qe->channel = i; |
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 1b0aef37e495..88ebfc976735 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c | |||
@@ -3721,7 +3721,7 @@ static const struct net_device_ops ucc_geth_netdev_ops = { | |||
3721 | static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *match) | 3721 | static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *match) |
3722 | { | 3722 | { |
3723 | struct device *device = &ofdev->dev; | 3723 | struct device *device = &ofdev->dev; |
3724 | struct device_node *np = ofdev->node; | 3724 | struct device_node *np = ofdev->dev.of_node; |
3725 | struct net_device *dev = NULL; | 3725 | struct net_device *dev = NULL; |
3726 | struct ucc_geth_private *ugeth = NULL; | 3726 | struct ucc_geth_private *ugeth = NULL; |
3727 | struct ucc_geth_info *ug_info; | 3727 | struct ucc_geth_info *ug_info; |
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c index 1e783ccc306e..3dd2416db540 100644 --- a/drivers/net/xilinx_emaclite.c +++ b/drivers/net/xilinx_emaclite.c | |||
@@ -1090,7 +1090,7 @@ static void xemaclite_remove_ndev(struct net_device *ndev) | |||
1090 | */ | 1090 | */ |
1091 | static bool get_bool(struct of_device *ofdev, const char *s) | 1091 | static bool get_bool(struct of_device *ofdev, const char *s) |
1092 | { | 1092 | { |
1093 | u32 *p = (u32 *)of_get_property(ofdev->node, s, NULL); | 1093 | u32 *p = (u32 *)of_get_property(ofdev->dev.of_node, s, NULL); |
1094 | 1094 | ||
1095 | if (p) { | 1095 | if (p) { |
1096 | return (bool)*p; | 1096 | return (bool)*p; |
@@ -1132,14 +1132,14 @@ static int __devinit xemaclite_of_probe(struct of_device *ofdev, | |||
1132 | dev_info(dev, "Device Tree Probing\n"); | 1132 | dev_info(dev, "Device Tree Probing\n"); |
1133 | 1133 | ||
1134 | /* Get iospace for the device */ | 1134 | /* Get iospace for the device */ |
1135 | rc = of_address_to_resource(ofdev->node, 0, &r_mem); | 1135 | rc = of_address_to_resource(ofdev->dev.of_node, 0, &r_mem); |
1136 | if (rc) { | 1136 | if (rc) { |
1137 | dev_err(dev, "invalid address\n"); | 1137 | dev_err(dev, "invalid address\n"); |
1138 | return rc; | 1138 | return rc; |
1139 | } | 1139 | } |
1140 | 1140 | ||
1141 | /* Get IRQ for the device */ | 1141 | /* Get IRQ for the device */ |
1142 | rc = of_irq_to_resource(ofdev->node, 0, &r_irq); | 1142 | rc = of_irq_to_resource(ofdev->dev.of_node, 0, &r_irq); |
1143 | if (rc == NO_IRQ) { | 1143 | if (rc == NO_IRQ) { |
1144 | dev_err(dev, "no IRQ found\n"); | 1144 | dev_err(dev, "no IRQ found\n"); |
1145 | return rc; | 1145 | return rc; |
@@ -1184,7 +1184,7 @@ static int __devinit xemaclite_of_probe(struct of_device *ofdev, | |||
1184 | lp->next_rx_buf_to_use = 0x0; | 1184 | lp->next_rx_buf_to_use = 0x0; |
1185 | lp->tx_ping_pong = get_bool(ofdev, "xlnx,tx-ping-pong"); | 1185 | lp->tx_ping_pong = get_bool(ofdev, "xlnx,tx-ping-pong"); |
1186 | lp->rx_ping_pong = get_bool(ofdev, "xlnx,rx-ping-pong"); | 1186 | lp->rx_ping_pong = get_bool(ofdev, "xlnx,rx-ping-pong"); |
1187 | mac_address = of_get_mac_address(ofdev->node); | 1187 | mac_address = of_get_mac_address(ofdev->dev.of_node); |
1188 | 1188 | ||
1189 | if (mac_address) | 1189 | if (mac_address) |
1190 | /* Set the MAC address. */ | 1190 | /* Set the MAC address. */ |
@@ -1199,7 +1199,7 @@ static int __devinit xemaclite_of_probe(struct of_device *ofdev, | |||
1199 | /* Set the MAC address in the EmacLite device */ | 1199 | /* Set the MAC address in the EmacLite device */ |
1200 | xemaclite_update_address(lp, ndev->dev_addr); | 1200 | xemaclite_update_address(lp, ndev->dev_addr); |
1201 | 1201 | ||
1202 | lp->phy_node = of_parse_phandle(ofdev->node, "phy-handle", 0); | 1202 | lp->phy_node = of_parse_phandle(ofdev->dev.of_node, "phy-handle", 0); |
1203 | rc = xemaclite_mdio_setup(lp, &ofdev->dev); | 1203 | rc = xemaclite_mdio_setup(lp, &ofdev->dev); |
1204 | if (rc) | 1204 | if (rc) |
1205 | dev_warn(&ofdev->dev, "error registering MDIO bus\n"); | 1205 | dev_warn(&ofdev->dev, "error registering MDIO bus\n"); |