summaryrefslogtreecommitdiff
path: root/fs/sysfs/sysfs.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-10-02 01:42:07 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-06 04:27:40 +0400
commit73d9714627adced2942e8d53ce0e73d9699a996c (patch)
treebd144cf3a7871240386c70fae6c4492f3331c093 /fs/sysfs/sysfs.h
parent2f0c6b7593a590eef7fa35344da57380fcee7581 (diff)
downloadlinux-73d9714627adced2942e8d53ce0e73d9699a996c.tar.xz
sysfs: copy bin mmap support from fs/sysfs/bin.c to fs/sysfs/file.c
sysfs bin file handling will be merged into the regular file support. This patch copies mmap support from bin so that fs/sysfs/file.c can handle mmapping bin files. The code is copied mostly verbatim with the following updates. * ->mmapped and ->vm_ops are added to sysfs_open_file and bin_buffer references are replaced with sysfs_open_file ones. * Symbols are prefixed with sysfs_. * sysfs_unmap_bin_file() grabs sysfs_open_dirent and traverses ->files. Invocation of this function is added to sysfs_addrm_finish(). * sysfs_bin_mmap() is added to sysfs_bin_operations. This is a preparation and the new mmap path isn't used yet. Signed-off-by: Tejun Heo <tj@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/sysfs/sysfs.h')
-rw-r--r--fs/sysfs/sysfs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/sysfs/sysfs.h b/fs/sysfs/sysfs.h
index f103bac53df7..c960d6272cf6 100644
--- a/fs/sysfs/sysfs.h
+++ b/fs/sysfs/sysfs.h
@@ -220,6 +220,8 @@ int sysfs_add_file(struct sysfs_dirent *dir_sd,
int sysfs_add_file_mode_ns(struct sysfs_dirent *dir_sd,
const struct attribute *attr, int type,
umode_t amode, const void *ns);
+void sysfs_unmap_bin_file(struct sysfs_dirent *sd);
+
/*
* bin.c
*/