Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16fb3e80 authored by Sujeev Dias's avatar Sujeev Dias Committed by Gerrit - the friendly Code Review server
Browse files

mhi: core: use debugfs lookup method to find parent directory



Instead of storing debug_fs directory inode in a global data
structure, use a look up method to get the directory inode.

CRs-Fixed: 2258358
Change-Id: I2df480d7ea29b1cc90dff3a7fa19bb9c46132552
Signed-off-by: default avatarSujeev Dias <sdias@codeaurora.org>
parent 48de0416
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -1158,7 +1158,7 @@ int of_register_mhi_controller(struct mhi_controller *mhi_cntrl)

	mhi_cntrl->mhi_dev = mhi_dev;

	mhi_cntrl->parent = mhi_bus.dentry;
	mhi_cntrl->parent = debugfs_lookup(mhi_bus_type.name, NULL);
	mhi_cntrl->klog_lvl = MHI_MSG_LVL_ERROR;

	/* adding it to this list only for debug purpose */
@@ -1493,14 +1493,13 @@ struct mhi_device *mhi_alloc_device(struct mhi_controller *mhi_cntrl)

static int __init mhi_init(void)
{
	struct dentry *dentry;
	int ret;

	mutex_init(&mhi_bus.lock);
	INIT_LIST_HEAD(&mhi_bus.controller_list);
	dentry = debugfs_create_dir("mhi", NULL);
	if (!IS_ERR_OR_NULL(dentry))
		mhi_bus.dentry = dentry;

	/* parent directory */
	debugfs_create_dir(mhi_bus_type.name, NULL);

	ret = bus_register(&mhi_bus_type);

+0 −1
Original line number Diff line number Diff line
@@ -626,7 +626,6 @@ struct mhi_timesync {
struct mhi_bus {
	struct list_head controller_list;
	struct mutex lock;
	struct dentry *dentry;
};

/* default MHI timeout */