mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
libceph: simplify our debugfs attr macro
No need to do single_open()'s job ourselves. Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
This commit is contained in:
parent
ff7eeb82cc
commit
9571eb4f96
1 changed files with 1 additions and 7 deletions
|
@ -7,13 +7,7 @@
|
||||||
#define CEPH_DEFINE_SHOW_FUNC(name) \
|
#define CEPH_DEFINE_SHOW_FUNC(name) \
|
||||||
static int name##_open(struct inode *inode, struct file *file) \
|
static int name##_open(struct inode *inode, struct file *file) \
|
||||||
{ \
|
{ \
|
||||||
struct seq_file *sf; \
|
return single_open(file, name, inode->i_private); \
|
||||||
int ret; \
|
|
||||||
\
|
|
||||||
ret = single_open(file, name, NULL); \
|
|
||||||
sf = file->private_data; \
|
|
||||||
sf->private = inode->i_private; \
|
|
||||||
return ret; \
|
|
||||||
} \
|
} \
|
||||||
\
|
\
|
||||||
static const struct file_operations name##_fops = { \
|
static const struct file_operations name##_fops = { \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue