]> git.karo-electronics.de Git - linux-beck.git/commit
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>
Wed, 21 Sep 2016 10:13:31 +0000 (12:13 +0200)
commit86f0e06767dda7863d6d2a8f0b3b857e6ea876a0
tree0bba8aec84b2143fa932cc40e4ea8738d859463a
parent2f5bb02ff22414ce156cacb163dd594b017af357
debugfs: introduce a public file_operations accessor

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>
Cc: stable <stable@vger.kernel.org> # 4.7+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/debugfs/file.c
include/linux/debugfs.h