Commit 86fa60e5 authored by David S. Miller's avatar David S. Miller

[NET]: Convert PPC 8260_io/fcc_enet.c away from init_etherdev().

parent 760bebe1
...@@ -1328,7 +1328,7 @@ int __init fec_enet_init(void) ...@@ -1328,7 +1328,7 @@ int __init fec_enet_init(void)
struct net_device *dev; struct net_device *dev;
struct fcc_enet_private *cep; struct fcc_enet_private *cep;
fcc_info_t *fip; fcc_info_t *fip;
int i, np; int i, np, err;
volatile immap_t *immap; volatile immap_t *immap;
volatile iop8260_t *io; volatile iop8260_t *io;
...@@ -1339,15 +1339,11 @@ int __init fec_enet_init(void) ...@@ -1339,15 +1339,11 @@ int __init fec_enet_init(void)
fip = fcc_ports; fip = fcc_ports;
while (np-- > 0) { while (np-- > 0) {
dev = alloc_etherdev(sizeof(*cep));
/* Allocate some private information. if (!dev)
*/
cep = (struct fcc_enet_private *)
kmalloc(sizeof(*cep), GFP_KERNEL);
if (cep == NULL)
return -ENOMEM; return -ENOMEM;
__clear_user(cep,sizeof(*cep)); cep = dev->priv;
spin_lock_init(&cep->lock); spin_lock_init(&cep->lock);
cep->fip = fip; cep->fip = fip;
...@@ -1376,6 +1372,12 @@ int __init fec_enet_init(void) ...@@ -1376,6 +1372,12 @@ int __init fec_enet_init(void)
init_fcc_startup(fip, dev); init_fcc_startup(fip, dev);
err = register_netdev(dev);
if (err) {
kfree(dev);
return err;
}
printk("%s: FCC ENET Version 0.3, ", dev->name); printk("%s: FCC ENET Version 0.3, ", dev->name);
for (i=0; i<5; i++) for (i=0; i<5; i++)
printk("%02x:", dev->dev_addr[i]); printk("%02x:", dev->dev_addr[i]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment