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/xilinx_emaclite.c | |
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/xilinx_emaclite.c')
-rw-r--r-- | drivers/net/xilinx_emaclite.c | 10 |
1 files changed, 5 insertions, 5 deletions
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"); |