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/fec_mpc52xx.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/fec_mpc52xx.c')
-rw-r--r-- | drivers/net/fec_mpc52xx.c | 12 |
1 files changed, 6 insertions, 6 deletions
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 | } |