summaryrefslogtreecommitdiffstats
path: root/drivers/net/irda/vlsi_ir.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-04-29 01:02:29 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 08:06:22 -0700
commita95609cb0283a23e519e607ff9fc2a4aa77e2532 (patch)
tree053d411aa27dafead6326a70d0ca3482bd2d0494 /drivers/net/irda/vlsi_ir.c
parentcf7acfab032ff262f42954328cdfd20a5d9aaaac (diff)
downloadtalos-obmc-linux-a95609cb0283a23e519e607ff9fc2a4aa77e2532.tar.gz
talos-obmc-linux-a95609cb0283a23e519e607ff9fc2a4aa77e2532.zip
netdev: use non-racy method for proc entries creation
Use proc_create()/proc_create_data() to make sure that ->proc_fops and ->data be setup before gluing PDE to main tree. Signed-off-by: Denis V. Lunev <den@openvz.org> Cc: Jeff Garzik <jgarzik@pobox.com> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/net/irda/vlsi_ir.c')
-rw-r--r--drivers/net/irda/vlsi_ir.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c
index acd082a96a4f..d15e00b8591e 100644
--- a/drivers/net/irda/vlsi_ir.c
+++ b/drivers/net/irda/vlsi_ir.c
@@ -1674,13 +1674,12 @@ vlsi_irda_probe(struct pci_dev *pdev, const struct pci_device_id *id)
if (vlsi_proc_root != NULL) {
struct proc_dir_entry *ent;
- ent = create_proc_entry(ndev->name, S_IFREG|S_IRUGO, vlsi_proc_root);
+ ent = proc_create_data(ndev->name, S_IFREG|S_IRUGO,
+ vlsi_proc_root, VLSI_PROC_FOPS, ndev);
if (!ent) {
IRDA_WARNING("%s: failed to create proc entry\n",
__FUNCTION__);
} else {
- ent->data = ndev;
- ent->proc_fops = VLSI_PROC_FOPS;
ent->size = 0;
}
idev->proc_entry = ent;
OpenPOWER on IntegriCloud