debugfs: introduce a public file_operations accessor
authorChristian Lamparter <chunkeey@googlemail.com>
Sat, 17 Sep 2016 19:43:01 +0000 (21:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Oct 2016 10:06:46 +0000 (12:06 +0200)
commitfd29d6808628988887504cec139fdcec5d478f13
tree2286390af8d1065633ba3466362cc341cc5d8fb6
parentc24d81a7f283b9021971451cbe95b1db067a07eb
debugfs: introduce a public file_operations accessor

commit 86f0e06767dda7863d6d2a8f0b3b857e6ea876a0 upstream.

This patch introduces an accessor which can be used
by the users of debugfs (drivers, fs, ...) to get the
original file_operations struct. It also removes the
REAL_FOPS_DEREF macro in file.c and converts the code
to use the public version.

Previously, REAL_FOPS_DEREF was only available within
the file.c of debugfs. But having a public getter
available for debugfs users is important as some
drivers (carl9170 and b43) use the pointer of the
original file_operations in conjunction with container_of()
within their debugfs implementations.

Reviewed-by: Nicolai Stange <nicstange@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/debugfs/file.c
include/linux/debugfs.h