aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2007-04-30 23:54:02 -0400
committerPaul Mackerras <paulus@samba.org>2007-05-02 06:04:32 -0400
commit40cd3a4564ed6b7bc0279430120ca0e9b83cf486 (patch)
tree1b7b7705613d915f4f2ca2f79bec4d246171086a /drivers/net
parent9f9a3b8a06b7965335bfe5162c1a50e4d9c3859b (diff)
[POWERPC] Rename get_property to of_get_property: drivers
These are all the remaining instances of get_property. Simple rename of get_property to of_get_property. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/bmac.c5
-rw-r--r--drivers/net/ehea/ehea_main.c6
-rw-r--r--drivers/net/mace.c4
-rw-r--r--drivers/net/pasemi_mac.c2
-rw-r--r--drivers/net/spider_net.c4
-rw-r--r--drivers/net/sungem.c2
-rw-r--r--drivers/net/sungem_phy.c2
-rw-r--r--drivers/net/ucc_geth.c18
-rw-r--r--drivers/net/ucc_geth_mii.c4
9 files changed, 24 insertions, 23 deletions
diff --git a/drivers/net/bmac.c b/drivers/net/bmac.c
index 4612725965df..9b8d7d9dbe86 100644
--- a/drivers/net/bmac.c
+++ b/drivers/net/bmac.c
@@ -1260,9 +1260,10 @@ static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_device_i
1260 printk(KERN_ERR "BMAC: can't use, need 3 addrs and 3 intrs\n"); 1260 printk(KERN_ERR "BMAC: can't use, need 3 addrs and 3 intrs\n");
1261 return -ENODEV; 1261 return -ENODEV;
1262 } 1262 }
1263 prop_addr = get_property(macio_get_of_node(mdev), "mac-address", NULL); 1263 prop_addr = of_get_property(macio_get_of_node(mdev),
1264 "mac-address", NULL);
1264 if (prop_addr == NULL) { 1265 if (prop_addr == NULL) {
1265 prop_addr = get_property(macio_get_of_node(mdev), 1266 prop_addr = of_get_property(macio_get_of_node(mdev),
1266 "local-mac-address", NULL); 1267 "local-mac-address", NULL);
1267 if (prop_addr == NULL) { 1268 if (prop_addr == NULL) {
1268 printk(KERN_ERR "BMAC: Can't get mac-address\n"); 1269 printk(KERN_ERR "BMAC: Can't get mac-address\n");
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index 519bb9f72d20..a1bd2d861d92 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -2609,7 +2609,7 @@ static int ehea_setup_ports(struct ehea_adapter *adapter)
2609 lhea_dn = adapter->ebus_dev->ofdev.node; 2609 lhea_dn = adapter->ebus_dev->ofdev.node;
2610 while ((eth_dn = of_get_next_child(lhea_dn, eth_dn))) { 2610 while ((eth_dn = of_get_next_child(lhea_dn, eth_dn))) {
2611 2611
2612 dn_log_port_id = get_property(eth_dn, "ibm,hea-port-no", 2612 dn_log_port_id = of_get_property(eth_dn, "ibm,hea-port-no",
2613 NULL); 2613 NULL);
2614 if (!dn_log_port_id) { 2614 if (!dn_log_port_id) {
2615 ehea_error("bad device node: eth_dn name=%s", 2615 ehea_error("bad device node: eth_dn name=%s",
@@ -2649,7 +2649,7 @@ static struct device_node *ehea_get_eth_dn(struct ehea_adapter *adapter,
2649 lhea_dn = adapter->ebus_dev->ofdev.node; 2649 lhea_dn = adapter->ebus_dev->ofdev.node;
2650 while ((eth_dn = of_get_next_child(lhea_dn, eth_dn))) { 2650 while ((eth_dn = of_get_next_child(lhea_dn, eth_dn))) {
2651 2651
2652 dn_log_port_id = get_property(eth_dn, "ibm,hea-port-no", 2652 dn_log_port_id = of_get_property(eth_dn, "ibm,hea-port-no",
2653 NULL); 2653 NULL);
2654 if (dn_log_port_id) 2654 if (dn_log_port_id)
2655 if (*dn_log_port_id == logical_port_id) 2655 if (*dn_log_port_id == logical_port_id)
@@ -2790,7 +2790,7 @@ static int __devinit ehea_probe_adapter(struct ibmebus_dev *dev,
2790 2790
2791 adapter->ebus_dev = dev; 2791 adapter->ebus_dev = dev;
2792 2792
2793 adapter_handle = get_property(dev->ofdev.node, "ibm,hea-handle", 2793 adapter_handle = of_get_property(dev->ofdev.node, "ibm,hea-handle",
2794 NULL); 2794 NULL);
2795 if (adapter_handle) 2795 if (adapter_handle)
2796 adapter->handle = *adapter_handle; 2796 adapter->handle = *adapter_handle;
diff --git a/drivers/net/mace.c b/drivers/net/mace.c
index b3bd62394958..52b9332810c5 100644
--- a/drivers/net/mace.c
+++ b/drivers/net/mace.c
@@ -110,9 +110,9 @@ static int __devinit mace_probe(struct macio_dev *mdev, const struct of_device_i
110 return -ENODEV; 110 return -ENODEV;
111 } 111 }
112 112
113 addr = get_property(mace, "mac-address", NULL); 113 addr = of_get_property(mace, "mac-address", NULL);
114 if (addr == NULL) { 114 if (addr == NULL) {
115 addr = get_property(mace, "local-mac-address", NULL); 115 addr = of_get_property(mace, "local-mac-address", NULL);
116 if (addr == NULL) { 116 if (addr == NULL) {
117 printk(KERN_ERR "Can't get mac-address for MACE %s\n", 117 printk(KERN_ERR "Can't get mac-address for MACE %s\n",
118 mace->full_name); 118 mace->full_name);
diff --git a/drivers/net/pasemi_mac.c b/drivers/net/pasemi_mac.c
index 76fe9dd8e841..07eb9b24a97f 100644
--- a/drivers/net/pasemi_mac.c
+++ b/drivers/net/pasemi_mac.c
@@ -80,7 +80,7 @@ static int pasemi_get_mac_addr(struct pasemi_mac *mac)
80 return -ENOENT; 80 return -ENOENT;
81 } 81 }
82 82
83 maddr = get_property(dn, "mac-address", NULL); 83 maddr = of_get_property(dn, "mac-address", NULL);
84 if (maddr == NULL) { 84 if (maddr == NULL) {
85 dev_warn(&pdev->dev, 85 dev_warn(&pdev->dev,
86 "no mac address in device tree, not configuring\n"); 86 "no mac address in device tree, not configuring\n");
diff --git a/drivers/net/spider_net.c b/drivers/net/spider_net.c
index 230da14b1b68..c15e97253ede 100644
--- a/drivers/net/spider_net.c
+++ b/drivers/net/spider_net.c
@@ -1830,7 +1830,7 @@ try_host_fw:
1830 if (!dn) 1830 if (!dn)
1831 goto out_err; 1831 goto out_err;
1832 1832
1833 fw_prop = get_property(dn, "firmware", &fw_size); 1833 fw_prop = of_get_property(dn, "firmware", &fw_size);
1834 if (!fw_prop) 1834 if (!fw_prop)
1835 goto out_err; 1835 goto out_err;
1836 1836
@@ -2236,7 +2236,7 @@ spider_net_setup_netdev(struct spider_net_card *card)
2236 if (!dn) 2236 if (!dn)
2237 return -EIO; 2237 return -EIO;
2238 2238
2239 mac = get_property(dn, "local-mac-address", NULL); 2239 mac = of_get_property(dn, "local-mac-address", NULL);
2240 if (!mac) 2240 if (!mac)
2241 return -EIO; 2241 return -EIO;
2242 memcpy(addr.sa_data, mac, ETH_ALEN); 2242 memcpy(addr.sa_data, mac, ETH_ALEN);
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
index 5da73212ac91..432803855034 100644
--- a/drivers/net/sungem.c
+++ b/drivers/net/sungem.c
@@ -2903,7 +2903,7 @@ static int __devinit gem_get_device_address(struct gem *gp)
2903 struct net_device *dev = gp->dev; 2903 struct net_device *dev = gp->dev;
2904 const unsigned char *addr; 2904 const unsigned char *addr;
2905 2905
2906 addr = get_property(gp->of_node, "local-mac-address", NULL); 2906 addr = of_get_property(gp->of_node, "local-mac-address", NULL);
2907 if (addr == NULL) { 2907 if (addr == NULL) {
2908#ifdef CONFIG_SPARC 2908#ifdef CONFIG_SPARC
2909 addr = idprom->id_ethaddr; 2909 addr = idprom->id_ethaddr;
diff --git a/drivers/net/sungem_phy.c b/drivers/net/sungem_phy.c
index 56a110ca5e6f..61843fd57525 100644
--- a/drivers/net/sungem_phy.c
+++ b/drivers/net/sungem_phy.c
@@ -451,7 +451,7 @@ static int bcm5421_init(struct mii_phy* phy)
451 if (phy->platform_data) { 451 if (phy->platform_data) {
452 struct device_node *np = of_get_parent(phy->platform_data); 452 struct device_node *np = of_get_parent(phy->platform_data);
453 int can_low_power = 1; 453 int can_low_power = 1;
454 if (np == NULL || get_property(np, "no-autolowpower", NULL)) 454 if (np == NULL || of_get_property(np, "no-autolowpower", NULL))
455 can_low_power = 0; 455 can_low_power = 0;
456 if (can_low_power) { 456 if (can_low_power) {
457 /* Enable automatic low-power */ 457 /* Enable automatic low-power */
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c
index 16b9acdabbe8..d7aff8189377 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -3787,7 +3787,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
3787 3787
3788 ugeth_vdbg("%s: IN", __FUNCTION__); 3788 ugeth_vdbg("%s: IN", __FUNCTION__);
3789 3789
3790 prop = get_property(np, "device-id", NULL); 3790 prop = of_get_property(np, "device-id", NULL);
3791 ucc_num = *prop - 1; 3791 ucc_num = *prop - 1;
3792 if ((ucc_num < 0) || (ucc_num > 7)) 3792 if ((ucc_num < 0) || (ucc_num > 7))
3793 return -ENODEV; 3793 return -ENODEV;
@@ -3795,9 +3795,9 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
3795 ug_info = &ugeth_info[ucc_num]; 3795 ug_info = &ugeth_info[ucc_num];
3796 ug_info->uf_info.ucc_num = ucc_num; 3796 ug_info->uf_info.ucc_num = ucc_num;
3797 3797
3798 prop = get_property(np, "rx-clock", NULL); 3798 prop = of_get_property(np, "rx-clock", NULL);
3799 ug_info->uf_info.rx_clock = *prop; 3799 ug_info->uf_info.rx_clock = *prop;
3800 prop = get_property(np, "tx-clock", NULL); 3800 prop = of_get_property(np, "tx-clock", NULL);
3801 ug_info->uf_info.tx_clock = *prop; 3801 ug_info->uf_info.tx_clock = *prop;
3802 err = of_address_to_resource(np, 0, &res); 3802 err = of_address_to_resource(np, 0, &res);
3803 if (err) 3803 if (err)
@@ -3806,23 +3806,23 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
3806 ug_info->uf_info.regs = res.start; 3806 ug_info->uf_info.regs = res.start;
3807 ug_info->uf_info.irq = irq_of_parse_and_map(np, 0); 3807 ug_info->uf_info.irq = irq_of_parse_and_map(np, 0);
3808 3808
3809 ph = get_property(np, "phy-handle", NULL); 3809 ph = of_get_property(np, "phy-handle", NULL);
3810 phy = of_find_node_by_phandle(*ph); 3810 phy = of_find_node_by_phandle(*ph);
3811 3811
3812 if (phy == NULL) 3812 if (phy == NULL)
3813 return -ENODEV; 3813 return -ENODEV;
3814 3814
3815 /* set the PHY address */ 3815 /* set the PHY address */
3816 prop = get_property(phy, "reg", NULL); 3816 prop = of_get_property(phy, "reg", NULL);
3817 if (prop == NULL) 3817 if (prop == NULL)
3818 return -1; 3818 return -1;
3819 ug_info->phy_address = *prop; 3819 ug_info->phy_address = *prop;
3820 3820
3821 /* get the phy interface type, or default to MII */ 3821 /* get the phy interface type, or default to MII */
3822 prop = get_property(np, "interface-type", NULL); 3822 prop = of_get_property(np, "interface-type", NULL);
3823 if (!prop) { 3823 if (!prop) {
3824 /* handle interface property present in old trees */ 3824 /* handle interface property present in old trees */
3825 prop = get_property(phy, "interface", NULL); 3825 prop = of_get_property(phy, "interface", NULL);
3826 if (prop != NULL) 3826 if (prop != NULL)
3827 phy_interface = enet_to_phy_interface[*prop]; 3827 phy_interface = enet_to_phy_interface[*prop];
3828 else 3828 else
@@ -3832,10 +3832,10 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
3832 } 3832 }
3833 3833
3834 /* get speed, or derive from interface */ 3834 /* get speed, or derive from interface */
3835 prop = get_property(np, "max-speed", NULL); 3835 prop = of_get_property(np, "max-speed", NULL);
3836 if (!prop) { 3836 if (!prop) {
3837 /* handle interface property present in old trees */ 3837 /* handle interface property present in old trees */
3838 prop = get_property(phy, "interface", NULL); 3838 prop = of_get_property(phy, "interface", NULL);
3839 if (prop != NULL) 3839 if (prop != NULL)
3840 max_speed = enet_to_speed[*prop]; 3840 max_speed = enet_to_speed[*prop];
3841 } else { 3841 } else {
diff --git a/drivers/net/ucc_geth_mii.c b/drivers/net/ucc_geth_mii.c
index 73b5a538e8f4..27a1ef3b7b06 100644
--- a/drivers/net/ucc_geth_mii.c
+++ b/drivers/net/ucc_geth_mii.c
@@ -172,7 +172,7 @@ static int uec_mdio_probe(struct of_device *ofdev, const struct of_device_id *ma
172 while ((child = of_get_next_child(np, child)) != NULL) { 172 while ((child = of_get_next_child(np, child)) != NULL) {
173 int irq = irq_of_parse_and_map(child, 0); 173 int irq = irq_of_parse_and_map(child, 0);
174 if (irq != NO_IRQ) { 174 if (irq != NO_IRQ) {
175 const u32 *id = get_property(child, "reg", NULL); 175 const u32 *id = of_get_property(child, "reg", NULL);
176 new_bus->irq[*id] = irq; 176 new_bus->irq[*id] = irq;
177 } 177 }
178 } 178 }
@@ -203,7 +203,7 @@ static int uec_mdio_probe(struct of_device *ofdev, const struct of_device_id *ma
203 if ((res.start >= tempres.start) && 203 if ((res.start >= tempres.start) &&
204 (res.end <= tempres.end)) { 204 (res.end <= tempres.end)) {
205 /* set this UCC to be the MII master */ 205 /* set this UCC to be the MII master */
206 const u32 *id = get_property(tempnp, "device-id", NULL); 206 const u32 *id = of_get_property(tempnp, "device-id", NULL);
207 if (id == NULL) 207 if (id == NULL)
208 goto bus_register_fail; 208 goto bus_register_fail;
209 209