diff options
author | Sathish Ambley <sathishambley@codeaurora.org> | 2017-03-06 11:55:04 -0800 |
---|---|---|
committer | Sathish Ambley <sathishambley@codeaurora.org> | 2017-03-07 11:21:09 -0800 |
commit | 748b6dc2a170e75f816e5734e94c74f236a02aa2 (patch) | |
tree | 1b6459d0a44667e83aac130c47f55aadcf31d5fb /drivers/char | |
parent | 45ad5727c99fa3e06acd6977de2bddb47ce758d1 (diff) |
msm: ADSPRPC: Create debugfs file with process name
During device open create a debugfs file with name as the current
process name.
Change-Id: I7cb1c4a950b2498932f930eb79cb936952c0781d
Acked-by: Vishnu Karthik <vikarthi@qti.qualcomm.com>
Signed-off-by: Sathish Ambley <sathishambley@codeaurora.org>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/adsprpc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/char/adsprpc.c b/drivers/char/adsprpc.c index 0345e977a2d4..dadfc1da27b3 100644 --- a/drivers/char/adsprpc.c +++ b/drivers/char/adsprpc.c @@ -2383,13 +2383,15 @@ bail: static int fastrpc_device_open(struct inode *inode, struct file *filp) { int err = 0; + struct dentry *debugfs_file; struct fastrpc_file *fl = 0; struct fastrpc_apps *me = &gfa; VERIFY(err, fl = kzalloc(sizeof(*fl), GFP_KERNEL)); if (err) return err; - + debugfs_file = debugfs_create_file(current->comm, 0644, debugfs_root, + fl, &debugfs_fops); context_list_ctor(&fl->clst); spin_lock_init(&fl->hlock); INIT_HLIST_HEAD(&fl->maps); @@ -2399,6 +2401,9 @@ static int fastrpc_device_open(struct inode *inode, struct file *filp) fl->apps = me; fl->mode = FASTRPC_MODE_SERIAL; fl->cid = -1; + if (debugfs_file != NULL) + fl->debugfs_file = debugfs_file; + memset(&fl->perf, 0, sizeof(fl->perf)); filp->private_data = fl; spin_lock(&me->hlock); hlist_add_head(&fl->hn, &me->drivers); |