Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

move memory_read_from_buffer() from fs.h to string.h

James Bottomley warns that inclusion of linux/fs.h in a low level
driver was always a danger signal. This patch moves
memory_read_from_buffer() from fs.h to string.h and fixes includes in
existing memory_read_from_buffer() users.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: James Bottomley <James.Bottomley@hansenpartnership.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Bob Moore <robert.moore@intel.com>
Cc: Thomas Renninger <trenn@suse.de>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Akinobu Mita and committed by
Linus Torvalds
e108526e 338b9bb3

+4 -3
+1
drivers/acpi/system.c
··· 26 26 #include <linux/proc_fs.h> 27 27 #include <linux/seq_file.h> 28 28 #include <linux/init.h> 29 + #include <linux/string.h> 29 30 #include <asm/uaccess.h> 30 31 31 32 #include <acpi/acpi_drivers.h>
-1
drivers/zorro/zorro-sysfs.c
··· 15 15 #include <linux/zorro.h> 16 16 #include <linux/stat.h> 17 17 #include <linux/string.h> 18 - #include <linux/fs.h> 19 18 20 19 #include "zorro.h" 21 20
-2
include/linux/fs.h
··· 2006 2006 2007 2007 extern ssize_t simple_read_from_buffer(void __user *to, size_t count, 2008 2008 loff_t *ppos, const void *from, size_t available); 2009 - extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos, 2010 - const void *from, size_t available); 2011 2009 2012 2010 #ifdef CONFIG_MIGRATION 2013 2011 extern int buffer_migrate_page(struct address_space *,
+3
include/linux/string.h
··· 111 111 112 112 extern bool sysfs_streq(const char *s1, const char *s2); 113 113 114 + extern ssize_t memory_read_from_buffer(void *to, size_t count, loff_t *ppos, 115 + const void *from, size_t available); 116 + 114 117 #endif 115 118 #endif /* _LINUX_STRING_H_ */