summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-04-04 19:12:06 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-04-09 14:13:36 -0400
commit14805359c790977199e0d74fe689c2c17e6a0954 (patch)
treef72619b82856163a213dc5e88549ed526873a954 /net
parent345566bd724e13448c10f1489dbc18290af01931 (diff)
downloadop-kernel-dev-14805359c790977199e0d74fe689c2c17e6a0954.zip
op-kernel-dev-14805359c790977199e0d74fe689c2c17e6a0954.tar.gz
bluetooth: don't bother with ->owner for procfs fops
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/af_bluetooth.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
index 82040e4..8ab94c6 100644
--- a/net/bluetooth/af_bluetooth.c
+++ b/net/bluetooth/af_bluetooth.c
@@ -627,6 +627,13 @@ static int bt_seq_open(struct inode *inode, struct file *file)
return 0;
}
+static const struct file_operations bt_fops = {
+ .open = bt_seq_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = seq_release_private
+};
+
int bt_procfs_init(struct module* module, struct net *net, const char *name,
struct bt_sock_list* sk_list,
int (* seq_show)(struct seq_file *, void *))
@@ -635,13 +642,7 @@ int bt_procfs_init(struct module* module, struct net *net, const char *name,
sk_list->custom_seq_show = seq_show;
- sk_list->fops.owner = module;
- sk_list->fops.open = bt_seq_open;
- sk_list->fops.read = seq_read;
- sk_list->fops.llseek = seq_lseek;
- sk_list->fops.release = seq_release_private;
-
- pde = proc_create(name, 0, net->proc_net, &sk_list->fops);
+ pde = proc_create(name, 0, net->proc_net, &bt_fops);
if (!pde)
return -ENOMEM;
OpenPOWER on IntegriCloud