summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2017-03-09 17:21:32 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-03-09 17:21:32 -0800
commit3a9ea3d5335330e66dc313253c055442c9db7b8e (patch)
tree643e46f5b22e2f92da7ec562755357edcb80641f /drivers
parent637926e1e338b20faf8da8e1d069e37205b6a387 (diff)
parent748b6dc2a170e75f816e5734e94c74f236a02aa2 (diff)
Merge "msm: ADSPRPC: Create debugfs file with process name"
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/adsprpc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/char/adsprpc.c b/drivers/char/adsprpc.c
index 070297785452..700b5c80aff5 100644
--- a/drivers/char/adsprpc.c
+++ b/drivers/char/adsprpc.c
@@ -2423,13 +2423,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);
@@ -2439,6 +2441,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);