libfs: add simple_open()
authorStephen Boyd <sboyd@codeaurora.org>
Thu, 5 Apr 2012 21:25:09 +0000 (14:25 -0700)
committerVarun Wadekar <vwadekar@nvidia.com>
Wed, 18 Apr 2012 13:09:44 +0000 (18:09 +0530)
commit80dd3f598e03bcfe4d4f6c745c34e57477cb683e
tree47abebf99fed487e4a460c4ff04b812e341d623f
parentbe04502e840e3e6b9cb3c68cfb3c2a8c525be06f
libfs: add simple_open()

debugfs and a few other drivers use an open-coded version of
simple_open() to pass a pointer from the file to the read/write file
ops.  Add support for this simple case to libfs so that we can remove
the many duplicate copies of this simple function.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/libfs.c
include/linux/fs.h