diff options
Diffstat (limited to 'drivers/net/macb.c')
-rw-r--r-- | drivers/net/macb.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/macb.c b/drivers/net/macb.c index 2eba2a52f1..3aec0c4aeb 100644 --- a/drivers/net/macb.c +++ b/drivers/net/macb.c @@ -241,9 +241,8 @@ static int macb_open(struct eth_device *edev) macb->interface); } -static int macb_init(struct eth_device *edev) +static void macb_init(struct macb_device *macb) { - struct macb_device *macb = edev->priv; unsigned long paddr, val = 0; int i; @@ -284,8 +283,6 @@ static int macb_init(struct eth_device *edev) /* Enable TX and RX */ macb_writel(macb, NCR, MACB_BIT(TE) | MACB_BIT(RE)); - - return 0; } static void macb_halt(struct eth_device *edev) @@ -423,7 +420,6 @@ static int macb_probe(struct device_d *dev) macb->dev = dev; - edev->init = macb_init; edev->open = macb_open; edev->send = macb_send; edev->recv = macb_recv; @@ -474,6 +470,8 @@ static int macb_probe(struct device_d *dev) macb_writel(macb, NCFGR, ncfgr); + macb_init(macb); + mdiobus_register(&macb->miibus); eth_register(edev); |