summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-04-29 01:02:19 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 08:06:21 -0700
commitcdefa185dda6b2b267f088a7477e96d845bdc6c1 (patch)
tree95447a4c46352d6a353074873c11446e7c3c657f /drivers/usb/host
parenta973909fc32be90884280b7a8cd2f2e093c97890 (diff)
downloadop-kernel-dev-cdefa185dda6b2b267f088a7477e96d845bdc6c1.zip
op-kernel-dev-cdefa185dda6b2b267f088a7477e96d845bdc6c1.tar.gz
usb: 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> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> 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/usb/host')
-rw-r--r--drivers/usb/host/sl811-hcd.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c
index 3fd7a0c..4265752 100644
--- a/drivers/usb/host/sl811-hcd.c
+++ b/drivers/usb/host/sl811-hcd.c
@@ -1506,15 +1506,7 @@ static const char proc_filename[] = "driver/sl811h";
static void create_debug_file(struct sl811 *sl811)
{
- struct proc_dir_entry *pde;
-
- pde = create_proc_entry(proc_filename, 0, NULL);
- if (pde == NULL)
- return;
-
- pde->proc_fops = &proc_ops;
- pde->data = sl811;
- sl811->pde = pde;
+ sl811->pde = proc_create_data(proc_filename, 0, NULL, &proc_ops, sl811);
}
static void remove_debug_file(struct sl811 *sl811)
OpenPOWER on IntegriCloud