summaryrefslogtreecommitdiff
path: root/drivers/net/bmac.c
diff options
context:
space:
mode:
authorJeremy Kerr <jk@ozlabs.org>2006-07-12 15:41:03 +1000
committerPaul Mackerras <paulus@samba.org>2006-07-31 15:55:05 +1000
commit1a2509c946bfd4d4a4c5a6e816082d3a7de45db8 (patch)
tree1a99101fe9be656b928272925102c602e6650562 /drivers/net/bmac.c
parent294ef16a2ee34d0d94aa63616f7552d3bc66c982 (diff)
downloadlinux-3.10-1a2509c946bfd4d4a4c5a6e816082d3a7de45db8.tar.gz
linux-3.10-1a2509c946bfd4d4a4c5a6e816082d3a7de45db8.tar.bz2
linux-3.10-1a2509c946bfd4d4a4c5a6e816082d3a7de45db8.zip
[POWERPC] netdevices: Constify & voidify get_property()
Now that get_property() returns a void *, there's no need to cast its return value. Also, treat the return value as const, so we can constify get_property later. powerpc-specific network device driver changes. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers/net/bmac.c')
-rw-r--r--drivers/net/bmac.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/bmac.c b/drivers/net/bmac.c
index 6fad83f24c4..71160966563 100644
--- a/drivers/net/bmac.c
+++ b/drivers/net/bmac.c
@@ -1264,7 +1264,8 @@ static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_device_i
{
int j, rev, ret;
struct bmac_data *bp;
- unsigned char *addr;
+ const unsigned char *prop_addr;
+ unsigned char addr[6];
struct net_device *dev;
int is_bmac_plus = ((int)match->data) != 0;
@@ -1272,14 +1273,16 @@ static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_device_i
printk(KERN_ERR "BMAC: can't use, need 3 addrs and 3 intrs\n");
return -ENODEV;
}
- addr = get_property(macio_get_of_node(mdev), "mac-address", NULL);
- if (addr == NULL) {
- addr = get_property(macio_get_of_node(mdev), "local-mac-address", NULL);
- if (addr == NULL) {
+ prop_addr = get_property(macio_get_of_node(mdev), "mac-address", NULL);
+ if (prop_addr == NULL) {
+ prop_addr = get_property(macio_get_of_node(mdev),
+ "local-mac-address", NULL);
+ if (prop_addr == NULL) {
printk(KERN_ERR "BMAC: Can't get mac-address\n");
return -ENODEV;
}
}
+ memcpy(addr, prop_addr, sizeof(addr));
dev = alloc_etherdev(PRIV_BYTES);
if (!dev) {