diff options
author | Arve Hjønnevåg <arve@android.com> | 2009-04-06 18:12:54 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-04-17 14:06:26 -0400 |
commit | 85e0b0cbbfc17e7f7baa9e76f9a937249108fc52 (patch) | |
tree | 13b9681d8ee1a11def4df921571cd5a2d0bd984c /drivers | |
parent | 1d8cbcf5d66b1f23f776a2c10ef9574a338cd109 (diff) |
Staging: binder: Don't create two proc entries with the same name if the driver is opened twice in one process.
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/android/binder.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/android/binder.c b/drivers/staging/android/binder.c index b62cd2aae874..39871da7ef91 100644 --- a/drivers/staging/android/binder.c +++ b/drivers/staging/android/binder.c | |||
@@ -2776,6 +2776,7 @@ static int binder_open(struct inode *nodp, struct file *filp) | |||
2776 | if (binder_proc_dir_entry_proc) { | 2776 | if (binder_proc_dir_entry_proc) { |
2777 | char strbuf[11]; | 2777 | char strbuf[11]; |
2778 | snprintf(strbuf, sizeof(strbuf), "%u", proc->pid); | 2778 | snprintf(strbuf, sizeof(strbuf), "%u", proc->pid); |
2779 | remove_proc_entry(strbuf, binder_proc_dir_entry_proc); | ||
2779 | create_proc_read_entry(strbuf, S_IRUGO, binder_proc_dir_entry_proc, binder_read_proc_proc, proc); | 2780 | create_proc_read_entry(strbuf, S_IRUGO, binder_proc_dir_entry_proc, binder_read_proc_proc, proc); |
2780 | } | 2781 | } |
2781 | 2782 | ||