Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <[EMAIL PROTECTED]>
---
 examples/eepro100_eeprom.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/examples/eepro100_eeprom.c b/examples/eepro100_eeprom.c
index 2b15d05..5f4eb78 100644
--- a/examples/eepro100_eeprom.c
+++ b/examples/eepro100_eeprom.c
@@ -80,11 +80,13 @@ static inline short inw(long addr)
 static inline void *memcpy(void *dst, const void *src, unsigned int len)
 {
        char *ret = dst;
+
        while (len-- > 0) {
                *ret++ = *((char *)src);
                src++;
        }
-       return (void *)ret;
+
+       return (void *)dst;
 }
 
 /* The EEPROM commands include the alway-set leading bit. */
@@ -109,6 +111,7 @@ static inline void *memcpy(void *dst, const void *src, 
unsigned int len)
 static int eeprom_busy_poll(long ee_ioaddr)
 {
        int i;
+
        outw(EE_ENB, ee_ioaddr);
        for (i = 0; i < 10000; i++)                     /* Typical 2000 ticks */
                if (inw(ee_ioaddr) & EE_DATA_READ)
-- 
1.5.5.1


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to