aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/bmac.c5
-rw-r--r--drivers/net/ehea/ehea_main.c4
-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.c16
8 files changed, 19 insertions, 20 deletions
diff --git a/drivers/net/bmac.c b/drivers/net/bmac.c
index aa01ba347fed..c143304dcff5 100644
--- a/drivers/net/bmac.c
+++ b/drivers/net/bmac.c
@@ -1261,10 +1261,9 @@ static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_device_i
1261 printk(KERN_ERR "BMAC: can't use, need 3 addrs and 3 intrs\n"); 1261 printk(KERN_ERR "BMAC: can't use, need 3 addrs and 3 intrs\n");
1262 return -ENODEV; 1262 return -ENODEV;
1263 } 1263 }
1264 prop_addr = of_get_property(macio_get_of_node(mdev), 1264 prop_addr = get_property(macio_get_of_node(mdev), "mac-address", NULL);
1265 "mac-address", NULL);
1266 if (prop_addr == NULL) { 1265 if (prop_addr == NULL) {
1267 prop_addr = of_get_property(macio_get_of_node(mdev), 1266 prop_addr = get_property(macio_get_of_node(mdev),
1268 "local-mac-address", NULL); 1267 "local-mac-address", NULL);
1269 if (prop_addr == NULL) { 1268 if (prop_addr == NULL) {
1270 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 6d5effd89897..d1a8134c8e31 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -2336,7 +2336,7 @@ static int ehea_setup_single_port(struct ehea_port *port,
2336 port->of_dev_node = dn; 2336 port->of_dev_node = dn;
2337 2337
2338 /* Determine logical port id */ 2338 /* Determine logical port id */
2339 dn_log_port_id = of_get_property(dn, "ibm,hea-port-no", NULL); 2339 dn_log_port_id = get_property(dn, "ibm,hea-port-no", NULL);
2340 2340
2341 if (!dn_log_port_id) { 2341 if (!dn_log_port_id) {
2342 ehea_error("bad device node: dn_log_port_id=%p", 2342 ehea_error("bad device node: dn_log_port_id=%p",
@@ -2502,7 +2502,7 @@ static int __devinit ehea_probe(struct ibmebus_dev *dev,
2502 goto out; 2502 goto out;
2503 } 2503 }
2504 2504
2505 adapter_handle = of_get_property(dev->ofdev.node, "ibm,hea-handle", 2505 adapter_handle = get_property(dev->ofdev.node, "ibm,hea-handle",
2506 NULL); 2506 NULL);
2507 if (adapter_handle) 2507 if (adapter_handle)
2508 adapter->handle = *adapter_handle; 2508 adapter->handle = *adapter_handle;
diff --git a/drivers/net/mace.c b/drivers/net/mace.c
index 7018ba92ce8f..9ec24f0d5d68 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 = of_get_property(mace, "mac-address", NULL); 113 addr = get_property(mace, "mac-address", NULL);
114 if (addr == NULL) { 114 if (addr == NULL) {
115 addr = of_get_property(mace, "local-mac-address", NULL); 115 addr = 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 cb7a8e7729a2..d670ac74824f 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 = of_get_property(dn, "mac-address", NULL); 83 maddr = 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 698476154d81..3b91af89e4c7 100644
--- a/drivers/net/spider_net.c
+++ b/drivers/net/spider_net.c
@@ -1831,7 +1831,7 @@ try_host_fw:
1831 if (!dn) 1831 if (!dn)
1832 goto out_err; 1832 goto out_err;
1833 1833
1834 fw_prop = of_get_property(dn, "firmware", &fw_size); 1834 fw_prop = get_property(dn, "firmware", &fw_size);
1835 if (!fw_prop) 1835 if (!fw_prop)
1836 goto out_err; 1836 goto out_err;
1837 1837
@@ -2237,7 +2237,7 @@ spider_net_setup_netdev(struct spider_net_card *card)
2237 if (!dn) 2237 if (!dn)
2238 return -EIO; 2238 return -EIO;
2239 2239
2240 mac = of_get_property(dn, "local-mac-address", NULL); 2240 mac = get_property(dn, "local-mac-address", NULL);
2241 if (!mac) 2241 if (!mac)
2242 return -EIO; 2242 return -EIO;
2243 memcpy(addr.sa_data, mac, ETH_ALEN); 2243 memcpy(addr.sa_data, mac, ETH_ALEN);
diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
index 6b1cd745af08..08ea61db46fe 100644
--- a/drivers/net/sungem.c
+++ b/drivers/net/sungem.c
@@ -2929,7 +2929,7 @@ static int __devinit gem_get_device_address(struct gem *gp)
2929#elif defined(CONFIG_PPC_PMAC) 2929#elif defined(CONFIG_PPC_PMAC)
2930 const unsigned char *addr; 2930 const unsigned char *addr;
2931 2931
2932 addr = of_get_property(gp->of_node, "local-mac-address", NULL); 2932 addr = get_property(gp->of_node, "local-mac-address", NULL);
2933 if (addr == NULL) { 2933 if (addr == NULL) {
2934 printk("\n"); 2934 printk("\n");
2935 printk(KERN_ERR "%s: can't get mac-address\n", dev->name); 2935 printk(KERN_ERR "%s: can't get mac-address\n", dev->name);
diff --git a/drivers/net/sungem_phy.c b/drivers/net/sungem_phy.c
index 61843fd57525..56a110ca5e6f 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 || of_get_property(np, "no-autolowpower", NULL)) 454 if (np == NULL || 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 12d394ffade7..639e1e6913bf 100644
--- a/drivers/net/ucc_geth.c
+++ b/drivers/net/ucc_geth.c
@@ -4080,16 +4080,16 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
4080 4080
4081 ugeth_vdbg("%s: IN", __FUNCTION__); 4081 ugeth_vdbg("%s: IN", __FUNCTION__);
4082 4082
4083 prop = of_get_property(np, "device-id", NULL); 4083 prop = get_property(np, "device-id", NULL);
4084 ucc_num = *prop - 1; 4084 ucc_num = *prop - 1;
4085 if ((ucc_num < 0) || (ucc_num > 7)) 4085 if ((ucc_num < 0) || (ucc_num > 7))
4086 return -ENODEV; 4086 return -ENODEV;
4087 4087
4088 ug_info = &ugeth_info[ucc_num]; 4088 ug_info = &ugeth_info[ucc_num];
4089 ug_info->uf_info.ucc_num = ucc_num; 4089 ug_info->uf_info.ucc_num = ucc_num;
4090 prop = of_get_property(np, "rx-clock", NULL); 4090 prop = get_property(np, "rx-clock", NULL);
4091 ug_info->uf_info.rx_clock = *prop; 4091 ug_info->uf_info.rx_clock = *prop;
4092 prop = of_get_property(np, "tx-clock", NULL); 4092 prop = get_property(np, "tx-clock", NULL);
4093 ug_info->uf_info.tx_clock = *prop; 4093 ug_info->uf_info.tx_clock = *prop;
4094 err = of_address_to_resource(np, 0, &res); 4094 err = of_address_to_resource(np, 0, &res);
4095 if (err) 4095 if (err)
@@ -4098,15 +4098,15 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
4098 ug_info->uf_info.regs = res.start; 4098 ug_info->uf_info.regs = res.start;
4099 ug_info->uf_info.irq = irq_of_parse_and_map(np, 0); 4099 ug_info->uf_info.irq = irq_of_parse_and_map(np, 0);
4100 4100
4101 ph = of_get_property(np, "phy-handle", NULL); 4101 ph = get_property(np, "phy-handle", NULL);
4102 phy = of_find_node_by_phandle(*ph); 4102 phy = of_find_node_by_phandle(*ph);
4103 4103
4104 if (phy == NULL) 4104 if (phy == NULL)
4105 return -ENODEV; 4105 return -ENODEV;
4106 4106
4107 prop = of_get_property(phy, "reg", NULL); 4107 prop = get_property(phy, "reg", NULL);
4108 ug_info->phy_address = *prop; 4108 ug_info->phy_address = *prop;
4109 prop = of_get_property(phy, "interface", NULL); 4109 prop = get_property(phy, "interface", NULL);
4110 ug_info->enet_interface = *prop; 4110 ug_info->enet_interface = *prop;
4111 ug_info->phy_interrupt = irq_of_parse_and_map(phy, 0); 4111 ug_info->phy_interrupt = irq_of_parse_and_map(phy, 0);
4112 ug_info->board_flags = (ug_info->phy_interrupt == NO_IRQ)? 4112 ug_info->board_flags = (ug_info->phy_interrupt == NO_IRQ)?
@@ -4127,7 +4127,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
4127 /* timing. */ 4127 /* timing. */
4128 /* The following compensates by writing to the reserved */ 4128 /* The following compensates by writing to the reserved */
4129 /* QE Port Output Hold Registers (CPOH1?). */ 4129 /* QE Port Output Hold Registers (CPOH1?). */
4130 prop = of_get_property(phy, "interface", NULL); 4130 prop = get_property(phy, "interface", NULL);
4131 phy_interface = *prop; 4131 phy_interface = *prop;
4132 if ((phy_interface == ENET_1000_RGMII) || 4132 if ((phy_interface == ENET_1000_RGMII) ||
4133 (phy_interface == ENET_100_RGMII) || 4133 (phy_interface == ENET_100_RGMII) ||
@@ -4140,7 +4140,7 @@ static int ucc_geth_probe(struct of_device* ofdev, const struct of_device_id *ma
4140 soc = of_find_node_by_type(NULL, "soc"); 4140 soc = of_find_node_by_type(NULL, "soc");
4141 if (soc) { 4141 if (soc) {
4142 unsigned int size; 4142 unsigned int size;
4143 const void *prop = of_get_property(soc, "reg", &size); 4143 const void *prop = get_property(soc, "reg", &size);
4144 immrbase = of_translate_address(soc, prop); 4144 immrbase = of_translate_address(soc, prop);
4145 of_node_put(soc); 4145 of_node_put(soc);
4146 }; 4146 };