]> git.sur5r.net Git - u-boot/blobdiff - examples/eepro100_eeprom.c
mx31 litekit support
[u-boot] / examples / eepro100_eeprom.c
index 020c31d2f53543846417d446d7fc82feca93eed8..2b15d05adbb287c988899bc2ad09a3e0cbbc935b 100644 (file)
@@ -17,8 +17,9 @@
  * and release the resulting code under the GPL.
  */
 
-#define _PPC_STRING_H_         /* avoid unnecessary str/mem functions */
-#define _LINUX_STRING_H_       /* avoid unnecessary str/mem functions */
+/* avoid unnecessary memcpy function */
+#define __HAVE_ARCH_MEMCPY
+#define _PPC_STRING_H_
 
 #include <common.h>
 #include <exports.h>
@@ -79,7 +80,10 @@ 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)++;
+       while (len-- > 0) {
+               *ret++ = *((char *)src);
+               src++;
+       }
        return (void *)ret;
 }