diff options
| author | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-04 19:12:06 -0400 |
|---|---|---|
| committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-04-09 14:13:36 -0400 |
| commit | 14805359c790977199e0d74fe689c2c17e6a0954 (patch) | |
| tree | f72619b82856163a213dc5e88549ed526873a954 /net/bluetooth | |
| parent | 345566bd724e13448c10f1489dbc18290af01931 (diff) | |
bluetooth: don't bother with ->owner for procfs fops
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'net/bluetooth')
| -rw-r--r-- | net/bluetooth/af_bluetooth.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c index 82040e46b24b..8ab94c6f6f3f 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) | |||
| 627 | return 0; | 627 | return 0; |
| 628 | } | 628 | } |
| 629 | 629 | ||
| 630 | static const struct file_operations bt_fops = { | ||
| 631 | .open = bt_seq_open, | ||
| 632 | .read = seq_read, | ||
| 633 | .llseek = seq_lseek, | ||
| 634 | .release = seq_release_private | ||
| 635 | }; | ||
| 636 | |||
| 630 | int bt_procfs_init(struct module* module, struct net *net, const char *name, | 637 | int bt_procfs_init(struct module* module, struct net *net, const char *name, |
| 631 | struct bt_sock_list* sk_list, | 638 | struct bt_sock_list* sk_list, |
| 632 | int (* seq_show)(struct seq_file *, void *)) | 639 | int (* seq_show)(struct seq_file *, void *)) |
| @@ -635,13 +642,7 @@ int bt_procfs_init(struct module* module, struct net *net, const char *name, | |||
| 635 | 642 | ||
| 636 | sk_list->custom_seq_show = seq_show; | 643 | sk_list->custom_seq_show = seq_show; |
| 637 | 644 | ||
| 638 | sk_list->fops.owner = module; | 645 | pde = proc_create(name, 0, net->proc_net, &bt_fops); |
| 639 | sk_list->fops.open = bt_seq_open; | ||
| 640 | sk_list->fops.read = seq_read; | ||
| 641 | sk_list->fops.llseek = seq_lseek; | ||
| 642 | sk_list->fops.release = seq_release_private; | ||
| 643 | |||
| 644 | pde = proc_create(name, 0, net->proc_net, &sk_list->fops); | ||
| 645 | if (!pde) | 646 | if (!pde) |
| 646 | return -ENOMEM; | 647 | return -ENOMEM; |
| 647 | 648 | ||
