Fix Ethernet init() return codes

Change return values of init() functions in all Ethernet drivers to conform
to the following:

    >=0: Success
    <0:  Failure

All drivers going forward should return 0 on success.  Current drivers that
return 1 on success were left as-is to minimize changes.

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Acked-by: Stefan Roese <sr@denx.de>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
Acked-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Acked-By: Timur Tabi <timur@freescale.com>
This commit is contained in:
Ben Warren 2008-01-09 18:15:53 -05:00 committed by Wolfgang Denk
parent d3a6532cbe
commit 422b1a0160
13 changed files with 28 additions and 27 deletions

View file

@ -423,12 +423,12 @@ static int macb_init(struct eth_device *netdev, bd_t *bd)
#endif
if (!macb_phy_init(macb))
return 0;
return -1;
/* Enable TX and RX */
macb_writel(macb, NCR, MACB_BIT(TE) | MACB_BIT(RE));
return 1;
return 0;
}
static void macb_halt(struct eth_device *netdev)