Skip to content

Commit

Permalink
Staging: binder: Don't create two proc entries with the same name if …
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
Arve Hjønnevåg authored and Greg Kroah-Hartman committed Apr 17, 2009
1 parent 1d8cbcf commit 85e0b0c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/staging/android/binder.c
Original file line number Diff line number Diff line change
Expand Up @@ -2776,6 +2776,7 @@ static int binder_open(struct inode *nodp, struct file *filp)
if (binder_proc_dir_entry_proc) {
char strbuf[11];
snprintf(strbuf, sizeof(strbuf), "%u", proc->pid);
remove_proc_entry(strbuf, binder_proc_dir_entry_proc);
create_proc_read_entry(strbuf, S_IRUGO, binder_proc_dir_entry_proc, binder_read_proc_proc, proc);
}

Expand Down

0 comments on commit 85e0b0c

Please sign in to comment.