lib: Sparc's strncpy_from_user is generic enough, move under lib/

To use this, an architecture simply needs to:

1) Provide a user_addr_max() implementation via asm/uaccess.h

2) Add "select GENERIC_STRNCPY_FROM_USER" to their arch Kcnfig

3) Remove the existing strncpy_from_user() implementation and symbol
   exports their architecture had.

Signed-off-by: David S. Miller <[email protected]>
Acked-by: David Howells <[email protected]>
This commit is contained in:
David S. Miller 2012-05-24 13:12:28 -07:00
commit 2922585b93
5 changed files with 152 additions and 144 deletions

View file

@ -123,6 +123,8 @@ obj-$(CONFIG_SIGNATURE) += digsig.o
obj-$(CONFIG_CLZ_TAB) += clz_tab.o
obj-$(CONFIG_GENERIC_STRNCPY_FROM_USER) += strncpy_from_user.o
hostprogs-y := gen_crc32table
clean-files := crc32table.h