From ca24324ce1388f7c6740c9b4f6acc119ab70c831 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 5 Jul 2007 18:01:25 +0200 Subject: svn_rev_129 make it work again --- drivers/net/at91_ether.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'drivers/net/at91_ether.c') diff --git a/drivers/net/at91_ether.c b/drivers/net/at91_ether.c index d2d3e3ab97..4c1da1178e 100644 --- a/drivers/net/at91_ether.c +++ b/drivers/net/at91_ether.c @@ -22,8 +22,10 @@ */ #include +#include #include #include +#include /* ----- Ethernet Buffer definitions ----- */ @@ -147,7 +149,7 @@ UCHAR at91rm9200_EmacWritePhy (AT91PS_EMAC p_mac, return TRUE; } -static int at91rm9200_eth_init (struct eth_device *ndev, bd_t * bd) +static int at91rm9200_eth_init (struct device_d *dev) { int i; @@ -205,7 +207,7 @@ static int at91rm9200_eth_init (struct eth_device *ndev, bd_t * bd) return 0; } -static int at91rm9200_eth_open (struct eth_device *ndev, bd_t * bd) +static int at91rm9200_eth_open (struct eth_device *ndev) { int ret; @@ -314,7 +316,6 @@ static int at91rm9200_set_mac_address(struct eth_device *eth, unsigned char *adr } struct eth_device at91rm9200_eth = { - .init = at91rm9200_eth_init, .open = at91rm9200_eth_open, .send = at91rm9200_eth_send, .recv = at91rm9200_eth_rx, @@ -323,3 +324,18 @@ struct eth_device at91rm9200_eth = { .set_mac_address = at91rm9200_set_mac_address, }; +static struct driver_d at91_eth_driver = { + .name = "at91_eth", + .probe = at91rm9200_eth_init, + .type = DEVICE_TYPE_ETHER, + .type_data = &at91rm9200_eth, +}; + +static int at91_eth_init(void) +{ + register_driver(&at91_eth_driver); + return 0; +} + +device_initcall(at91_eth_init); + -- cgit v1.2.3