From d0025e5edf0e593da599358d70fdade47c3b703e Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 21 Nov 2007 15:34:51 +0800 Subject: Blackfin arch: move EXPORT_SYMBOL() to C files where the symbol is actually defined Signed-off-by: Mike Frysinger Signed-off-by: Bryan Wu --- arch/blackfin/kernel/bfin_ksyms.c | 3 --- arch/blackfin/lib/strcmp.c | 11 ++++++++++- arch/blackfin/lib/strcpy.c | 11 ++++++++++- arch/blackfin/lib/strncmp.c | 11 ++++++++++- arch/blackfin/lib/strncpy.c | 11 ++++++++++- include/asm-blackfin/string.h | 2 ++ 6 files changed, 42 insertions(+), 7 deletions(-) diff --git a/arch/blackfin/kernel/bfin_ksyms.c b/arch/blackfin/kernel/bfin_ksyms.c index b3fa7d8fde6a..e491633e9d33 100644 --- a/arch/blackfin/kernel/bfin_ksyms.c +++ b/arch/blackfin/kernel/bfin_ksyms.c @@ -37,8 +37,6 @@ /* platform dependent support */ EXPORT_SYMBOL(__ioremap); -EXPORT_SYMBOL(strcmp); -EXPORT_SYMBOL(strncmp); EXPORT_SYMBOL(ip_fast_csum); @@ -59,7 +57,6 @@ EXPORT_SYMBOL(csum_partial_copy); * their interface isn't gonna change any time soon now, so * it's OK to leave it out of version control. */ -EXPORT_SYMBOL(strcpy); EXPORT_SYMBOL(memcpy); EXPORT_SYMBOL(memset); EXPORT_SYMBOL(memcmp); diff --git a/arch/blackfin/lib/strcmp.c b/arch/blackfin/lib/strcmp.c index 4eeefd86907f..fde39a1950ce 100644 --- a/arch/blackfin/lib/strcmp.c +++ b/arch/blackfin/lib/strcmp.c @@ -1,10 +1,19 @@ -#include +/* + * Provide symbol in case str func is not inlined. + * + * Copyright (c) 2006-2007 Analog Devices Inc. + * + * Licensed under the GPL-2 or later. + */ #define strcmp __inline_strcmp #include #undef strcmp +#include + int strcmp(const char *dest, const char *src) { return __inline_strcmp(dest, src); } +EXPORT_SYMBOL(strcmp); diff --git a/arch/blackfin/lib/strcpy.c b/arch/blackfin/lib/strcpy.c index 534589db7256..2a8836b1f4d3 100644 --- a/arch/blackfin/lib/strcpy.c +++ b/arch/blackfin/lib/strcpy.c @@ -1,10 +1,19 @@ -#include +/* + * Provide symbol in case str func is not inlined. + * + * Copyright (c) 2006-2007 Analog Devices Inc. + * + * Licensed under the GPL-2 or later. + */ #define strcpy __inline_strcpy #include #undef strcpy +#include + char *strcpy(char *dest, const char *src) { return __inline_strcpy(dest, src); } +EXPORT_SYMBOL(strcpy); diff --git a/arch/blackfin/lib/strncmp.c b/arch/blackfin/lib/strncmp.c index d791f120bff7..2aaae78a68e0 100644 --- a/arch/blackfin/lib/strncmp.c +++ b/arch/blackfin/lib/strncmp.c @@ -1,10 +1,19 @@ -#include +/* + * Provide symbol in case str func is not inlined. + * + * Copyright (c) 2006-2007 Analog Devices Inc. + * + * Licensed under the GPL-2 or later. + */ #define strncmp __inline_strncmp #include #undef strncmp +#include + int strncmp(const char *cs, const char *ct, size_t count) { return __inline_strncmp(cs, ct, count); } +EXPORT_SYMBOL(strncmp); diff --git a/arch/blackfin/lib/strncpy.c b/arch/blackfin/lib/strncpy.c index 1fecb5c71ffb..ea1dc6bf2373 100644 --- a/arch/blackfin/lib/strncpy.c +++ b/arch/blackfin/lib/strncpy.c @@ -1,10 +1,19 @@ -#include +/* + * Provide symbol in case str func is not inlined. + * + * Copyright (c) 2006-2007 Analog Devices Inc. + * + * Licensed under the GPL-2 or later. + */ #define strncpy __inline_strncpy #include #undef strncpy +#include + char *strncpy(char *dest, const char *src, size_t n) { return __inline_strncpy(dest, src, n); } +EXPORT_SYMBOL(strncpy); diff --git a/include/asm-blackfin/string.h b/include/asm-blackfin/string.h index e8ada91ab002..321f4d96e4ae 100644 --- a/include/asm-blackfin/string.h +++ b/include/asm-blackfin/string.h @@ -1,6 +1,8 @@ #ifndef _BLACKFIN_STRING_H_ #define _BLACKFIN_STRING_H_ +#include + #ifdef __KERNEL__ /* only set these up for kernel code */ #define __HAVE_ARCH_STRCPY -- cgit v1.2.3-59-g8ed1b