diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2006-07-12 01:41:03 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-07-31 01:55:05 -0400 |
commit | 1a2509c946bfd4d4a4c5a6e816082d3a7de45db8 (patch) | |
tree | 1a99101fe9be656b928272925102c602e6650562 /drivers/net/bmac.c | |
parent | 294ef16a2ee34d0d94aa63616f7552d3bc66c982 (diff) |
[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.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/net/bmac.c b/drivers/net/bmac.c index 6fad83f24c4f..711609665632 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 | |||
1264 | { | 1264 | { |
1265 | int j, rev, ret; | 1265 | int j, rev, ret; |
1266 | struct bmac_data *bp; | 1266 | struct bmac_data *bp; |
1267 | unsigned char *addr; | 1267 | const unsigned char *prop_addr; |
1268 | unsigned char addr[6]; | ||
1268 | struct net_device *dev; | 1269 | struct net_device *dev; |
1269 | int is_bmac_plus = ((int)match->data) != 0; | 1270 | int is_bmac_plus = ((int)match->data) != 0; |
1270 | 1271 | ||
@@ -1272,14 +1273,16 @@ static int __devinit bmac_probe(struct macio_dev *mdev, const struct of_device_i | |||
1272 | printk(KERN_ERR "BMAC: can't use, need 3 addrs and 3 intrs\n"); | 1273 | printk(KERN_ERR "BMAC: can't use, need 3 addrs and 3 intrs\n"); |
1273 | return -ENODEV; | 1274 | return -ENODEV; |
1274 | } | 1275 | } |
1275 | addr = get_property(macio_get_of_node(mdev), "mac-address", NULL); | 1276 | prop_addr = get_property(macio_get_of_node(mdev), "mac-address", NULL); |
1276 | if (addr == NULL) { | 1277 | if (prop_addr == NULL) { |
1277 | addr = get_property(macio_get_of_node(mdev), "local-mac-address", NULL); | 1278 | prop_addr = get_property(macio_get_of_node(mdev), |
1278 | if (addr == NULL) { | 1279 | "local-mac-address", NULL); |
1280 | if (prop_addr == NULL) { | ||
1279 | printk(KERN_ERR "BMAC: Can't get mac-address\n"); | 1281 | printk(KERN_ERR "BMAC: Can't get mac-address\n"); |
1280 | return -ENODEV; | 1282 | return -ENODEV; |
1281 | } | 1283 | } |
1282 | } | 1284 | } |
1285 | memcpy(addr, prop_addr, sizeof(addr)); | ||
1283 | 1286 | ||
1284 | dev = alloc_etherdev(PRIV_BYTES); | 1287 | dev = alloc_etherdev(PRIV_BYTES); |
1285 | if (!dev) { | 1288 | if (!dev) { |