[U-Boot] [PATCH] Fix breakage in SMC EEPROM standalone applications

Commit 6a45e384955262882375a2785426dc65aeb636c4 (Make getenv_IPaddr() global) inadvertently added ' #include "net.h" ' to the standalone programs, creating duplicate definitions of 'struct eth_device'. This patch removes the local definitions and removes other code that breaks due to the change in definition.
Signed-off-by: Ben Warren biggerbadderben@gmail.com --- examples/standalone/smc91111_eeprom.c | 2 -- examples/standalone/smc911x_eeprom.c | 8 -------- 2 files changed, 0 insertions(+), 10 deletions(-)
diff --git a/examples/standalone/smc91111_eeprom.c b/examples/standalone/smc91111_eeprom.c index 428ea7b..9145763 100644 --- a/examples/standalone/smc91111_eeprom.c +++ b/examples/standalone/smc91111_eeprom.c @@ -29,8 +29,6 @@
#include <common.h> #include <exports.h> -/* the smc91111.h gets base addr through eth_device' iobase */ -struct eth_device { unsigned long iobase; }; #include "../drivers/net/smc91111.h"
#ifndef SMC91111_EEPROM_INIT diff --git a/examples/standalone/smc911x_eeprom.c b/examples/standalone/smc911x_eeprom.c index fff3123..104047f 100644 --- a/examples/standalone/smc911x_eeprom.c +++ b/examples/standalone/smc911x_eeprom.c @@ -16,13 +16,6 @@
#include <common.h> #include <exports.h> - -/* the smc911x.h gets base addr through eth_device' iobase */ -struct eth_device { - const char *name; - unsigned long iobase; - void *priv; -}; #include "../drivers/net/smc911x.h"
/** @@ -324,7 +317,6 @@ int smc911x_eeprom(int argc, char *argv[]) { /* Avoid initializing on stack as gcc likes to call memset() */ struct eth_device dev; - dev.name = __func__; dev.iobase = CONFIG_SMC911X_BASE;
/* Print the ABI version */

On 18.01.2010 20:35, Ben Warren wrote:
Commit 6a45e384955262882375a2785426dc65aeb636c4 (Make getenv_IPaddr() global) inadvertently added ' #include "net.h" ' to the standalone programs, creating duplicate definitions of 'struct eth_device'. This patch removes the local definitions and removes other code that breaks due to the change in definition.
Yes, great. This looks better than my proposal to fix this some minutes ago :)
Thanks
Dirk
Signed-off-by: Ben Warrenbiggerbadderben@gmail.com
examples/standalone/smc91111_eeprom.c | 2 -- examples/standalone/smc911x_eeprom.c | 8 -------- 2 files changed, 0 insertions(+), 10 deletions(-)
diff --git a/examples/standalone/smc91111_eeprom.c b/examples/standalone/smc91111_eeprom.c index 428ea7b..9145763 100644 --- a/examples/standalone/smc91111_eeprom.c +++ b/examples/standalone/smc91111_eeprom.c @@ -29,8 +29,6 @@
#include<common.h> #include<exports.h> -/* the smc91111.h gets base addr through eth_device' iobase */ -struct eth_device { unsigned long iobase; }; #include "../drivers/net/smc91111.h"
#ifndef SMC91111_EEPROM_INIT diff --git a/examples/standalone/smc911x_eeprom.c b/examples/standalone/smc911x_eeprom.c index fff3123..104047f 100644 --- a/examples/standalone/smc911x_eeprom.c +++ b/examples/standalone/smc911x_eeprom.c @@ -16,13 +16,6 @@
#include<common.h> #include<exports.h>
-/* the smc911x.h gets base addr through eth_device' iobase */ -struct eth_device {
- const char *name;
- unsigned long iobase;
- void *priv;
-}; #include "../drivers/net/smc911x.h"
/** @@ -324,7 +317,6 @@ int smc911x_eeprom(int argc, char *argv[]) { /* Avoid initializing on stack as gcc likes to call memset() */ struct eth_device dev;
dev.name = __func__; dev.iobase = CONFIG_SMC911X_BASE;
/* Print the ABI version */

On Monday 18 January 2010 14:35:31 Ben Warren wrote:
--- a/examples/standalone/smc911x_eeprom.c +++ b/examples/standalone/smc911x_eeprom.c @@ -324,7 +317,6 @@ int smc911x_eeprom(int argc, char *argv[]) { /* Avoid initializing on stack as gcc likes to call memset() */ struct eth_device dev;
- dev.name = __func__; dev.iobase = CONFIG_SMC911X_BASE;
the .name was added because some patch was changing smc911x.h to use it in error reporting, but i guess that never made it in as the current header uses DRIVERNAME ...
Acked-by: Mike Frysinger vapier@gentoo.org -mike

Dear Ben Warren,
In message 1263843331-30089-1-git-send-email-biggerbadderben@gmail.com you wrote:
Commit 6a45e384955262882375a2785426dc65aeb636c4 (Make getenv_IPaddr() global) inadvertently added ' #include "net.h" ' to the standalone programs, creating duplicate definitions of 'struct eth_device'. This patch removes the local definitions and removes other code that breaks due to the change in definition.
Signed-off-by: Ben Warren biggerbadderben@gmail.com
examples/standalone/smc91111_eeprom.c | 2 -- examples/standalone/smc911x_eeprom.c | 8 -------- 2 files changed, 0 insertions(+), 10 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
participants (4)
-
Ben Warren
-
Dirk Behme
-
Mike Frysinger
-
Wolfgang Denk